'.&mt('Response').' '.$part.' '. - &mt('is not analyzable at this time').'
'); + $request->print('' + .&mt('Response [_1] is not analyzable at this time.',$part) + .'
' + ); } } if (scalar(keys(%allparts)) == 0 ) { - $request->print(''.&mt('Found no analyzable responses in this problem, currently only Numerical, Formula and String response styles are supported.').'
'); + $request->print('' + .&mt('Found no analyzable responses in this problem.' + .' Currently only Numerical, Formula and String response styles are supported.') + .'
' + ); } &Apache::lonhtmlcommon::Close_PrgWin($request,\%prog_state); &analyze_footer($request); @@ -883,6 +839,7 @@ sub analyze { sub show_problem_status { return ($show_problem_status eq 'yes' + || $show_problem_status eq 'answer' || $show_problem_status eq ''); } @@ -893,6 +850,10 @@ sub analyze { sub show_no_problem_status { return ($show_problem_status eq 'no_feedback_ever'); } + + sub show_answer_problem_status { + return ($show_problem_status eq 'answer'); + } } sub editxmlmode { @@ -900,8 +861,12 @@ sub editxmlmode { my $result; my $problem=&Apache::lonnet::getfile($file); if ($problem eq -1) { - &Apache::lonxml::error(" ".&mt('Unable to find'). - " $file"); + &Apache::lonxml::error( + ' ' + .&mt('Unable to find [_1]', + ''.$file.'') + .''); + $problem=''; } if (defined($env{'form.editxmltext'}) || defined($env{'form.Undo'})) { @@ -910,25 +875,23 @@ sub editxmlmode { if (!$error) { $problem=&Apache::lonnet::getfile($file); } } &Apache::lonhomework::showhashsubset(\%env,'^form'); - if ( $env{'form.submit'} eq &mt('Save and View') ) { + if ( $env{'form.submitbutton'} eq &mt('Save and View') ) { &Apache::lonhomework::showhashsubset(\%env,'^form'); - $env{'form.problemmode'}='View'; + $env{'form.problemmode'}='view'; &renderpage($request,$file); } else { my ($rows,$cols) = &Apache::edit::textarea_sizes(\$problem); - my $xml_help = ''. - &Apache::loncommon::helpLatexCheatsheet("Problem_Editor_XML_Index", - "Problem Editing Help"). - ' | '. - &Apache::loncommon::help_open_menu(undef,undef,5,'Authoring'). - ' |