--- loncom/homework/structuretags.pm 2020/06/03 18:40:33 1.512.2.13.2.2 +++ loncom/homework/structuretags.pm 2017/06/21 19:55:00 1.512.2.13.4.1 @@ -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.13.2.2 2020/06/03 18:40:33 raeburn Exp $ +# $Id: structuretags.pm,v 1.512.2.13.4.1 2017/06/21 19:55:00 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -342,12 +342,12 @@ var postsubmit = '$postsubmit'; submithandled = 1; \$( "#msg_"+buttonId ).css({"display": "inline","background-color": "#87cefa", "color": "black","padding": "2px"}) ; - if (( \$(this.form).attr("id") == "LC_page" ) && (\$('input[name="all_submit"]').length )) { + if (( \$(this.form).id == "LC_page" ) && (\$('input[name="all_submit"]').length )) { if (buttonId != "all_submit") { \$( ".LC_status_"+buttonId ).hide(); - } - if (( "#"+buttonId+"_pressed" ).length) { - \$( "#"+buttonId+"_pressed" ).val( "1" ); + if (( "#"+buttonId+"_pressed" ).length) { + \$( "#"+buttonId+"_pressed" ).val( "1" ); + } } } else { \$( ".LC_status_"+buttonId ).hide(); @@ -360,9 +360,11 @@ var postsubmit = '$postsubmit'; if (timeout > 0) { setTimeout(function(){ \$( "#msg_"+buttonId ).css({"display": "none"}); - if (( \$(this.form).attr("id") == "LC_page" ) && (\$('input[name="all_submit"]').length )) { - if (( "#"+buttonId+"_pressed" ).length) { - \$( "#"+buttonId+"_pressed" ).val( "" ); + if (( \$(this.form).id == "LC_page" ) && (\$('input[name="all_submit"]').length )) { + if (buttonId != "all_submit") { + if (( "#"+buttonId+"_pressed" ).length) { + \$( "#"+buttonId+"_pressed" ).val( "" ); + } } } \$( ".LC_hwk_submit" ).prop( "disabled", false);