Skip to content

Commit

Permalink
Merge branch 'master' into MBS-7377-Fix_workflowoverview_for_big_inst…
Browse files Browse the repository at this point in the history
…ances
  • Loading branch information
NinaHerrmann committed May 17, 2023
2 parents d03e593 + 0318800 commit 126af9e
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 15 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/moodle-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,34 @@ jobs:

steps:
- name: Start PostgreSQL
run: docker run -p 5432:5432 -e POSTGRES_USER=postgres -e POSTGRES_HOST_AUTH_METHOD=trust -d postgres:10
run: docker run -p 5432:5432 -e POSTGRES_USER=postgres -e POSTGRES_HOST_AUTH_METHOD=trust -d postgres:14

- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: plugin

- name: Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
ini-values: max_input_vars=5000
coverage: none

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Composer cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: npm cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down Expand Up @@ -93,6 +94,7 @@ jobs:
- name: Mustache Lint
if: ${{ always() }}
run: moodle-plugin-ci mustache
continue-on-error: true

- name: Grunt
if: ${{ always() }}
Expand Down Expand Up @@ -128,38 +130,40 @@ jobs:
moodle-branch: 'MOODLE_400_STABLE'
database: 'pgsql'


steps:
- name: Start MariaDB
if: matrix.database == 'mariadb'
run: docker run -p 3306:3306 -e MYSQL_USER=root -e MYSQL_ALLOW_EMPTY_PASSWORD=true -d mariadb:10

- name: Start PostgreSQL
if: matrix.database == 'pgsql'
run: docker run -p 5432:5432 -e POSTGRES_USER=postgres -e POSTGRES_HOST_AUTH_METHOD=trust -d postgres:10
run: docker run -p 5432:5432 -e POSTGRES_USER=postgres -e POSTGRES_HOST_AUTH_METHOD=trust -d postgres:14

- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: plugin

- name: Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
ini-values: max_input_vars=5000
coverage: none

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Composer cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: npm cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down
2 changes: 1 addition & 1 deletion classes/task/lifecycle_error_notify_task.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function execute() {
email_to_user(get_admin(), \core_user::get_noreply_user(),
get_string('notifyerrorsemailsubject', 'tool_lifecycle', $obj),
get_string('notifyerrorsemailcontent', 'tool_lifecycle', $obj),
get_string('notifyerrorsemailcontenthtml', 'tool_lifecycle', $obj),
get_string('notifyerrorsemailcontenthtml', 'tool_lifecycle', $obj)
);
}
}
3 changes: 2 additions & 1 deletion step/email/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ class email extends libbase {
public function process_course($processid, $instanceid, $course) {
global $DB;
$coursecontext = \context_course::instance($course->id);
$userstobeinformed = get_users_by_capability($coursecontext, 'lifecyclestep/email:preventdeletion');
$userstobeinformed = get_enrolled_users($coursecontext, 'lifecyclestep/email:preventdeletion', 0,
'u.id', null, null, null, true);
foreach ($userstobeinformed as $user) {
$record = new \stdClass();
$record->touser = $user->id;
Expand Down
2 changes: 1 addition & 1 deletion templates/workflowoverview.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template plugintype_pluginname/template_name
@template tool_lifecycle/workflowoverview
Template purpose and description.
Expand Down
4 changes: 2 additions & 2 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
defined('MOODLE_INTERNAL') || die;

$plugin->maturity = MATURITY_BETA;
$plugin->version = 2022042200;
$plugin->version = 2022112400;
$plugin->component = 'tool_lifecycle';
$plugin->requires = 2020061500; // Requires Moodle 3.9+.
$plugin->release = 'v4.0-r1';
$plugin->release = 'v4.1-r1';

0 comments on commit 126af9e

Please sign in to comment.