From 832e08005655453f1e27e2cda2264998a0e85b61 Mon Sep 17 00:00:00 2001 From: bdaloukas Date: Thu, 6 Jul 2017 17:12:18 +0300 Subject: [PATCH] Fix problems on backup/restore --- cross/cross_class.php | 2 +- mod_form.php | 2 +- showanswers.php | 2 +- version.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cross/cross_class.php b/cross/cross_class.php index ea99d2e..2854486 100644 --- a/cross/cross_class.php +++ b/cross/cross_class.php @@ -792,7 +792,7 @@ class Cross $legendh = array(); if ($game->glossaryid) { - $sql = "SELECT id,course FROM {$CFG->prefix}glossary WHERE id={$game->glossaryid}"; + $sql = "SELECT id,course FROM {$CFG->prefix}glossary WHERE id={$game->glossaryid}"; $glossary = $DB->get_record_sql( $sql); $cmglossary = get_coursemodule_from_instance('glossary', $game->glossaryid, $glossary->course); $contextglossary = game_get_context_module_instance( $cmglossary->id); diff --git a/mod_form.php b/mod_form.php index d740330..4207069 100644 --- a/mod_form.php +++ b/mod_form.php @@ -102,7 +102,7 @@ class mod_game_mod_form extends moodleform_mod { "WHERE course={$COURSE->id} OR globalglossary=1 ORDER BY globalglossary DESC,name"; if ($recs = $DB->get_records_sql($sql)) { foreach ($recs as $rec) { - if( ($rec->globalglossary != 0) and ($rec->course != $COURSE->id)) { + if (($rec->globalglossary != 0) and ($rec->course != $COURSE->id)) { $rec->name = '*'.$rec->name; } $a[$rec->id] = $rec->name; diff --git a/showanswers.php b/showanswers.php index d3b3356..0272ef0 100644 --- a/showanswers.php +++ b/showanswers.php @@ -475,7 +475,7 @@ function game_showanswers_glossary( $game) { if ($game->param8 == 0) { // Not allowed -. if (!( strpos( $question->concept, '-') === false)) { continue; - } + } } echo ''; diff --git a/version.php b/version.php index 74012e5..92f4ec1 100644 --- a/version.php +++ b/version.php @@ -35,7 +35,7 @@ if (!isset( $plugin)) { } $plugin->component = 'mod_game'; // Full name of the plugin (used for diagnostics). -$plugin->version = 2017070604; // The current module version (Date: YYYYMMDDXX). +$plugin->version = 2017070605; // The current module version (Date: YYYYMMDDXX). $plugin->requires = 2010112400; // Requires Moodle 2.0. $plugin->cron = 0; // Period for cron to check this module (secs). $plugin->release = '2017-07-06';