From ac04eeab1d4029f0c2802bc74db971cd8f52dad5 Mon Sep 17 00:00:00 2001 From: Vasilis Daloukas Date: Sat, 17 Sep 2016 09:13:02 +0300 Subject: [PATCH] Fix Moodle 3.1 compatibility --- bookquiz/view.php | 2 +- lib.php | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/bookquiz/view.php b/bookquiz/view.php index 9d7cee6..e16408a 100644 --- a/bookquiz/view.php +++ b/bookquiz/view.php @@ -39,7 +39,7 @@ if (!$book = $DB->get_record('book', array( 'id' => $cm->instance))) { require_course_login($course, true, $cm); -$context = get_context_instance(CONTEXT_MODULE, $cm->id); +$context = game_get_context_module_instance( $cm->id); // Read chapters. $select = $allowedit ? "bookid = $book->id" : "bookid = $book->id AND hidden = 0"; diff --git a/lib.php b/lib.php index 0abcee6..c854423 100644 --- a/lib.php +++ b/lib.php @@ -689,8 +689,6 @@ function game_supports($feature) { return true; case FEATURE_COMPLETION_HAS_RULES: return true; - case FEATURE_GRADE_HAS_GRADE: - return true; case FEATURE_GRADE_OUTCOMES: return true; case FEATURE_RATE: