| 1 | ################################################################################ |
1 | ################################################################################ |
| 2 | # WeBWorK Online Homework Delivery System |
2 | # WeBWorK Online Homework Delivery System |
| 3 | # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ |
3 | # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ |
| 4 | # $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/Problem.pm,v 1.169 2004/12/17 16:59:48 gage Exp $ |
4 | # $CVSHeader: webwork2/lib/WeBWorK/ContentGenerator/Problem.pm,v 1.170 2004/12/19 22:41:34 gage Exp $ |
| 5 | # |
5 | # |
| 6 | # This program is free software; you can redistribute it and/or modify it under |
6 | # This program is free software; you can redistribute it and/or modify it under |
| 7 | # the terms of either: (a) the GNU General Public License as published by the |
7 | # the terms of either: (a) the GNU General Public License as published by the |
| 8 | # Free Software Foundation; either version 2, or (at your option) any later |
8 | # Free Software Foundation; either version 2, or (at your option) any later |
| 9 | # version, or (b) the "Artistic License" which comes with this package. |
9 | # version, or (b) the "Artistic License" which comes with this package. |
| … | |
… | |
| 990 | |
990 | |
| 991 | my $setClosed = 0; |
991 | my $setClosed = 0; |
| 992 | my $setClosedMessage; |
992 | my $setClosedMessage; |
| 993 | if (before($set->open_date) or after($set->due_date)) { |
993 | if (before($set->open_date) or after($set->due_date)) { |
| 994 | $setClosed = 1; |
994 | $setClosed = 1; |
|
|
995 | if (before($set->open_date)) { |
|
|
996 | $setClosedMessage = "This problem set is not yet open."; |
|
|
997 | } elsif (after($set->due_date)) { |
| 995 | $setClosedMessage = "This problem set is closed."; |
998 | $setClosedMessage = "This problem set is closed."; |
|
|
999 | } |
|
|
1000 | } |
|
|
1001 | #if (before($set->open_date) or after($set->due_date)) { |
|
|
1002 | # $setClosed = 1; |
|
|
1003 | # $setClosedMessage = "This problem set is closed."; |
| 996 | if ($authz->hasPermissions($user, "view_answers")) { |
1004 | # if ($authz->hasPermissions($user, "view_answers")) { |
| 997 | $setClosedMessage .= " However, since you are a privileged user, additional attempts will be recorded."; |
1005 | # $setClosedMessage .= " However, since you are a privileged user, additional attempts will be recorded."; |
| 998 | } else { |
1006 | # } else { |
| 999 | $setClosedMessage .= " Additional attempts will not be recorded."; |
1007 | # $setClosedMessage .= " Additional attempts will not be recorded."; |
| 1000 | } |
1008 | # } |
| 1001 | } |
1009 | #} |
| 1002 | |
1010 | |
| 1003 | my $notCountedMessage = ($problem->value) ? "" : "(This problem will not count towards your grade.)"; |
1011 | my $notCountedMessage = ($problem->value) ? "" : "(This problem will not count towards your grade.)"; |
| 1004 | print CGI::p( |
1012 | print CGI::p( |
| 1005 | $submitAnswers ? $scoreRecordedMessage . CGI::br() : "", |
1013 | $submitAnswers ? $scoreRecordedMessage . CGI::br() : "", |
| 1006 | "You have attempted this problem $attempts $attemptsNoun.", CGI::br(), |
1014 | "You have attempted this problem $attempts $attemptsNoun.", CGI::br(), |