--- loncom/homework/structuretags.pm 2015/03/11 14:50:10 1.512.2.9
+++ loncom/homework/structuretags.pm 2016/09/14 19:36:30 1.512.2.11
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: structuretags.pm,v 1.512.2.9 2015/03/11 14:50:10 raeburn Exp $
+# $Id: structuretags.pm,v 1.512.2.11 2016/09/14 19:36:30 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -270,6 +270,7 @@ sub homework_js {
$jstimeout = 1000 * $timeout;
}
return &Apache::loncommon::resize_textarea_js().
+ &Apache::loncommon::colorfuleditor_js().
&setmode_javascript().
<<"JS";
';
+
+ $return .= '
+
+
';
+ return $return;
}
+
sub problem_edit_footer {
+ my $resource = $env{'request.ambiguous'};
return ' |
'.
"\n\n".&Apache::loncommon::end_page();
@@ -1361,6 +1391,7 @@ sub init_problem_globals {
@Apache::inputtags::importlist = ();
@Apache::inputtags::previous=();
@Apache::inputtags::previous_version=();
+ $Apache::inputtags::leniency='';
$Apache::structuretags::printanswer='No';
@Apache::structuretags::whileconds=();
@Apache::structuretags::whilebody=();
@@ -1376,6 +1407,7 @@ sub reset_problem_globals {
undef(%Apache::lonhomework::history);
undef(%Apache::lonhomework::results);
undef($Apache::inputtags::part);
+ undef($Apache::inputtags::leniency);
if ($type eq 'Task') {
undef($Apache::inputtags::slot_name);
} elsif ($type eq 'problem') {
@@ -2579,6 +2611,7 @@ sub start_part {
my $id= &Apache::lonxml::get_id($parstack,$safeeval);
$Apache::inputtags::part=$id;
push(@Apache::inputtags::partlist,$id);
+ $Apache::inputtags::leniency='';
@Apache::inputtags::response=();
@Apache::inputtags::previous=();
@Apache::inputtags::previous_version=();
@@ -2744,6 +2777,7 @@ sub end_part {
}
pop @Apache::inputtags::status;
$Apache::inputtags::part='';
+ $Apache::inputtags::leniency='';
$Apache::lonhomework::type = $Apache::lonhomework::default_type;
return $result;
}
@@ -2894,7 +2928,8 @@ sub end_startouttext {
if ($target eq 'edit') {
my $areaid = 'homework_edit_'.$Apache::lonxml::curdepth;
$text=&Apache::lonxml::get_all_text("endouttext",$parser,$style);
- $result.=&Apache::edit::start_table($token)."".&mt('Text Block')." | "
+ $result.=&Apache::edit::start_table($token)."
".&Apache::loncommon::insert_folding_button()
+ ." ".&mt('Text Block')." | "
.''.&mt('Delete?').' '
.&Apache::edit::deletelist($target,$token)
.' | '