--- loncom/homework/structuretags.pm 2018/12/26 19:40:04 1.562 +++ loncom/homework/structuretags.pm 2019/08/11 12:27:11 1.563 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.562 2018/12/26 19:40:04 raeburn Exp $ +# $Id: structuretags.pm,v 1.563 2019/08/11 12:27:11 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -366,12 +366,12 @@ var postsubmit = '$postsubmit'; submithandled = 1; \$( "#msg_"+buttonId ).css({"display": "inline","background-color": "#87cefa", "color": "black","padding": "2px"}) ; - if (( \$(this.form).id == "LC_page" ) && (\$('input[name="all_submit"]').length )) { + if (( \$(this.form).attr("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(); @@ -384,11 +384,9 @@ var postsubmit = '$postsubmit'; if (timeout > 0) { setTimeout(function(){ \$( "#msg_"+buttonId ).css({"display": "none"}); - if (( \$(this.form).id == "LC_page" ) && (\$('input[name="all_submit"]').length )) { - if (buttonId != "all_submit") { - if (( "#"+buttonId+"_pressed" ).length) { - \$( "#"+buttonId+"_pressed" ).val( "" ); - } + if (( \$(this.form).attr("id") == "LC_page" ) && (\$('input[name="all_submit"]').length )) { + if (( "#"+buttonId+"_pressed" ).length) { + \$( "#"+buttonId+"_pressed" ).val( "" ); } } \$( ".LC_hwk_submit" ).prop( "disabled", false);