MDL-34907: Add a missing string that triggers Javascript error in assignment upgrade tool

This commit is contained in:
Raymond Wijaya 2012-08-20 14:04:29 +08:00
parent d71c486507
commit 77b3e35105
3 changed files with 3 additions and 2 deletions

View File

@ -36,6 +36,7 @@ $string['conversioncomplete'] = 'Assignment converted';
$string['conversionfailed'] = 'The assignment conversion was not successful. The log from the upgrade was: <br />{$a}';
$string['listnotupgraded'] = 'List assignments that have not been upgraded';
$string['listnotupgraded_desc'] = 'You can upgrade individual assignments from here';
$string['noassignmentsselected'] = 'No assignments selected';
$string['noassignmentstoupgrade'] = 'There are no assignments that require upgrading';
$string['notsupported'] = '';
$string['notupgradedintro'] = 'This page lists the assignments created with an older version of Moodle that have not been upgraded to the new assignment module in Moodle 2.3. Not all assignments can be upgraded - if they were created with a custom assignment subtype, then that subtype will need to be upgraded to the new assignment plugin format in order to complete the upgrade.';

View File

@ -56,7 +56,7 @@ M.tool_assignmentupgrade = {
assignmentsinput = Y.one('input.selectedassignments');
assignmentsinput.set('value', selectedassignments.join(','));
if (selectedassignments.length == 0) {
alert(M.str.assign.noassignmentsselected);
alert(M.str.tool_assignmentupgrade.noassignmentsselected);
e.preventDefault();
}
});

View File

@ -119,7 +119,7 @@ class tool_assignmentupgrade_renderer extends plugin_renderer_base {
$output = '';
$output .= $this->header();
$this->page->requires->js_init_call('M.tool_assignmentupgrade.init_upgrade_table', array());
$this->page->requires->string_for_js('noassignmentsselected', 'tool_assignmentupgrade');
$output .= $this->heading(get_string('notupgradedtitle', 'tool_assignmentupgrade'));
$output .= $this->box(get_string('notupgradedintro', 'tool_assignmentupgrade'));