| 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: webwork2/lib/WeBWorK/ContentGenerator/Problem.pm,v 1.155 2004/07/12 23:38:52 sh002i Exp $ |
4 | # $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/Problem.pm,v 1.156 2004/07/15 00:13:19 sh002i 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. |
| … | |
… | |
| 161 | return $authz->hasPermissions($User->user_id, "check_answers_after_answer_date"); |
161 | return $authz->hasPermissions($User->user_id, "check_answers_after_answer_date"); |
| 162 | } |
162 | } |
| 163 | } |
163 | } |
| 164 | |
164 | |
| 165 | # Helper functions for calculating times |
165 | # Helper functions for calculating times |
| 166 | sub before { return time < $_[0] } |
166 | sub before { return time <= $_[0] } |
| 167 | sub after { return time > $_[0] } |
167 | sub after { return time >= $_[0] } |
| 168 | sub between { my $t = time; return $t > $_[0] && $t < $_[1] } |
168 | sub between { my $t = time; return $t > $_[0] && $t < $_[1] } |
| 169 | |
169 | |
| 170 | ################################################################################ |
170 | ################################################################################ |
| 171 | # output utilities |
171 | # output utilities |
| 172 | ################################################################################ |
172 | ################################################################################ |