From: dpvc v. a. <we...@ma...> - 2006-01-11 23:04:22
|
Log Message: ----------- Merge to HEAD (remove DPVC comments). Modified Files: -------------- webwork2/lib/WeBWorK/ContentGenerator/Instructor: PGProblemEditor.pm Revision Data ------------- Index: PGProblemEditor.pm =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Instr= uctor/PGProblemEditor.pm,v retrieving revision 1.69 retrieving revision 1.70 diff -Llib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm -Llib/W= eBWorK/ContentGenerator/Instructor/PGProblemEditor.pm -u -r1.69 -r1.70 --- lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm +++ lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm @@ -1,9 +1,7 @@ ########################################################################= ######## # WeBWorK Online Homework Delivery System # Copyright =A9 2000-2003 The WeBWorK Project, http://openwebwork.sf.net= / - # $CVSHeader$ - #=20 # This program is free software; you can redistribute it and/or modify i= t under # the terms of either: (a) the GNU General Public License as published b= y the @@ -494,9 +492,6 @@ =20 my $protected_file =3D not -w $inputFilePath; =20 -## -## DPVC -## my $header =3D CGI::i("Editing problem".CGI::b("set $setName/ problem= $problemNumber</emphasis>").CGI::br()." in file $inputFilePath"); my $file_type =3D $self->{file_type}; my %titles =3D ( problem =3D>CGI::b("set $setName/problem $problemNumber"), @@ -508,9 +503,6 @@ source_path_for_problem_file =3D> " unassigned problem file: ".CGI::b= ("set $setName/problem $problemNumber"), ); my $header =3D CGI::i("Editing $titles{$file_type} in file '".$self->sh= ortPath($inputFilePath)."'"); -## -## /DPVC -## $header =3D ($self->isTempEditFilePath($inputFilePath) ) ? CGI::div({c= lass=3D>'temporaryFile'},$header) : $header; # use colors if temporary f= ile =09 #######################################################################= ## @@ -599,15 +591,15 @@ # Check permissions #next if FORM_PERMS()->{$actionID} and not $authz->hasPermissions($u= ser, FORM_PERMS()->{$actionID}); my $actionForm =3D "${actionID}_form"; - my $newWindow =3D ($actionID =3D~ m/^(view|add_problem|save)$/)? 1: = 0; ## DPVC - my $onChange =3D "setRadio($i,$newWindow)"; ## DPVC + my $newWindow =3D ($actionID =3D~ m/^(view|add_problem|save)$/)? 1: = 0; + my $onChange =3D "setRadio($i,$newWindow)"; ## my $onChange =3D "document.userlist.action[$i].checked=3Dtrue"; my %actionParams =3D $self->getActionParams($actionID); my $line_contents =3D $self->$actionForm($onChange, %actionParams); my $radio_params =3D {-type=3D>"radio", -name=3D>"action", -value=3D= >$actionID}; $radio_params->{checked}=3D1 if ($actionID eq $default_choice) ; - $radio_params->{onclick} =3D "setTarget($newWindow)"; ## DPVC - $radio_params->{id} =3D "action$i"; ## DPVC + $radio_params->{onclick} =3D "setTarget($newWindow)"; + $radio_params->{id} =3D "action$i"; print CGI::Tr({-valign=3D>"top"}, CGI::td({}, CGI::input($radio_params)), CGI::td({}, $line_contents) @@ -615,21 +607,12 @@ =09 $i++; } -# print CGI::Tr({}, CGI::td({-align=3D>"right"}, "Select above then:")= , -# CGI::td({-align=3D>"left"}, CGI::submit(-name=3D>'= submit', -value=3D>"Take Action!")), - ## - ## DPVC - ## my $checkbox =3D CGI::input({-type=3D>"checkbox", -id=3D>"newWindow",= -checked=3D>"checked", -onchange=3D>"updateTarget()"}); $checkbox =3D~ s/\n//; # remove unwanted linebreak print CGI::Tr({}, CGI::td({-colspan=3D>2}, "Select above then:", CGI::submit(-name=3D>'submit', -value=3D>"Take Acti= on!"), - CGI::script("document.write('$checkbox in another window')")) - ## - ## /DPVC - ## - ); + CGI::script("document.write('$checkbox in another window')"))); print CGI::end_table();=09 =09 =09 @@ -1531,18 +1514,6 @@ $shortFilePath =3D~ s|^$templatesDir/||; $shortFilePath =3D '' if $shortFilePath =3D~ m|^/|; # if it is still = an absolute path don't suggest that you save to it. my $allowedActions =3D (defined($setID) && $setID =3D~/\S/ && $setID ne= 'Undefined_Set') ? ['save_a_copy','rename' ] : ['save_a_copy']; -# return CGI::popup_menu(-name=3D>'action.save_as.saveMode', -values=3D= >['rename','save_a_copy'],=20 -# -default=3D>'rename',-labels=3D>{rename=3D>'Rename file path to '= ,save_a_copy=3D>'Create a copy of file at '} -# ). ": [TMPL]/".CGI::textfield(-name=3D>'action.save_as.target_file'= , -size=3D>40, -value=3D>$shortFilePath),; - -## -## DPVC -## - -# return "Save ". -# CGI::popup_menu(-name=3D>'action.save_as.saveMode', -values=3D>['re= name','save_a_copy'],=20 -# -default=3D>'rename',-labels=3D>{rename=3D>' as ',save_a_copy=3D>'= a copy to'} -# ). ": [TMPL]/".CGI::textfield(-name=3D>'action.save_as.target_file',= -size=3D>40, -value=3D>$shortFilePath),; =20 return CGI::popup_menu( -name=3D>'action.save_as.saveMode', -values=3D>$allowedActions= ,=20 @@ -1561,15 +1532,12 @@ # return CGI::popup_menu(-name=3D>'action.save_as.saveMode', -values=3D= >['save_a_copy'],=20 # -default=3D>'save_a_copy',-labels=3D>{save_a_copy=3D>'Save as'}, = -onmousedown=3D>$onChange # ). ": [TMPL]/".CGI::textfield(-name=3D>'action.save_as.target_file'= , -size=3D>40, -value=3D>$shortFilePath) -## -## /DPVC -## } =20 sub save_as_handler { my ($self, $genericParams, $actionParams, $tableParams) =3D @_; #$self->addgoodmessage("save_as_handler called"); - $self->{status_message} =3D ''; ## DPVC -- remove bogus old messages + $self->{status_message} =3D ''; ## DPVC -- remove bogus old messages my $courseName =3D $self->{courseID}; my $setName =3D $self->{setID}; my $problemNumber =3D $self->{problemID}; |