| … | |
… | |
| 1122 | #$self->addbadmessage($problemRecord->toString()); |
1122 | #$self->addbadmessage($problemRecord->toString()); |
| 1123 | |
1123 | |
| 1124 | |
1124 | |
| 1125 | my $editProblemPage = $urlpath->new(type => 'instructor_problem_editor_withset_withproblem', args => { courseID => $courseID, setID => $setID, problemID => $problemID }); |
1125 | my $editProblemPage = $urlpath->new(type => 'instructor_problem_editor_withset_withproblem', args => { courseID => $courseID, setID => $setID, problemID => $problemID }); |
| 1126 | my $editProblemLink = $self->systemLink($editProblemPage, params => { make_local_copy => 0 }); |
1126 | my $editProblemLink = $self->systemLink($editProblemPage, params => { make_local_copy => 0 }); |
| 1127 | |
1127 | |
|
|
1128 | |
| 1128 | # FIXME: should we have an "act as" type link here when editing for multiple users? |
1129 | # FIXME: should we have an "act as" type link here when editing for multiple users? |
| 1129 | my $viewProblemPage = $urlpath->new(type => 'problem_detail', args => { courseID => $courseID, setID => $setID, problemID => $problemID }); |
1130 | my $viewProblemPage = $urlpath->new(type => 'problem_detail', args => { courseID => $courseID, setID => $setID, problemID => $problemID }); |
| 1130 | my $viewProblemLink = $self->systemLink($viewProblemPage, params => { effectiveUser => ($forOneUser ? $editForUser[0] : $userID)}); |
1131 | my $viewProblemLink = $self->systemLink($viewProblemPage, params => { effectiveUser => ($forOneUser ? $editForUser[0] : $userID)}); |
| 1131 | |
1132 | |
| 1132 | my @fields = @{ PROBLEM_FIELDS() }; |
1133 | my @fields = @{ PROBLEM_FIELDS() }; |
| … | |
… | |
| 1189 | ) . |
1190 | ) . |
| 1190 | ($repeatFile ? CGI::div({class=>"ResultsWithError", style=>"font-weight: bold"}, $repeatFile) : ''), |
1191 | ($repeatFile ? CGI::div({class=>"ResultsWithError", style=>"font-weight: bold"}, $repeatFile) : ''), |
| 1191 | ])); |
1192 | ])); |
| 1192 | } |
1193 | } |
| 1193 | |
1194 | |
|
|
1195 | my $editNewProblemPage = $urlpath->new(type => 'instructor_problem_editor_withset_withproblem', args => { courseID => $courseID, setID => $setID, problemID =>'new_problem' }); |
|
|
1196 | my $editNewProblemLink = $self->systemLink($editNewProblemPage, params => { make_local_copy => 1, file_type => 'blank_problem' }); |
|
|
1197 | |
|
|
1198 | # print final lines |
| 1194 | print CGI::end_table(); |
1199 | print CGI::end_table(); |
| 1195 | print CGI::checkbox({ |
1200 | print CGI::checkbox({ |
| 1196 | label=> "Force problems to be numbered consecutively from one", |
1201 | label=> "Force problems to be numbered consecutively from one", |
| 1197 | name=>"force_renumber", value=>"1"}), |
1202 | name=>"force_renumber", value=>"1"}), |
| 1198 | |
1203 | |
| 1199 | CGI::br(); |
1204 | CGI::br(); |
| 1200 | print CGI::input({type=>"submit", name=>"submit_changes", value=>"Save Changes"}); |
1205 | print CGI::input({type=>"submit", name=>"submit_changes", value=>"Save Changes"}); |
| 1201 | print CGI::input({type=>"submit", name=>"handle_numbers", value=>"Reorder problems only"}) . "(Any unsaved changes will be lost.)"; |
1206 | print CGI::input({type=>"submit", name=>"handle_numbers", value=>"Reorder problems only"}) . "(Any unsaved changes will be lost.)"; |
|
|
1207 | print CGI::p( CGI::a({href=>$editNewProblemLink},'Create'). 'a new blank problem'); |
| 1202 | print CGI::p(<<HERE); |
1208 | print CGI::p(<<HERE); |
| 1203 | Any time problem numbers are intentionally changed, the problems will |
1209 | Any time problem numbers are intentionally changed, the problems will |
| 1204 | always be renumbered consecutively, starting from one. When deleting |
1210 | always be renumbered consecutively, starting from one. When deleting |
| 1205 | problems, gaps will be left in the numbering unless the box above is |
1211 | problems, gaps will be left in the numbering unless the box above is |
| 1206 | checked. |
1212 | checked. |