version 1.278, 2007/10/30 00:17:09
|
version 1.281, 2007/10/31 17:40:00
|
Line 149 sub get_target {
|
Line 149 sub get_target {
|
} elsif ( $env{'form.problemmode'} eq &mt('Edit') || |
} elsif ( $env{'form.problemmode'} eq &mt('Edit') || |
$env{'form.problemmode'} eq 'Edit') { |
$env{'form.problemmode'} eq 'Edit') { |
if ( $env{'form.submitted'} 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'); |
return ('modified','web','answer'); |
} else { |
} else { |
return ('modified','no_output_web','edit'); |
return ('modified','no_output_web','edit'); |
Line 909 sub editxmlmode {
|
Line 909 sub editxmlmode {
|
if (!$error) { $problem=&Apache::lonnet::getfile($file); } |
if (!$error) { $problem=&Apache::lonnet::getfile($file); } |
} |
} |
&Apache::lonhomework::showhashsubset(\%env,'^form'); |
&Apache::lonhomework::showhashsubset(\%env,'^form'); |
if ( $env{'form.submit'} eq &mt('Submit Changes and View') ) { |
if ( $env{'form.submit'} eq &mt('Save and View') ) { |
&Apache::lonhomework::showhashsubset(\%env,'^form'); |
&Apache::lonhomework::showhashsubset(\%env,'^form'); |
$env{'form.problemmode'}='View'; |
$env{'form.problemmode'}='View'; |
&renderpage($request,$file); |
&renderpage($request,$file); |
Line 939 sub editxmlmode {
|
Line 939 sub editxmlmode {
|
|
|
$result.=$start_page. |
$result.=$start_page. |
&renderpage($request,$file,['no_output_web'],1). |
&renderpage($request,$file,['no_output_web'],1). |
&Apache::lonxml::message_location().' |
'<form '.&Apache::edit::form_change_detection().' name="lonhomework" method="POST" action="'. |
<form '.&Apache::edit::form_change_detection().' name="lonhomework" method="POST" action="'. |
|
&HTML::Entities::encode($env{'request.uri'},'<>&"').'">'. |
&HTML::Entities::encode($env{'request.uri'},'<>&"').'">'. |
&Apache::structuretags::remember_problem_state().' |
&Apache::structuretags::remember_problem_state().' |
<div class="LC_edit_problem_editxml_header"> |
<div class="LC_edit_problem_editxml_header"> |
<input type="hidden" name="problemmode" value="'.&mt('EditXML').'" /> |
<table class="LC_edit_problem_header_title"><tr><td> |
<input type="submit" name="problemmode" accesskey="d" value="'.&mt('Discard Edits and View').'" /> |
'.&mt('Problem Editing').&Apache::loncommon::help_open_topic('Problem_Editor_XML_Index').' |
<input type="submit" '.&Apache::edit::submit_ask_anyway().'name="problemmode" accesskey="e" value="'.&mt('Edit').'" /> |
</td><td align="right"> |
<input type="submit" name="Undo" accesskey="u" value="'.&mt('undo').'" /> |
'.&Apache::loncommon::helpLatexCheatsheet().' |
<hr class="LC_edit_problem_divide" /> |
</td></tr> |
<input type="submit" name="submit" accesskey="s" value="'.&mt('Submit Changes').'" /> |
</table> |
<input type="submit" name="submit" accesskey="v" value="'.&mt('Submit Changes and View').'" /> |
<div class="LC_edit_problem_discards"> |
<hr class="LC_edit_problem_divide" /> |
<input type="hidden" name="problemmode" value="'.&mt('EditXML').'" /> |
|
<input type="submit" name="problemmode" accesskey="d" value="'.&mt('Discard Edits and View').'" /> |
|
<input type="submit" '.&Apache::edit::submit_ask_anyway().'name="problemmode" accesskey="e" value="'.&mt('Edit').'" /> |
|
<input type="submit" name="Undo" accesskey="u" value="'.&mt('undo').'" /> |
|
</div> |
|
<div class="LC_edit_problem_saves"> |
|
<input type="submit" name="submit" accesskey="s" value="'.&mt('Save').'" /> |
|
<input type="submit" name="submit" accesskey="v" value="'.&mt('Save and View').'" /> |
|
</div> |
|
<hr class="LC_edit_problem_divide" /> |
|
'.&Apache::lonxml::message_location().' |
</div> |
</div> |
' . $xml_help . ' |
' . ' |
<textarea '.&Apache::edit::element_change_detection(). |
<textarea '.&Apache::edit::element_change_detection(). |
' rows="'.$rows.'" cols="'.$cols.'" style="width:100%" '. |
' rows="'.$rows.'" cols="'.$cols.'" style="width:100%" '. |
' name="editxmltext" id="LC_editxmltext">'. |
' name="editxmltext" id="LC_editxmltext">'. |
&HTML::Entities::encode($problem,'<>&"').'</textarea> |
&HTML::Entities::encode($problem,'<>&"').'</textarea> |
<div id="LC_aftertextarea"> |
<div id="LC_aftertextarea"> |
<input type="submit" name="submit" accesskey="s" value="'.&mt('Submit Changes').'" /> |
|
<input type="submit" name="submit" accesskey="v" value="'.&mt('Submit Changes and View').'" /> |
|
</div> |
</div> |
</form>'.&Apache::loncommon::end_page(); |
</form>'.&Apache::loncommon::end_page(); |
&Apache::lonxml::add_messages(\$result); |
&Apache::lonxml::add_messages(\$result); |