MDL-79863 qtype_ordering: qtype_ordering recognize RELATIVE_TO_CORRECT in gift import file
This commit is contained in:
committed by
Mathew May
parent
63eb9ac186
commit
e72e1a6078
@@ -37,7 +37,7 @@ class qtype_ordering_question extends question_graded_automatically {
|
||||
const SELECT_ALL = 0;
|
||||
/** Select random set of answers */
|
||||
const SELECT_RANDOM = 1;
|
||||
/** Select contignous subset of answers */
|
||||
/** Select contiguous subset of answers */
|
||||
const SELECT_CONTIGUOUS = 2;
|
||||
|
||||
/** Show answers in vertical list */
|
||||
@@ -60,7 +60,7 @@ class qtype_ordering_question extends question_graded_automatically {
|
||||
const GRADING_RELATIVE_ALL_PREVIOUS_AND_NEXT = 4;
|
||||
/** @var int Only longest ordered subset is graded */
|
||||
const GRADING_LONGEST_ORDERED_SUBSET = 5;
|
||||
/** @var int Only longest ordered and contignous subset is graded */
|
||||
/** @var int Only longest ordered and contiguous subset is graded */
|
||||
const GRADING_LONGEST_CONTIGUOUS_SUBSET = 6;
|
||||
/** @var int Items are graded relative to their position in the correct answer */
|
||||
const GRADING_RELATIVE_TO_CORRECT = 7;
|
||||
|
||||
@@ -381,6 +381,7 @@ class qtype_ordering extends question_type {
|
||||
'RELATIVE_NEXT_INCLUDE_LAST|'.
|
||||
'RELATIVE_ONE_PREVIOUS_AND_NEXT|'.
|
||||
'RELATIVE_ALL_PREVIOUS_AND_NEXT|'.
|
||||
'RELATIVE_TO_CORRECT|'.
|
||||
'RELATIVE|REL'.
|
||||
'LONGEST_ORDERED_SUBSET|'.
|
||||
'LONGEST_CONTIGUOUS_SUBSET)?';
|
||||
|
||||
@@ -94,12 +94,12 @@ class qtype_ordering_renderer extends qtype_with_combined_feedback_renderer {
|
||||
$script = "\n";
|
||||
$script .= "//<![CDATA[\n";
|
||||
$script .= "if (window.$) {\n";
|
||||
$script .= " $(function() {\n";
|
||||
$script .= " $(function(){\n";
|
||||
$script .= " $('#$sortableid').sortable({\n";
|
||||
$script .= " axis: '$axis',\n";
|
||||
$script .= " containment: '#$ablockid',\n";
|
||||
$script .= " opacity: 0.6,\n";
|
||||
$script .= " update: function(event, ui) {\n";
|
||||
$script .= " update: function(event, ui){\n";
|
||||
$script .= " if (typeof($(this).sortable)=='function') {\n";
|
||||
$script .= " var ItemsOrder = $(this).sortable('toArray');\n";
|
||||
$script .= " } else {\n";
|
||||
@@ -114,7 +114,7 @@ class qtype_ordering_renderer extends qtype_with_combined_feedback_renderer {
|
||||
$script .= " });\n";
|
||||
$script .= " $('#$sortableid').disableSelection();\n";
|
||||
$script .= " });\n";
|
||||
$script .= " $(document).ready(function() {\n";
|
||||
$script .= " $(document).ready(function(){\n";
|
||||
$script .= " var ItemsOrder = $('#$sortableid').sortable('toArray');\n";
|
||||
$script .= " $('#$responseid').val(ItemsOrder).toString();\n";
|
||||
$script .= " });\n";
|
||||
|
||||
@@ -29,5 +29,5 @@ $plugin->cron = 0;
|
||||
$plugin->component = 'qtype_ordering';
|
||||
$plugin->maturity = MATURITY_STABLE;
|
||||
$plugin->requires = 2010112400; // Moodle 2.0
|
||||
$plugin->version = 2017112265;
|
||||
$plugin->release = '2017-11-22 (65)';
|
||||
$plugin->version = 2017112366;
|
||||
$plugin->release = '2017-11-23 (66)';
|
||||
|
||||
Reference in New Issue
Block a user