[LON-CAPA-cvs] cvs: rat / lonpage.pm loncom/homework structuretags.pm
raeburn
raeburn at source.lon-capa.org
Tue Sep 16 09:28:35 EDT 2014
raeburn Tue Sep 16 13:28:35 2014 EDT
Modified files:
/loncom/homework structuretags.pm
/rat lonpage.pm
Log:
Bug 6470
- Eliminate multiple submissions of the same response item.
- Pressing "Submit All" button on composite page (i.e., .page) causes
all submit buttons to become disabled and input textboxes to be readonly.
- Text: "Processing ... " displayed.
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.521 loncom/homework/structuretags.pm:1.522
--- loncom/homework/structuretags.pm:1.521 Mon Sep 15 17:45:35 2014
+++ loncom/homework/structuretags.pm Tue Sep 16 13:28:30 2014
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: structuretags.pm,v 1.521 2014/09/15 17:45:35 raeburn Exp $
+# $Id: structuretags.pm,v 1.522 2014/09/16 13:28:30 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -283,11 +283,15 @@
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" );
+ if (buttonId != "all_submit") {
+ $( ".LC_status_"+buttonId ).hide();
+ if (( "#"+buttonId+"_pressed" ).length) {
+ $( "#"+buttonId+"_pressed" ).val( "1" );
+ }
}
+ } else {
+ $( ".LC_status_"+buttonId ).hide();
}
$(this.form).submit();
$( ".LC_hwk_submit" ).prop( "disabled", true);
@@ -299,7 +303,6 @@
});
});
-
// ]]>
</script>
JS
Index: rat/lonpage.pm
diff -u rat/lonpage.pm:1.105 rat/lonpage.pm:1.106
--- rat/lonpage.pm:1.105 Sun Sep 14 15:21:47 2014
+++ rat/lonpage.pm Tue Sep 16 13:28:34 2014
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Page Handler
#
-# $Id: lonpage.pm,v 1.105 2014/09/14 15:21:47 raeburn Exp $
+# $Id: lonpage.pm,v 1.106 2014/09/16 13:28:34 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -573,9 +573,15 @@
}
# ---------------------------------------------------------------- Submit, etc.
if ($nforms) {
+ my $class;
+ if ($nforms > 1) {
+ $class = ' class="LC_hwk_submit"';
+ }
$r->print(
'<input name="all_submit" value="'.&mt('Submit All').'" type="'.
- (($nforms>1)?'submit':'hidden').'"></input></form>');
+ (($nforms>1)?'submit':'hidden').'"'.$class.' id="all_submit" />'.
+ '<div id="msg_all_submit" style="display:none">'.
+ &mt('Processing your submission ...').'</div></form>');
}
unless (($target eq 'tex') || ($target eq 'tex_answer')) {
$r->print(&Apache::loncommon::end_page({'discussion'
More information about the LON-CAPA-cvs
mailing list