| 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/Instructor/SetMaker.pm,v 1.21 2004/07/01 20:31:13 dpvc Exp $ |
4 | # $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm,v 1.22 2004/07/07 14:37:31 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. |
| … | |
… | |
| 455 | problemID=>"1"), |
455 | problemID=>"1"), |
| 456 | params =>{effectiveUser => $self->r->param('user'), |
456 | params =>{effectiveUser => $self->r->param('user'), |
| 457 | editMode => "SetMaker", |
457 | editMode => "SetMaker", |
| 458 | sourceFilePath => "$sourceFileName"} )}, "Try it"); |
458 | sourceFilePath => "$sourceFileName"} )}, "Try it"); |
| 459 | |
459 | |
| 460 | my %add_box_data = ( -name=>"trial$cnt",-value=>1,-label=>"Add me to the current set on the next update"); |
460 | my %add_box_data = ( -name=>"trial$cnt",-value=>1,-label=>"Add this problem to the current set on the next update"); |
| 461 | if($mark & SUCCESS) { |
461 | if($mark & SUCCESS) { |
| 462 | $add_box_data{ -label } .= " (just added this problem)"; |
462 | $add_box_data{ -label } .= " (just added this problem)"; |
| 463 | } elsif($mark & ADDED) { |
463 | } elsif($mark & ADDED) { |
| 464 | $add_box_data{ -checked } = 1; |
464 | $add_box_data{ -checked } = 1; |
| 465 | } |
465 | } |
| … | |
… | |
| 472 | ), CGI::br(), |
472 | ), CGI::br(), |
| 473 | |
473 | |
| 474 | |
474 | |
| 475 | |
475 | |
| 476 | |
476 | |
| 477 | CGI::checkbox(-name=>"hideme$cnt",-value=>1,-label=>"Don't show me on the next update"), |
477 | CGI::checkbox(-name=>"hideme$cnt",-value=>1,-label=>"Don't show this problem on the next update"), |
| 478 | CGI::br(), |
478 | CGI::br(), |
| 479 | CGI::checkbox((%add_box_data)), |
479 | CGI::checkbox((%add_box_data)), |
| 480 | CGI::hidden(-name=>"filetrial$cnt", -default=>[$sourceFileName]). |
480 | CGI::hidden(-name=>"filetrial$cnt", -default=>[$sourceFileName]). |
| 481 | CGI::p($problem_output), |
481 | CGI::p($problem_output), |
| 482 | )); |
482 | )); |
| … | |
… | |
| 763 | |
763 | |
| 764 | |
764 | |
| 765 | ############# List of local sets |
765 | ############# List of local sets |
| 766 | |
766 | |
| 767 | my @all_set_defs = $db->listGlobalSets; |
767 | my @all_set_defs = $db->listGlobalSets; |
| 768 | for ($j=0; $j<scalar(@all_set_defs); $j++) { |
|
|
| 769 | $all_set_defs[$j] =~ s|^set||; |
|
|
| 770 | $all_set_defs[$j] =~ s|\.def||; |
|
|
| 771 | } |
|
|
| 772 | |
768 | |
| 773 | if ($use_previous_problems) { |
769 | if ($use_previous_problems) { |
| 774 | @pg_files = @all_past_list; |
770 | @pg_files = @all_past_list; |
| 775 | } else { |
771 | } else { |
| 776 | $first_shown = 0; |
772 | $first_shown = 0; |