From: Sam H. v. a. <we...@ma...> - 2005-09-16 18:49:57
|
Log Message: ----------- use new feedbackMacro() Modified Files: -------------- webwork2/lib/WeBWorK/ContentGenerator: ProblemSet.pm ProblemSets.pm Revision Data ------------- Index: ProblemSets.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/ProblemSets.pm,v retrieving revision 1.62 retrieving revision 1.63 diff -Llib/WeBWorK/ContentGenerator/ProblemSets.pm -Llib/WeBWorK/ContentGenerator/ProblemSets.pm -u -r1.62 -r1.63 --- lib/WeBWorK/ContentGenerator/ProblemSets.pm +++ lib/WeBWorK/ContentGenerator/ProblemSets.pm @@ -221,26 +221,37 @@ print CGI::p(CGI::submit("hardcopy", "Download Hardcopy for Selected Set$pl")); print CGI::endform(); - # feedback form url - my $feedbackPage = $urlpath->newFromModule("WeBWorK::ContentGenerator::Feedback", courseID => $courseName); - my $feedbackURL = $self->systemLink($feedbackPage, authen => 0); # no authen info for form action - - #print feedback form - print - CGI::start_form(-method=>"POST", -action=>$feedbackURL),"\n", - $self->hidden_authen_fields,"\n", - CGI::hidden("module", __PACKAGE__),"\n", - CGI::hidden("set", ''),"\n", - CGI::hidden("problem", ''),"\n", - CGI::hidden("displayMode", ''),"\n", - CGI::hidden("showOldAnswers", ''),"\n", - CGI::hidden("showCorrectAnswers", ''),"\n", - CGI::hidden("showHints", ''),"\n", - CGI::hidden("showSolutions", ''),"\n", - CGI::p({-align=>"left"}, - CGI::submit(-name=>"feedbackForm", -label=>"Email instructor") - ), - CGI::endform(),"\n"; + ## feedback form url + #my $feedbackPage = $urlpath->newFromModule("WeBWorK::ContentGenerator::Feedback", courseID => $courseName); + #my $feedbackURL = $self->systemLink($feedbackPage, authen => 0); # no authen info for form action + # + ##print feedback form + #print + # CGI::start_form(-method=>"POST", -action=>$feedbackURL),"\n", + # $self->hidden_authen_fields,"\n", + # CGI::hidden("module", __PACKAGE__),"\n", + # CGI::hidden("set", ''),"\n", + # CGI::hidden("problem", ''),"\n", + # CGI::hidden("displayMode", ''),"\n", + # CGI::hidden("showOldAnswers", ''),"\n", + # CGI::hidden("showCorrectAnswers", ''),"\n", + # CGI::hidden("showHints", ''),"\n", + # CGI::hidden("showSolutions", ''),"\n", + # CGI::p({-align=>"left"}, + # CGI::submit(-name=>"feedbackForm", -label=>"Email instructor") + # ), + # CGI::endform(),"\n"; + + print $self->feedbackMacro( + module => __PACKAGE__, + set => "", + problem => "", + displayMode => "", + showOldAnswers => "", + showCorrectAnswers => "", + showHints => "", + showSolutions => "", + ); return ""; } Index: ProblemSet.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/ProblemSet.pm,v retrieving revision 1.66 retrieving revision 1.67 diff -Llib/WeBWorK/ContentGenerator/ProblemSet.pm -Llib/WeBWorK/ContentGenerator/ProblemSet.pm -u -r1.66 -r1.67 --- lib/WeBWorK/ContentGenerator/ProblemSet.pm +++ lib/WeBWorK/ContentGenerator/ProblemSet.pm @@ -318,17 +318,18 @@ print CGI::p("This homework set contains no problems."); } - ## feedback form - #my $ce = $self->{ce}; - #my $root = $ce->{webworkURLs}->{root}; - #my $courseName = $ce->{courseName}; - #my $feedbackURL = "$root/$courseName/feedback/"; + ## feedback form url + #my $feedbackPage = $urlpath->newFromModule("WeBWorK::ContentGenerator::Feedback", + # courseID => $courseID); + #my $feedbackURL = $self->systemLink($feedbackPage, authen => 0); # no authen info for form action + # + ##print feedback form #print # CGI::start_form(-method=>"POST", -action=>$feedbackURL),"\n", # $self->hidden_authen_fields,"\n", # CGI::hidden("module", __PACKAGE__),"\n", # CGI::hidden("set", $self->{set}->set_id),"\n", - # CGI::hidden("problem", ""),"\n", + # CGI::hidden("problem", ''),"\n", # CGI::hidden("displayMode", $self->{displayMode}),"\n", # CGI::hidden("showOldAnswers", ''),"\n", # CGI::hidden("showCorrectAnswers", ''),"\n", @@ -339,27 +340,16 @@ # ), # CGI::endform(),"\n"; - # feedback form url - my $feedbackPage = $urlpath->newFromModule("WeBWorK::ContentGenerator::Feedback", - courseID => $courseID); - my $feedbackURL = $self->systemLink($feedbackPage, authen => 0); # no authen info for form action - - #print feedback form - print - CGI::start_form(-method=>"POST", -action=>$feedbackURL),"\n", - $self->hidden_authen_fields,"\n", - CGI::hidden("module", __PACKAGE__),"\n", - CGI::hidden("set", $self->{set}->set_id),"\n", - CGI::hidden("problem", ''),"\n", - CGI::hidden("displayMode", $self->{displayMode}),"\n", - CGI::hidden("showOldAnswers", ''),"\n", - CGI::hidden("showCorrectAnswers", ''),"\n", - CGI::hidden("showHints", ''),"\n", - CGI::hidden("showSolutions", ''),"\n", - CGI::p({-align=>"left"}, - CGI::submit(-name=>"feedbackForm", -label=>"Email instructor") - ), - CGI::endform(),"\n"; + print $self->feedbackMacro( + module => __PACKAGE__, + set => $self->{set}->set_id, + problem => "", + displayMode => $self->{displayMode}, + showOldAnswers => "", + showCorrectAnswers => "", + showHints => "", + showSolutions => "", + ); return ""; } |