| 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.138 2004/05/28 14:55:01 jj Exp $ |
4 | # $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/Problem.pm,v 1.139 2004/05/31 04:17:59 jj 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. |
| … | |
… | |
| 167 | my $problemSeed = $r->param("problemSeed"); |
167 | my $problemSeed = $r->param("problemSeed"); |
| 168 | if (defined $problemSeed) { |
168 | if (defined $problemSeed) { |
| 169 | $problem->problem_seed($problemSeed); |
169 | $problem->problem_seed($problemSeed); |
| 170 | } |
170 | } |
| 171 | |
171 | |
|
|
172 | my $publishedClass = ($set->published) ? "Published" : "Unpublished"; |
| 172 | my $published = ($set->published) ? "visable to students." : "hidden from students."; |
173 | my $publishedText = ($set->published) ? "visable to students." : "hidden from students."; |
| 173 | $self->addmessage(CGI::p("This set is " . CGI::font({class=>$published}, $published))); |
174 | $self->addmessage(CGI::p("This set is " . CGI::font({class=>$publishedClass}, $publishedText))); |
| 174 | } else { |
175 | } else { |
| 175 | |
176 | |
| 176 | $self->addmessage(CGI::div({class=>"ResultsWithError"}, CGI::p("This problem will not count towards your grade."))) unless $problem->value;; |
177 | $self->addmessage(CGI::div({class=>"ResultsWithError"}, CGI::p("This problem will not count towards your grade."))) unless $problem->value;; |
| 177 | # students can't view problems not assigned to them |
178 | # students can't view problems not assigned to them |
| 178 | |
179 | |