From 7cabd5805422efb2ddff5a765dff376aea4bc5ee Mon Sep 17 00:00:00 2001 From: Gordon Bateson Date: Mon, 26 Nov 2018 10:13:24 +0900 Subject: [PATCH] MDL-79863 qtype_ordering: qtype/ordering fix indexing of items when "Item selection type" is "Select a contiguous subset of items". The incorrect indexing resulted in less than the exptected number of items being displayed. --- question/type/ordering/question.php | 2 +- question/type/ordering/version.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/question/type/ordering/question.php b/question/type/ordering/question.php index cd72555bbcd..feab35be7af 100644 --- a/question/type/ordering/question.php +++ b/question/type/ordering/question.php @@ -146,7 +146,7 @@ class qtype_ordering_question extends question_graded_automatically { case self::SELECT_CONTIGUOUS: $answerids = array_keys($answers); $offset = mt_rand(0, $countanswers - $selectcount); - $answerids = array_slice($answerids, $offset, $selectcount, true); + $answerids = array_slice($answerids, $offset, $selectcount); break; } diff --git a/question/type/ordering/version.php b/question/type/ordering/version.php index 03558c031d0..42706fa075d 100644 --- a/question/type/ordering/version.php +++ b/question/type/ordering/version.php @@ -29,5 +29,5 @@ $plugin->cron = 0; $plugin->component = 'qtype_ordering'; $plugin->maturity = MATURITY_STABLE; $plugin->requires = 2010112400; // Moodle 2.0 -$plugin->version = 2018111973; -$plugin->release = '2018-11-19 (73)'; +$plugin->version = 2018112674; +$plugin->release = '2018-11-26 (74)';