Skip to content

Commit

Permalink
Merge branch 'release/2.0.8'
Browse files Browse the repository at this point in the history
* release/2.0.8:
  fix(multiple): Activity completion for views now possible. Small last bugfixes.
  fix(event): Fixed typo in view event.
  • Loading branch information
Daniel Nolte committed Feb 29, 2024
2 parents f322e51 + 3fe1c4d commit e5d579b
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 10 deletions.
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
## Changelog ##

- [2.0.8]:
- Activity completion for views now possible.
- Small last bugfixes.

- [2.0.7]:
- Fixed typo in view event.

- [2.0.6]:
- Small bugfixes and fixes for moodle coding style.

Expand Down
4 changes: 2 additions & 2 deletions exportresultstextfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@
if (!isset($moduleinstance->misc)) {
$mode = 'normal';
} else {
$misc = json_decode($moduleinstance->misc);
$misc = (array) json_decode($moduleinstance->misc);

if (isset($misc->mode) && $misc->mode === 'export_grades') {
if (isset($misc['mode']) && $misc['mode'] === 'export_grades') {
$mode = 'export_grades';
} else {
$mode = 'normal';
Expand Down
6 changes: 3 additions & 3 deletions mod_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function definition() {
$oldpw = $moduleinstance->password;

if (isset($moduleinstance->misc)) {
$misc = json_decode($moduleinstance->misc);
$misc = (array) json_decode($moduleinstance->misc);
} else {
$misc = null;
}
Expand Down Expand Up @@ -114,7 +114,7 @@ public function definition() {
$mform->addElement('advcheckbox', 'exportgrades', get_string('activate_mode', 'mod_exammanagement'));
$mform->addHelpButton('exportgrades', 'export_grades_as_exam_results', 'mod_exammanagement');

if (isset($misc) && isset($misc->mode) && $misc->mode === 'export_grades') {
if (isset($misc) && isset($misc['mode']) && $misc['mode'] === 'export_grades') {
$mform->setDefault('exportgrades', 1);
} else {
$mform->setDefault('exportgrades', 0);
Expand All @@ -123,7 +123,7 @@ public function definition() {
$mform->addElement('header', 'deselectstepsandphases', get_string('deselectstepsandphases', 'mod_exammanagement'));
$mform->addElement('advcheckbox', 'deselectphaseexamreview', get_string('deselectphaseexamreview', 'mod_exammanagement'));

if (isset($misc) && isset($misc->configoptions) && in_array('noexamreview', $misc->configoptions)) {
if (isset($misc) && isset($misc['configoptions']) && in_array('noexamreview', $misc['configoptions'])) {
$mform->setDefault('deselectphaseexamreview', 1);
} else {
$mform->setDefault('deselectphaseexamreview', 0);
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->component = 'mod_exammanagement'; // Full name of the plugin (used for diagnostics).
$plugin->release = '2.0.6'; // User-friendly version number.
$plugin->version = 2024022701; // The current module version (Date: YYYYMMDDXX).
$plugin->release = '2.0.8'; // User-friendly version number.
$plugin->version = 2024022800; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2020061500; // Requires this Moodle version.
$plugin->maturity = MATURITY_STABLE;
9 changes: 6 additions & 3 deletions view.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
} else {
$misc = (array) json_decode($moduleinstance->misc);

if (isset($misc->mode) && $misc->mode === 'export_grades') {
if (isset($misc['mode']) && $misc['mode'] === 'export_grades') {
$mode = 'export_grades';
} else {
$mode = 'normal';
Expand Down Expand Up @@ -502,7 +502,7 @@
}

// Textfield.
$textfield = helper::gettextfield($moduleinstance)->text;
$textfield = helper::gettextfield($moduleinstance)->text ?? false;

// Bonussteps.
if ($moduleinstance->bonusvisible && $participant) {
Expand Down Expand Up @@ -592,6 +592,9 @@
$PAGE->force_settings_menu();
}

$completion = new completion_info($course);
$completion->set_module_viewed($cm);

// Output header.
echo $OUTPUT->header();

Expand All @@ -604,7 +607,7 @@
}

// Trigger course_module_viewed event.
$event = \mod_annopy\event\course_module_viewed::create([
$event = \mod_exammanagement\event\course_module_viewed::create([
'objectid' => $moduleinstance->id,
'context' => $context,
]);
Expand Down

0 comments on commit e5d579b

Please sign in to comment.