Skip to content

Commit

Permalink
fIXED ci
Browse files Browse the repository at this point in the history
  • Loading branch information
prasanna-lmsace committed Sep 25, 2023
1 parent 661a99a commit 231c29c
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ Feature: Configuring the pulseaction_notification plugin on the "Automation temp
I need to be able to configure the pulse automation template

Background:
Given the following "categories" exist:
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
And the following "course" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| student1 | student | User 1 | student1@test.com |
And the following "course enrolments" exist:
| user | course | role |
| student1 | C1 | student |
Given the following "categories" exist:
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
And the following "course" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| student1 | student | User 1 | student1@test.com |
And the following "course enrolments" exist:
| user | course | role |
| student1 | C1 | student |

@javascript
Scenario: Create notification template and instance
Expand Down
2 changes: 1 addition & 1 deletion classes/automation/condition_base.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public function process_instance_save($instanceid, $data) {
// Remove empty values from data array.
$filter = array_filter($data);
// If 'status' is not set and there are no other non-empty values, stopped here.
if (!isset($data['status']) && empty($filter)) {
if (!isset($data['status']) && empty($filter)) {
return true;
}

Expand Down
3 changes: 3 additions & 0 deletions classes/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ class helper {
*/
public static function update_emailvars($templatetext, $subject, $course, $user, $mod, $sender) {
global $DB, $CFG;

// Include placholders handler and user profile library.
require_once($CFG->dirroot.'/mod/pulse/lib/vars.php');
require_once($CFG->dirroot.'/user/profile/lib.php');

// Load user profile field data.
$newuser = (object) ['id' => $user->id];
Expand Down
2 changes: 1 addition & 1 deletion classes/plugininfo/pulseaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function load_settings(part_of_admin_tree $adminroot, $parentnodename, $h
return;
}

if (!$hassiteconfig or !file_exists($this->full_path('settings.php'))) {
if (!$hassiteconfig || !file_exists($this->full_path('settings.php'))) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion classes/plugininfo/pulsecondition.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function load_settings(part_of_admin_tree $adminroot, $parentnodename, $h
return;
}

if (!$hassiteconfig or !file_exists($this->full_path('settings.php'))) {
if (!$hassiteconfig || !file_exists($this->full_path('settings.php'))) {
return;
}

Expand Down
4 changes: 4 additions & 0 deletions lib/vars.php
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,10 @@ public static function module_meta_fields() {
*/
public static function session_fields() {
global $CFG;
// Verify the face to face is installed. if not, prevent session placeholder inclusion.
if (!file_exists($CFG->dirroot.'/mod/facetoface/lib.php')) {
return [];
}

require_once($CFG->dirroot.'/mod/facetoface/lib.php');

Expand Down
2 changes: 1 addition & 1 deletion styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@
.path-admin-mod-pulse-automation-templates .filter-form-container #pulse-automation-filterform {
background-color: #fff;
border: 1px solid #ccc;
box-shadow: 0px 0 0px 0.1px;
box-shadow: 0 0 0 0.1px;
padding: 15px;
position: absolute;
top: 80%;
Expand Down
1 change: 0 additions & 1 deletion tests/behat/pulse_automation_instance.feature
Original file line number Diff line number Diff line change
Expand Up @@ -170,4 +170,3 @@ Feature: Pulse automation instances
| Title | WELCOME CONTENT |
And I press "Save changes"
And I should see "WELCOME CONTENT"

0 comments on commit 231c29c

Please sign in to comment.