version 1.421, 2008/05/27 22:25:56
|
version 1.426, 2008/08/04 22:42:11
|
Line 148 sub page_start {
|
Line 148 sub page_start {
|
|
|
$extra_head .= &homework_js(); |
$extra_head .= &homework_js(); |
|
|
|
unless ($env{'environment.wysiwygeditor'} eq 'on') { |
|
$extra_head .= &Apache::lonhtmlcommon::dragmath_js(); |
|
} |
|
|
my %body_args; |
my %body_args; |
if (defined($found{'html'})) { |
if (defined($found{'html'})) { |
$body_args{'skip_phases'}{'head'}=1; |
$body_args{'skip_phases'}{'head'}=1; |
Line 312 sub remember_problem_state {
|
Line 316 sub remember_problem_state {
|
<input type="hidden" name="problemstatus" value="'.$env{'form.problemstatus'}.'" />'; |
<input type="hidden" name="problemstatus" value="'.$env{'form.problemstatus'}.'" />'; |
} |
} |
|
|
sub problem_edit_header { |
sub problem_edit_buttons { |
return '<input type="hidden" name="submitted" value="edit" />'. |
return ' |
&Apache::structuretags::remember_problem_state().' |
|
<div class="LC_edit_problem_header"> |
|
<div class="LC_edit_problem_header_title"> |
|
'.&mt('Problem Editing').&Apache::loncommon::help_open_menu('Problem Editing','Problem_Editor_XML_Index',5,'Authoring').' |
|
</div> |
|
<div class="LC_edit_problem_discards"> |
<div class="LC_edit_problem_discards"> |
<input type="hidden" name="problemmode" value="edit" /> |
|
<input type="button" name="submitmode" accesskey="d" value="'.&mt('Discard Edits and View').'" '. |
<input type="button" name="submitmode" accesskey="d" value="'.&mt('Discard Edits and View').'" '. |
' onclick="javscript:setmode(this.form,'."'discard.'".')" /> |
' onclick="javscript:setmode(this.form,'."'discard'".')" /> |
<input '.&Apache::edit::submit_ask_anyway('setmode(this.form,'."'editxml'".')').' type="button" name="submitmode" accesskey="x" value="'.&mt('EditXML').'" /> |
<input '.&Apache::edit::submit_ask_anyway('setmode(this.form,'."'editxml'".')').' type="button" name="submitmode" accesskey="x" value="'.&mt('EditXML').'" /> |
<input type="submit" name="Undo" accesskey="u" value="'.&mt('undo').'" /> |
<input type="submit" name="Undo" accesskey="u" value="'.&mt('undo').'" /> |
</div> |
</div> |
<div class="LC_edit_problem_saves"> |
<div class="LC_edit_problem_saves"> |
<input type="submit" name="submitbutton" accesskey="s" value="'.&mt('Save and Edit').'" /> |
<input type="submit" name="submitbutton" accesskey="s" value="'.&mt('Save and Edit').'" /> |
<input type="submit" name="submitbutton" accesskey="v" value="'.&mt('Save and View').'" /> |
<input type="submit" name="submitbutton" accesskey="v" value="'.&mt('Save and View').'" /> |
</div> |
</div>'; |
|
} |
|
|
|
sub problem_edit_header { |
|
return '<input type="hidden" name="submitted" value="edit" /><input type="hidden" name="problemmode" value="edit" />'. |
|
&Apache::structuretags::remember_problem_state().' |
|
<div class="LC_edit_problem_header"> |
|
<div class="LC_edit_problem_header_title"> |
|
'.&mt('Problem Editing').&Apache::loncommon::help_open_menu('Problem Editing','Problem_Editor_XML_Index',5,'Authoring').' |
|
</div>'. |
|
&problem_edit_buttons().' |
<hr class="LC_edit_problem_divide" /> |
<hr class="LC_edit_problem_divide" /> |
'.&Apache::lonxml::message_location().' |
'.&Apache::lonxml::message_location().' |
</div> |
</div> |
Line 340 sub problem_edit_header {
|
Line 348 sub problem_edit_header {
|
sub problem_edit_footer { |
sub problem_edit_footer { |
return '</td></tr></table><br /> |
return '</td></tr></table><br /> |
<div class="LC_edit_problem_footer"> |
<div class="LC_edit_problem_footer"> |
<hr class="LC_edit_problem_divide" /> |
<hr class="LC_edit_problem_divide" />'. |
<div class="LC_edit_problem_discards"> |
&problem_edit_buttons().' |
<input type="button" name="submitmode" accesskey="d" value="'.&mt('Discard Edits and View').'" '. |
|
'onclick=javascript:setmode(this.form,'."'discard'".')" /> |
|
<input '.&Apache::edit::submit_ask_anyway('setmode(this.form,'."'editxml'".')').' type="button" name="submitmode" accesskey="x" value="'.&mt('EditXML').'" /> |
|
<input type="submit" name="Undo" accesskey="u" value="'.&mt('undo').'" /> |
|
</div> |
|
<div class="LC_edit_problem_saves"> |
|
<input type="submit" name="submitbutton" value="'.&mt('Save and Edit').'" /> |
|
<input type="submit" name="submitbutton" value="'.&mt('Save and View').'" /> |
|
</div> |
|
<hr class="LC_edit_problem_divide" /> |
<hr class="LC_edit_problem_divide" /> |
</div> |
</div> |
'. |
'. |
Line 451 $show_all
|
Line 450 $show_all
|
$show_all |
$show_all |
"; |
"; |
} |
} |
my %langchoices=('' => ''); |
|
foreach (&Apache::loncommon::languageids()) { |
|
if (&Apache::loncommon::supportedlanguagecode($_)) { |
|
$langchoices{&Apache::loncommon::supportedlanguagecode($_)} |
|
= &Apache::loncommon::plainlanguagedescription($_); |
|
} |
|
} |
|
$result.=' |
$result.=' |
<span class="LC_nobreak"> |
<span class="LC_nobreak"> |
'.&mt('Apply style file: ').' |
'.&mt('Apply style file: ').' |
<input type="text" name="style_file" value="'.&HTML::Entities::encode($env{'construct.style'},'"<>&').'" /> |
<input type="text" name="style_file" value="'.&HTML::Entities::encode($env{'construct.style'},'"<>&').'" /> |
<a href="javascript:openbrowser(\'lonhomework\',\'style_file\',\'sty\')">'.&mt('Select').'</a> |
<a href="javascript:openbrowser(\'lonhomework\',\'style_file\',\'sty\')">'.&mt('Select').'</a> |
</span> |
</span> |
</div><div class="LC_edit_problem_header_row1"> |
</div> |
<span class="LC_nobreak">'. |
<div class="LC_edit_problem_header_row1">'. |
&mt('Language: '). |
&Apache::lonxml::renderingoptions().' |
&Apache::loncommon::select_form($env{'form.languages'},'languages', |
|
%langchoices).' |
|
</span> |
|
<span class="LC_nobreak">'. |
|
&mt('Math Rendering: '). |
|
&Apache::loncommon::select_form($env{'form.texengine'},'texengine', |
|
('' => '', |
|
'tth' => 'tth', |
|
'jsMath' => 'jsMath', |
|
'mimetex' => 'mimetex')).' |
|
</span> |
|
</div> |
</div> |
<input type="submit" name="changeproblemmode" value="'.&mt("Change View").'" /> |
<input type="submit" name="changeproblemmode" value="'.&mt("Change View").'" /> |
<input type="submit" name="clear_style_file" accesskey="d" value="'.&mt('Show Default View').'" /> |
<input type="submit" name="clear_style_file" accesskey="d" value="'.&mt('Show Default View').'" /> |
Line 1893 sub end_startouttext {
|
Line 1874 sub end_startouttext {
|
my $text=''; |
my $text=''; |
|
|
if ($target eq 'edit') { |
if ($target eq 'edit') { |
|
my $areaid = 'homework_edit_'.$Apache::lonxml::curdepth; |
$text=&Apache::lonxml::get_all_text("endouttext",$parser,$style); |
$text=&Apache::lonxml::get_all_text("endouttext",$parser,$style); |
$result.=&Apache::edit::start_table($token)."<tr><td>".&mt('Text Block')."</td> |
$result.=&Apache::edit::start_table($token)."<tr><td>".&mt('Text Block')."</td> |
<td>".&mt('Delete:'). |
<td>".&mt('Delete:'). |
&Apache::edit::deletelist($target,$token) |
&Apache::edit::deletelist($target,$token) |
."</td> |
."</td>"; |
<td>". |
unless ($env{'environment.wysiwygeditor'} eq 'on') { |
&Apache::edit::insertlist($target,$token). |
$result.='<td align="left">' |
'</td><td align="right" valign="top">' . |
.&Apache::lonhtmlcommon::dragmath_button($areaid,1) |
|
.'</td>'; |
|
} |
|
$result.='<td align="right" valign="top">' . |
&Apache::loncommon::helpLatexCheatsheet(). |
&Apache::loncommon::helpLatexCheatsheet(). |
&Apache::edit::end_row(). |
&Apache::edit::end_row(). |
&Apache::edit::start_spanning_row()."\n". |
&Apache::edit::start_spanning_row()."\n". |