version 1.580, 2023/11/17 17:02:21
|
version 1.582, 2023/11/28 04:48:15
|
Line 297 sub homework_js {
|
Line 297 sub homework_js {
|
} |
} |
return &Apache::loncommon::resize_textarea_js(). |
return &Apache::loncommon::resize_textarea_js(). |
&Apache::loncommon::colorfuleditor_js(). |
&Apache::loncommon::colorfuleditor_js(). |
&setmode_javascript(). |
&Apache::lonxml::setmode_javascript(). |
<<"JS"; |
<<"JS"; |
<script type="text/javascript"> |
<script type="text/javascript"> |
// <![CDATA[ |
// <![CDATA[ |
Line 409 var postsubmit = '$postsubmit';
|
Line 409 var postsubmit = '$postsubmit';
|
JS |
JS |
} |
} |
|
|
sub setmode_javascript { |
|
return <<"ENDSCRIPT"; |
|
<script type="text/javascript"> |
|
// <![CDATA[ |
|
function setmode(form,probmode) { |
|
var initial = form.problemmode.value; |
|
form.problemmode.value = probmode; |
|
form.submit(); |
|
form.problemmode.value = initial; |
|
} |
|
// ]]> |
|
</script> |
|
ENDSCRIPT |
|
} |
|
|
|
sub page_start { |
sub page_start { |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$name, |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$name, |
$extra_head)=@_; |
$extra_head)=@_; |
Line 857 sub problem_edit_buttons {
|
Line 842 sub problem_edit_buttons {
|
if ($editors{'edit'}) { |
if ($editors{'edit'}) { |
$result.=&problem_edit_action_button('subedit','edit','e','Edit',1); |
$result.=&problem_edit_action_button('subedit','edit','e','Edit',1); |
} |
} |
|
if ($editors{'daxe'}) { |
|
$result.=&problem_edit_action_button('subdaxe','daxe','w','Edit with Daxe',1); |
|
} |
$result.=&problem_edit_action_button('subundo','undoxml','u','Undo',1); |
$result.=&problem_edit_action_button('subundo','undoxml','u','Undo',1); |
if (&Apache::loncommon::nocodemirror()) { |
if (&Apache::loncommon::nocodemirror()) { |
$result.=&Apache::lonhtmlcommon::dragmath_button("LC_editxmltext",1); |
$result.=&Apache::lonhtmlcommon::dragmath_button("LC_editxmltext",1); |
Line 865 sub problem_edit_buttons {
|
Line 853 sub problem_edit_buttons {
|
if ($editors{'xml'}) { |
if ($editors{'xml'}) { |
$result.=&problem_edit_action_button('subeditxml','editxml','x','EditXML',1); |
$result.=&problem_edit_action_button('subeditxml','editxml','x','EditXML',1); |
} |
} |
|
if ($editors{'daxe'}) { |
|
$result.=&problem_edit_action_button('subdaxe','daxe','w','Edit with Daxe',1); |
|
} |
$result.=&problem_edit_action_button('subundo','undo','u','Undo',1); |
$result.=&problem_edit_action_button('subundo','undo','u','Undo',1); |
} |
} |
$result.="\n</div>"; |
$result.="\n</div>"; |
Line 1078 $show_all
|
Line 1069 $show_all
|
($env{'browser.type'} ne 'explorer' || $env{'browser.version'} > 9)) { |
($env{'browser.type'} ne 'explorer' || $env{'browser.version'} > 9)) { |
my $uri = $env{'request.uri'}; |
my $uri = $env{'request.uri'}; |
my $daxeurl = '/daxepage'.$uri; |
my $daxeurl = '/daxepage'.$uri; |
$result .= '<input type="button" value="'.&mt('Edit with Daxe').'" '. |
$result .= '<input type="button" accesskey="w" value="'.&mt('Edit with Daxe').'" '. |
'onclick="window.open(\''.$daxeurl.'\',\'_blank\');" />'; |
'onclick="javascript:setmode(this.form,'."'daxe'".')" />'; |
} |
} |
$result.=' |
$result.=' |
</div> |
</div> |