MDL-36990 mod_feedback - migrated the yui dragdrop stuff into a yui module

This commit is contained in:
Andreas Grabs 2013-01-18 18:31:55 +01:00
parent c206a2b3fd
commit bdd694fd85
3 changed files with 239 additions and 200 deletions

View file

@ -160,20 +160,8 @@ $PAGE->set_title(format_string($feedback->name));
//Adding the javascript module for the items dragdrop.
if ($do_show == 'edit') {
$jsmodule = array(
'name' => 'mod_feedback',
'fullpath' => '/mod/feedback/module.js',
'requires' => array('io', 'json-parse', 'dd-constrain', 'dd-proxy', 'dd-drop'),
'strings' => array(array('pluginname', 'feedback'),
array('move_item', 'feedback'),
array('position', 'feedback'))
);
$ajaxscript = $CFG->httpswwwroot.'/mod/feedback/ajax.php';
$PAGE->requires->js_init_call('M.mod_feedback.init', array($cm->id,
sesskey()),
false,
$jsmodule);
$PAGE->requires->yui_module('moodle-mod_feedback-dragdrop', 'M.mod_feedback.init_dragdrop',
array(array('cmid' => $cm->id)));
}
echo $OUTPUT->header();