--- loncom/homework/lonhomework.pm 2007/10/08 09:22:50 1.276 +++ loncom/homework/lonhomework.pm 2007/10/31 17:40:00 1.281 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Homework handler # -# $Id: lonhomework.pm,v 1.276 2007/10/08 09:22:50 foxr Exp $ +# $Id: lonhomework.pm,v 1.281 2007/10/31 17:40:00 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -149,7 +149,7 @@ sub get_target { } elsif ( $env{'form.problemmode'} eq &mt('Edit') || $env{'form.problemmode'} eq 'Edit') { if ( $env{'form.submitted'} eq 'edit' ) { - if ( $env{'form.submit'} eq &mt('Submit Changes and View') ) { + if ( $env{'form.submit'} eq &mt('Save and View') ) { return ('modified','web','answer'); } else { return ('modified','no_output_web','edit'); @@ -398,8 +398,8 @@ sub check_access { if ($env{'request.state'} eq "construct") { if ($env{'form.problemstate'}) { if ($env{'form.problemstate'} =~ /^CANNOT_ANSWER/) { - if ( ! ($env{'form.problemstate'} eq 'CANNOT_ANSWER_correct' && - lc($Apache::lonhomework::problemstatus) eq 'no')) { + if ( ! ($env{'form.problemstate'} eq 'CANNOT_ANSWER_correct' + && &hide_problem_status())) { return ('CANNOT_ANSWER', &mt('is in this state due to author settings.')); } @@ -489,7 +489,7 @@ sub check_access { # if (correct and show prob status) or excused then CANNOT_ANSWER if(($Apache::lonhomework::history{"resource.$id.solved"}=~/^correct/ && - lc($Apache::lonhomework::problemstatus) ne 'no') + &show_problem_status()) || $Apache::lonhomework::history{"resource.$id.solved"}=~/^excused/) { $status = 'CANNOT_ANSWER'; @@ -746,11 +746,14 @@ sub analyze_header {
'. &Apache::structuretags::remember_problem_state().' +
-
+
+ -
+
+
'; &Apache::lonxml::add_messages(\$result); $request->print($result); @@ -823,7 +826,7 @@ sub analyze { } &Apache::lonhtmlcommon::Update_PrgWin($request,\%prog_state, &mt('Analyzing Results')); - $request->print('
'.&mt('List of possible answers').': '); + $request->print('
'.&mt('List of possible answers').': '); foreach my $part (sort(keys(%allparts))) { if (defined(@{ $overall{$part.'.answer'} })) { for (my $i=0;$i'. &Apache::structuretags::remember_problem_state().' - - - - -
- - -
- ' . $xml_help . ' +
+ +
+ '.&mt('Problem Editing').&Apache::loncommon::help_open_topic('Problem_Editor_XML_Index').' + + '.&Apache::loncommon::helpLatexCheatsheet().' +
+
+ + + + +
+
+ + +
+
+ '.&Apache::lonxml::message_location().' +
+ ' . '
- -
'.&Apache::loncommon::end_page(); &Apache::lonxml::add_messages(\$result);