Skip to content

Commit

Permalink
Pulse issue fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
prasanna-lmsace committed Nov 26, 2023
1 parent 9f4037f commit a1e1eee
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion classes/task/notify_users.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ public static function pulse_cron_task($extend=true) {
$params[] = time();
$params[] = 1;
$params[] = $pulse['id'];
$students = $DB->get_records_sql($usersql, $params);

$limit = get_config('mod_pulse', 'schedulecount') ?: 100;
$students = $DB->get_records_sql($usersql, $params, 0, $limit);

$courseid = $pulse['course'];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Feature: Activity trigger event.
And I am on "Course 1" course homepage
And I follow "Automation"
When I open the autocomplete suggestions list
And I click on "WELCOME MESSAGE" item in the autocomplete list
And I click on "WELCOME MESSAGE 01" item in the autocomplete list
Then I press "Add automation instance"
And I set the following fields to these values:
| insreference | Welcomemessage |
Expand Down
6 changes: 4 additions & 2 deletions tests/behat/pulse_automation_template.feature
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ Feature: Pulse automation templates
And I am on "Course 1" course homepage
And I follow "Automation"
And ".template-add-form .custom-select#id_templateid" "css_element" should exist
When I open the autocomplete suggestions list
Then I should see "WELCOME MESSAGE" in the ".template-add-form" "css_element"

@javascript
Expand All @@ -123,13 +124,13 @@ Feature: Pulse automation templates
And I am on "Course 1" course homepage
And I follow "Automation"
And ".template-add-form .custom-select#id_templateid" "css_element" should not exist
When I open the autocomplete suggestions list
Then I should not see "WELCOME MESSAGE" in the ".template-add-form" "css_element"
And I navigate to "Plugins > Activity modules > Pulse > Automation templates" in site administration
Then I click on ".action-show" "css_element" in the "WELCOME MESSAGE" "table_row"
And I am on "Course 1" course homepage
And I follow "Automation"
And ".template-add-form .custom-select#id_templateid" "css_element" should exist
When I open the autocomplete suggestions list
Then I should see "WELCOME MESSAGE" in the ".template-add-form" "css_element"

@javascript
Expand All @@ -150,7 +151,6 @@ Feature: Pulse automation templates
Then I should see "Automation"
And I follow "Automation"
And ".template-add-form .custom-select#id_templateid" "css_element" should not exist
When I open the autocomplete suggestions list
Then I should not see "WELCOME MESSAGE" in the ".template-add-form" "css_element"
# Course 3
And I am on "Course 2" course homepage
Expand Down Expand Up @@ -195,6 +195,8 @@ Feature: Pulse automation templates
| Trigger operator | All |
And I am on "Course 1" course homepage
And I follow "Automation"
When I open the autocomplete suggestions list
And I click on "WELCOME MESSAGE" item in the autocomplete list
Then I press "Add automation instance"
Then I follow "Condition"
Then I should see "Activity completion"
Expand Down

0 comments on commit a1e1eee

Please sign in to comment.