fix for MDL-11063 - thanks to Wen for the patch.

This commit is contained in:
danmarsden 2007-10-22 21:25:06 +00:00
parent 948acd80e2
commit 8c74e3f676
2 changed files with 12 additions and 4 deletions

View file

@ -17,6 +17,7 @@ $string['choicetext'] = 'Choice text';
$string['displayhorizontal'] = 'Display horizontally'; $string['displayhorizontal'] = 'Display horizontally';
$string['displaymode'] = 'Display Mode'; $string['displaymode'] = 'Display Mode';
$string['displayvertical'] = 'Display vertically'; $string['displayvertical'] = 'Display vertically';
$string['expired'] = 'Sorry, this activity closed on $a and is no longer available';
$string['fillinatleastoneoption'] = 'You need to provide at least two possible answers.'; $string['fillinatleastoneoption'] = 'You need to provide at least two possible answers.';
$string['full'] = '(Full)'; $string['full'] = '(Full)';
$string['havetologin'] = 'You have to log in before you can submit your choice'; $string['havetologin'] = 'You have to log in before you can submit your choice';

View file

@ -87,10 +87,17 @@ if ($action == 'delchoice') {
/// Print the form /// Print the form
if ($choice->timeopen > time() ) { $timenow = time();
if ($choice->timeclose !=0) {
if ($choice->timeopen > $timenow ) {
print_simple_box(get_string("notopenyet", "choice", userdate($choice->timeopen)), "center"); print_simple_box(get_string("notopenyet", "choice", userdate($choice->timeopen)), "center");
print_footer($course); print_footer($course);
exit; exit;
} else if ($timenow > $choice->timeclose) {
print_simple_box(get_string("expired", "choice", userdate($choice->timeclose)), "center");
print_footer($course);
exit;
}
} }
if ( (!$current or $choice->allowupdate) and if ( (!$current or $choice->allowupdate) and