| … | |
… | |
| 619 | |
619 | |
| 620 | print CGI::start_div({class=>"problemFooter"}); |
620 | print CGI::start_div({class=>"problemFooter"}); |
| 621 | |
621 | |
| 622 | # arguments for answer inspection button |
622 | # arguments for answer inspection button |
| 623 | my $prof_url = $ce->{webworkURLs}->{oldProf}; |
623 | my $prof_url = $ce->{webworkURLs}->{oldProf}; |
|
|
624 | my $webworkURL = $ce->{webworkURLs}->{root}; |
| 624 | my $cgi_url = $prof_url; |
625 | my $cgi_url = $prof_url; |
| 625 | $cgi_url=~ s|/[^/]*$||; # clip profLogin.pl |
626 | $cgi_url=~ s|/[^/]*$||; # clip profLogin.pl |
| 626 | my $authen_args = $self->url_authen_args(); |
627 | my $authen_args = $self->url_authen_args(); |
| 627 | my $showPastAnswersURL = "$cgi_url/showPastAnswers.pl"; |
628 | my $showPastAnswersURL = "$webworkURL/$courseName/instructor/show_answers/"; |
| 628 | |
629 | |
| 629 | # print answer inspection button |
630 | # print answer inspection button |
| 630 | if ($self->{permissionLevel} > 0) { |
631 | if ($self->{permissionLevel} > 0) { |
| 631 | print "\n", |
632 | print "\n", |
| 632 | CGI::start_form(-method=>"POST",-action=>$showPastAnswersURL,-target=>"information"),"\n", |
633 | CGI::start_form(-method=>"POST",-action=>$showPastAnswersURL,-target=>"information"),"\n", |
| 633 | $self->hidden_authen_fields,"\n", |
634 | $self->hidden_authen_fields,"\n", |
| 634 | CGI::hidden(-name => 'course', -value=>$courseName), "\n", |
635 | CGI::hidden(-name => 'course', -value=>$courseName), "\n", |
| 635 | CGI::hidden(-name => 'probNum', -value=>$problem->problem_id), "\n", |
636 | CGI::hidden(-name => 'problemNumber', -value=>$problem->problem_id), "\n", |
| 636 | CGI::hidden(-name => 'setNum', -value=>$problem->set_id), "\n", |
637 | CGI::hidden(-name => 'setName', -value=>$problem->set_id), "\n", |
| 637 | CGI::hidden(-name => 'User', -value=>$problem->user_id), "\n", |
638 | CGI::hidden(-name => 'studentUser', -value=>$problem->user_id), "\n", |
| 638 | CGI::p( {-align=>"left"}, |
639 | CGI::p( {-align=>"left"}, |
| 639 | CGI::submit(-name => 'action', -value=>'Show Past Answers') |
640 | CGI::submit(-name => 'action', -value=>'Show Past Answers') |
| 640 | ), "\n", |
641 | ), "\n", |
| 641 | CGI::endform(); |
642 | CGI::endform(); |
| 642 | } |
643 | } |