--- loncom/homework/structuretags.pm 2012/04/05 09:49:51 1.503 +++ loncom/homework/structuretags.pm 2014/09/14 15:21:43 1.520 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.503 2012/04/05 09:49:51 foxr Exp $ +# $Id: structuretags.pm,v 1.520 2014/09/14 15:21:43 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -254,6 +254,32 @@ function image_response_click (which, e) input_element.value = click; img_element.src = '/adm/randomlabel.png?token='+token+'&clickdata='+click; } + +var submithandled = 0; + +$(document).ready(function(){ + $(document).delegate('form :submit', 'click', function( event ) { + if ( $( this ).hasClass( "LC_hwk_submit" ) ) { + var buttonId = this.id; + if (submithandled == 0) { + submithandled = 1; + $( "#msg_"+buttonId ).css({"display": "inline","background-color": "#87cefa", + "color": "black","padding": "2px"}) ; + $( ".LC_status_"+buttonId ).hide(); + if (( $(this.form).id == "LC_page" ) && ($('input[name="all_submit"]').length )) { + if (( "#"+buttonId+"_pressed" ).length) { + $( "#"+buttonId+"_pressed" ).val( "1" ); + } + } + $(this.form).submit(); + $( this ).attr( "disabled", true); + event.preventDefault(); + return true; + } + } + }); +}); + // ]]> JS @@ -379,10 +405,10 @@ sub page_start { } elsif (!defined($found{'body'}) && $env{'request.state'} eq 'construct') { if ($target eq 'web' || $target eq 'edit') { - # Breadcrumbs for Construction Space + # Breadcrumbs for Authoring Space &Apache::lonhtmlcommon::clear_breadcrumbs(); &Apache::lonhtmlcommon::add_breadcrumb({ - 'text' => 'Construction Space', + 'text' => 'Authoring Space', 'href' => &Apache::loncommon::authorspace($env{'request.uri'}), }); # breadcrumbs (and tools) will be created @@ -414,6 +440,8 @@ sub page_start { $body_args{'add_entries'} = \%add_entries; if ( $env{'request.state'} eq 'construct') { $body_args{'only_body'} = 1; + } elsif ($target eq 'web') { + $body_args{'print_suppress'} = 1; } } $body_args{'no_auto_mt_title'} = 1; @@ -453,7 +481,6 @@ sub page_start { } $form_tag_start.='>'."\n"; - my $symb=&Apache::lonnet::symbread(); if ($symb =~ /\S/) { $symb= &HTML::Entities::encode(&Apache::lonenc::check_encrypt($symb)); @@ -638,7 +665,7 @@ sub problem_edit_header { '.&Apache::lonxml::message_location().' '. - '
$lt{'warning'}
'.&mt('Once you click the "Show Resource" button below you have [_2] to complete all resources "[_1]".' + ,$foldertitle,$time)."
'.&mt('Once you click the "Show Resource" button below you have [_2] to complete all resources "[_1]".' + ,$course,$time)."
'.&mt('Once you click the "Show Resource" button below you have [_2] to complete this resource "[_1]".' + ,$title,$time)."
'.&mt('Unable to determine if this resource is open due to network problems. Please try again later.').'
'.&mt('You are not currently signed up to work at this time and/or place.').'
'.&mt('Access requires reservation to work at specific time/place.').'
'.&mt('Not open to be viewed').'