$string['displayhorizontal'] = 'Display horizontally';
$string['displaymode'] = 'Display Mode';
$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['full'] = '(Full)';
$string['havetologin'] = 'You have to log in before you can submit your choice';
/// Print the form
- if ($choice->timeopen > time() ) {
- print_simple_box(get_string("notopenyet", "choice", userdate($choice->timeopen)), "center");
- print_footer($course);
- exit;
+ $timenow = time();
+ if ($choice->timeclose !=0) {
+ if ($choice->timeopen > $timenow ) {
+ print_simple_box(get_string("notopenyet", "choice", userdate($choice->timeopen)), "center");
+ print_footer($course);
+ 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