MDL-79863 qtype_ordering: qtype_ordering improvements for compatability with AMD in Moodle >= 2.9. Many thanks to Jakob Ackermann (github.com/jacac)

This commit is contained in:
Gordon Bateson
2024-04-04 10:59:25 +08:00
committed by Mathew May
parent 489c938b85
commit 6f79ea9708
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -7,8 +7,8 @@ define(['jquery', 'jqueryui', 'qtype_ordering/jquery.ui.touch-punch-improved'],
containment: $('#'+sortableid),
opacity : 0.6,
update : function () {
var ItemsOrder = $(this).sortable('toArray').toString();
$('#' + responseid).attr('value', ItemsOrder);
var items = $(this).sortable('toArray').toString();
$('#' + responseid).attr('value', items);
}
});
}
+2 -2
View File
@@ -125,7 +125,7 @@ class qtype_ordering_renderer extends qtype_with_combined_feedback_renderer {
$printeditems = false;
if (count($currentresponse)) {
// initialize cache of answer md5keys
// initialize the cache for the answers' md5keys
// this represents the initial position of the items
$md5keys = array();
@@ -194,7 +194,7 @@ class qtype_ordering_renderer extends qtype_with_combined_feedback_renderer {
$result .= html_writer::empty_tag('input', array('type' => 'hidden',
'name' => $responsename,
'id' => $responseid,
'value' => ''));
'value' => implode(',', $md5keys)));
}
return $result;
+2 -2
View File
@@ -29,5 +29,5 @@ $plugin->cron = 0;
$plugin->component = 'qtype_ordering';
$plugin->maturity = MATURITY_STABLE;
$plugin->requires = 2010112400; // Moodle 2.0
$plugin->version = 2018011667;
$plugin->release = '2018-01-16 (67)';
$plugin->version = 2018011768;
$plugin->release = '2018-01-17 (68)';