Merge branch 'MDL-54976-master' of git://github.com/junpataleta/moodle

This commit is contained in:
Dan Poltawski 2016-07-04 14:51:59 +01:00
commit 1f0daa292e
2 changed files with 8 additions and 0 deletions

View File

@ -74,6 +74,7 @@ $string['browserepository'] = 'Browse repository';
$string['calculatedweight'] = 'Calculated weight';
$string['cannotaccess'] = 'You cannot call this script in that way';
$string['cannotfindsco'] = 'Could not find SCO';
$string['closebeforeopen'] = 'You have specified a close date before the open date.';
$string['collapsetocwinsize'] = 'Collapse TOC when window size below';
$string['collapsetocwinsizedesc'] = 'This setting lets you specify the window size below which the TOC should automatically collapse.';
$string['compatibilitysettings'] = 'Compatibility settings';

View File

@ -442,6 +442,13 @@ class mod_scorm_mod_form extends moodleform_mod {
}
// Validate availability dates.
if ($data['timeopen'] && $data['timeclose']) {
if ($data['timeopen'] > $data['timeclose']) {
$errors['timeclose'] = get_string('closebeforeopen', 'scorm');
}
}
return $errors;
}