[system] / trunk / webwork2 / lib / WeBWorK / ContentGenerator / Problem.pm Repository:
ViewVC logotype

Diff of /trunk/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 3625 Revision 3626
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.183 2005/08/25 17:02:28 glarose Exp $ 4# $CVSHeader: webwork2/lib/WeBWorK/ContentGenerator/Problem.pm,v 1.184 2005/08/26 17:30:05 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.
825 ($set->set_id eq 'Undefined_Set'); 825 ($set->set_id eq 'Undefined_Set');
826 if ($authz->hasPermissions($user, "modify_problem_sets")) { 826 if ($authz->hasPermissions($user, "modify_problem_sets")) {
827 my $editorPage = $urlpath->newFromModule("WeBWorK::ContentGenerator::Instructor::PGProblemEditor", 827 my $editorPage = $urlpath->newFromModule("WeBWorK::ContentGenerator::Instructor::PGProblemEditor",
828 courseID => $courseName, setID => $set->set_id, problemID => $problem->problem_id); 828 courseID => $courseName, setID => $set->set_id, problemID => $problem->problem_id);
829 my $editorURL = $self->systemLink($editorPage, params=>$forced_field); 829 my $editorURL = $self->systemLink($editorPage, params=>$forced_field);
830 $editorLink = CGI::a({href=>$editorURL}, "Edit this problem"); 830 $editorLink = CGI::p(CGI::a({href=>$editorURL}, "Edit this problem"));
831 } 831 }
832 832
833 ##### translation errors? ##### 833 ##### translation errors? #####
834 834
835 if ($pg->{flags}->{error_flag}) { 835 if ($pg->{flags}->{error_flag}) {
992 print $self->hidden_authen_fields; 992 print $self->hidden_authen_fields;
993 993
994 print CGI::start_div({class=>"problem"}); 994 print CGI::start_div({class=>"problem"});
995 print CGI::p($pg->{body_text}); 995 print CGI::p($pg->{body_text});
996 print CGI::p(CGI::b("Note: "), CGI::i($pg->{result}->{msg})) if $pg->{result}->{msg}; 996 print CGI::p(CGI::b("Note: "), CGI::i($pg->{result}->{msg})) if $pg->{result}->{msg};
997 print $editorLink; # this is empty unless it is appropriate to have an editor link.
997 print CGI::end_div(); 998 print CGI::end_div();
998 999
999 print CGI::start_p(); 1000 print CGI::start_p();
1000 1001
1001 if ($can{showCorrectAnswers}) { 1002 if ($can{showCorrectAnswers}) {
1149 CGI::submit(-name => 'action', -value=>'Show Past Answers') 1150 CGI::submit(-name => 'action', -value=>'Show Past Answers')
1150 ), "\n", 1151 ), "\n",
1151 CGI::endform(); 1152 CGI::endform();
1152 } 1153 }
1153 1154
1154 # feedback form url 1155 ## feedback form url
1155 my $feedbackPage = $urlpath->newFromModule("WeBWorK::ContentGenerator::Feedback", 1156 #my $feedbackPage = $urlpath->newFromModule("WeBWorK::ContentGenerator::Feedback",
1156 courseID => $courseName); 1157 # courseID => $courseName);
1157 my $feedbackURL = $self->systemLink($feedbackPage, authen => 0); # no authen info for form action 1158 #my $feedbackURL = $self->systemLink($feedbackPage, authen => 0); # no authen info for form action
1158 1159 #
1159 #print feedback form 1160 ##print feedback form
1160 print 1161 #print
1161 CGI::start_form(-method=>"POST", -action=>$feedbackURL),"\n", 1162 # CGI::start_form(-method=>"POST", -action=>$feedbackURL),"\n",
1162 $self->hidden_authen_fields,"\n", 1163 # $self->hidden_authen_fields,"\n",
1163 CGI::hidden("module", __PACKAGE__),"\n", 1164 # CGI::hidden("module", __PACKAGE__),"\n",
1164 CGI::hidden("set", $set->set_id),"\n", 1165 # CGI::hidden("set", $set->set_id),"\n",
1165 CGI::hidden("problem", $problem->problem_id),"\n", 1166 # CGI::hidden("problem", $problem->problem_id),"\n",
1166 CGI::hidden("displayMode", $self->{displayMode}),"\n", 1167 # CGI::hidden("displayMode", $self->{displayMode}),"\n",
1167 CGI::hidden("showOldAnswers", $will{showOldAnswers}),"\n", 1168 # CGI::hidden("showOldAnswers", $will{showOldAnswers}),"\n",
1168 CGI::hidden("showCorrectAnswers", $will{showCorrectAnswers}),"\n", 1169 # CGI::hidden("showCorrectAnswers", $will{showCorrectAnswers}),"\n",
1169 CGI::hidden("showHints", $will{showHints}),"\n", 1170 # CGI::hidden("showHints", $will{showHints}),"\n",
1170 CGI::hidden("showSolutions", $will{showSolutions}),"\n", 1171 # CGI::hidden("showSolutions", $will{showSolutions}),"\n",
1171 CGI::p({-align=>"left"}, 1172 # CGI::p({-align=>"left"},
1172 CGI::submit(-name=>"feedbackForm", -label=>"Email instructor") 1173 # CGI::submit(-name=>"feedbackForm", -label=>"Email instructor")
1173 ), 1174 # ),
1174 CGI::endform(),"\n"; 1175 # CGI::endform(),"\n";
1175 1176
1176 # FIXME print editor link 1177 print $self->feedbackMacro(
1177 print $editorLink; #empty unless it is appropriate to have an editor link. 1178 module => __PACKAGE__,
1179 set => $self->{set}->set_id,
1180 problem => $problem->problem_id,
1181 displayMode => $self->{displayMode},
1182 showOldAnswers => $will{showOldAnswers},
1183 showCorrectAnswers => $will{showCorrectAnswers},
1184 showHints => $will{showHints},
1185 showSolutions => $will{showSolutions},
1186 );
1178 1187
1179 print CGI::end_div(); 1188 print CGI::end_div();
1180 1189
1181 # debugging stuff 1190 # debugging stuff
1182 if (0) { 1191 if (0) {

Legend:
Removed from v.3625  
changed lines
  Added in v.3626

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9