--- loncom/homework/structuretags.pm 2016/09/14 19:36:30 1.512.2.11
+++ loncom/homework/structuretags.pm 2015/02/23 10:40:01 1.530
@@ -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.11 2016/09/14 19:36:30 raeburn Exp $
+# $Id: structuretags.pm,v 1.530 2015/02/23 10:40:01 droeschl Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -224,55 +224,10 @@ sub end_tex {
}
sub homework_js {
- my ($postsubmit,$timeout);
- if (($env{'request.course.id'}) && ($env{'request.state'} ne 'construct')) {
- my $crstype;
- if (&Apache::loncommon::course_type() eq 'Community') {
- $crstype = 'community';
- } else {
- if ($env{'course.'.$env{'request.course.id'}.'.internal.coursecode'}) {
- $crstype = 'official';
- } elsif ($env{'course.'.$env{'request.course.id'}.'.internal.textbook'}) {
- $crstype = 'textbook';
- } else {
- $crstype = 'unofficial';
- }
- }
- $postsubmit = $env{'course.'.$env{'request.course.id'}.'.internal.postsubmit'};
- if ($postsubmit eq '') {
- my %domdefs = &Apache::lonnet::get_domain_defaults($env{'course.'.$env{'request.course.id'}.'.domain'});
- $postsubmit = $domdefs{'postsubmit'};
- unless ($postsubmit eq 'off') {
- $timeout = $domdefs{$crstype.'postsubtimeout'};
- }
- } elsif ($postsubmit eq '0') {
- $postsubmit = 'off';
- } elsif ($postsubmit eq '1') {
- $postsubmit = 'on';
- $timeout = $env{'course.'.$env{'request.course.id'}.'.internal.postsubtimeout'};
- if ($timeout eq '') {
- my %domdefs = &Apache::lonnet::get_domain_defaults($env{'course.'.$env{'request.course.id'}.'.domain'});
- $timeout = $domdefs{$crstype.'postsubtimeout'};
- }
- }
- if ($timeout eq '') {
- $timeout = 60;
- }
- } else {
- my %domdefs = &Apache::lonnet::get_domain_defaults($env{'request.role.domain'});
- $postsubmit = $domdefs{'postsubmit'};
- unless ($postsubmit eq 'off') {
- $timeout = 60;
- }
- }
- my $jstimeout = 0;
- if ($timeout) {
- $jstimeout = 1000 * $timeout;
- }
return &Apache::loncommon::resize_textarea_js().
- &Apache::loncommon::colorfuleditor_js().
+ &Apache::loncommon::colorfuleditor_js().
&setmode_javascript().
- <<"JS";
+ <<'JS';
';
@@ -803,8 +932,7 @@ sub problem_edit_header {
$(\'.LC_edit_actionbar\').scrollToFixed(
{
fixed: function(){
- //$(this).find(\'.LC_edit_actionbar\').css(\'height\', \'31px\');
- $(this).find(\'.LC_edit_actionbar\');
+ $(this).find(\'.LC_edit_actionbar\').css(\'height\', \'31px\');
}
}
);
@@ -816,7 +944,6 @@ sub problem_edit_header {
return $return;
}
-
sub problem_edit_footer {
my $resource = $env{'request.ambiguous'};
return '
@@ -892,7 +1019,7 @@ sub problem_web_to_edit_header {
".&mt("Problem Type:")."