MDL-39116 Course: Pluginname strings will be set in M.str for all modules supporting Dnd

Currently, if new activity/resource is created by DnD and M.str doesn't have pluginname string
it show wrong string, so loading pluginnames for all modules which support DnD
This commit is contained in:
Rajesh Taneja 2013-04-15 17:42:24 +08:00
parent b3661ab272
commit 0434840004

View File

@ -107,7 +107,7 @@ class dndupload_handler {
* @param object $course The course this is being added to (to check course_allowed_module() )
*/
public function __construct($course, $modnames = null) {
global $CFG;
global $CFG, $PAGE;
// Add some default types to handle.
// Note: 'Files' type is hard-coded into the Javascript as this needs to be ...
@ -158,6 +158,7 @@ class dndupload_handler {
$this->register_type_handler($type['identifier'], $modname, $type['message'], $noname);
}
}
$PAGE->requires->string_for_js('pluginname', $modname);
}
}