Skip to content

Commit

Permalink
Fixes for Moodle 4.1 (#80)
Browse files Browse the repository at this point in the history
* mod_quizgame: Update Github Actions

* mod_quizgame: coding style fixes for M4.1

* mod_quizgame: Fix PHPDocs

* mod_quizgame: Bump version for new release

---------

Co-authored-by: Stephen Bourget <[email protected]>
  • Loading branch information
sbourget and Stephen Bourget authored Jan 27, 2023
1 parent a37be66 commit 5c8c7f0
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/moodle-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

services:
postgres:
image: postgres:10
image: postgres:12
env:
POSTGRES_USER: 'postgres'
POSTGRES_HOST_AUTH_METHOD: 'trust'
Expand All @@ -27,7 +27,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['7.3', '7.4', '8.0']
php: ['7.4', '8.0']
moodle-branch: ['master']
database: [pgsql, mariadb]

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/nbproject/private/
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
format_string($quizgame->name, true));
}

if ($course->format == 'weeks' or $course->format == 'topics') {
if ($course->format == 'weeks' || $course->format == 'topics') {
$table->data[] = array($quizgame->section, $link);
} else {
$table->data[] = array($link);
Expand Down
2 changes: 1 addition & 1 deletion lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ function quizgame_get_extra_capabilities() {
function quizgame_scale_used($quizgameid, $scaleid) {
global $DB;

if ($scaleid and $DB->record_exists('quizgame', array('id' => $quizgameid, 'grade' => -$scaleid))) {
if ($scaleid && $DB->record_exists('quizgame', array('id' => $quizgameid, 'grade' => -$scaleid))) {
return true;
} else {
return false;
Expand Down
4 changes: 0 additions & 4 deletions nbproject/private/private.xml

This file was deleted.

1 change: 1 addition & 0 deletions tests/custom_completion_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
* @package mod_quizgame
* @copyright 2021 Stephen Bourget
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @covers \mod_quizgame\completion\custom_completion
*/
class custom_completion_test extends advanced_testcase {

Expand Down
1 change: 1 addition & 0 deletions tests/privacy/provider_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
* @package mod_quizgame
* @copyright 2018 Stephen Bourget
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @covers \mod_quizgame\privacy\provider
*/
class provider_test extends \core_privacy\tests\provider_testcase {
/** @var stdClass The student object. */
Expand Down
6 changes: 3 additions & 3 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@

defined('MOODLE_INTERNAL') || die();

$plugin->version = 2022030300; // If version == 0 then module will not be installed.
$plugin->requires = 2022030300; // Requires Moodle version 4.0 or later.
$plugin->version = 2022112200; // If version == 0 then module will not be installed.
$plugin->requires = 2022111800; // Requires Moodle version 4.0 or later.
$plugin->cron = 0; // Period for cron to check this module in seconds.
$plugin->component = 'mod_quizgame'; // To check on upgrade, that module sits in correct place.
$plugin->maturity = MATURITY_STABLE;
$plugin->release = 'v4.0-r1';
$plugin->release = 'v4.1-r1';

0 comments on commit 5c8c7f0

Please sign in to comment.