| 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.26 2004/09/04 23:31:46 dpvc Exp $ |
4 | # $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm,v 1.27 2004/09/21 19:55:48 toenail 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. |
| … | |
… | |
| 472 | : CGI::div({class=>"RenderSolo"}, $pg->{body_text}); |
472 | : CGI::div({class=>"RenderSolo"}, $pg->{body_text}); |
| 473 | |
473 | |
| 474 | |
474 | |
| 475 | my $edit_link = ''; |
475 | my $edit_link = ''; |
| 476 | #if($self->{r}->param('browse_which') ne 'browse_library') { |
476 | #if($self->{r}->param('browse_which') ne 'browse_library') { |
|
|
477 | my $problem_seed = $self->{r}->param('problem_seed') || 0; |
| 477 | if($sourceFileName !~ /^Library\//) { |
478 | if($sourceFileName !~ /^Library\//) { |
| 478 | $edit_link = CGI::a({href=>$self->systemLink($urlpath->newFromModule("WeBWorK::ContentGenerator::Instructor::PGProblemEditor", |
479 | $edit_link = CGI::a({href=>$self->systemLink($urlpath->newFromModule("WeBWorK::ContentGenerator::Instructor::PGProblemEditor", |
| 479 | courseID =>$urlpath->arg("courseID"), |
480 | courseID =>$urlpath->arg("courseID"), |
| 480 | setID=>"Undefined_Set", |
481 | setID=>"Undefined_Set", |
| 481 | problemID=>"1"), |
482 | problemID=>"1"), |
| 482 | params=>{sourceFilePath => "$sourceFileName"} |
483 | params=>{sourceFilePath => "$sourceFileName", |
|
|
484 | problemSeed=> $problem_seed} |
| 483 | )}, "Edit it" ); |
485 | )}, "Edit it" ); |
| 484 | } |
486 | } |
| 485 | |
487 | |
| 486 | my $try_link = CGI::a({href=>$self->systemLink($urlpath->newFromModule("WeBWorK::ContentGenerator::Problem", |
488 | my $try_link = CGI::a({href=>$self->systemLink($urlpath->newFromModule("WeBWorK::ContentGenerator::Problem", |
| 487 | courseID =>$urlpath->arg("courseID"), |
489 | courseID =>$urlpath->arg("courseID"), |
| 488 | setID=>"Undefined_Set", |
490 | setID=>"Undefined_Set", |
| 489 | problemID=>"1"), |
491 | problemID=>"1"), |
| 490 | params =>{effectiveUser => $self->r->param('user'), |
492 | params =>{effectiveUser => $self->r->param('user'), |
| 491 | editMode => "SetMaker", |
493 | editMode => "SetMaker", |
|
|
494 | problemSeed=> $problem_seed, |
| 492 | sourceFilePath => "$sourceFileName"} )}, "Try it"); |
495 | sourceFilePath => "$sourceFileName"} )}, "Try it"); |
| 493 | |
496 | |
| 494 | my %add_box_data = ( -name=>"trial$cnt",-value=>1,-label=>"Add this problem to the current set on the next update"); |
497 | my %add_box_data = ( -name=>"trial$cnt",-value=>1,-label=>"Add this problem to the current set on the next update"); |
| 495 | if($mark & SUCCESS) { |
498 | if($mark & SUCCESS) { |
| 496 | $add_box_data{ -label } .= " (just added this problem)"; |
499 | $add_box_data{ -label } .= " (just added this problem)"; |