[LON-CAPA-cvs] cvs: loncom /interface lonwhatsnew.pm

raeburn raeburn at source.lon-capa.org
Thu Nov 29 18:31:13 EST 2012


raeburn		Thu Nov 29 23:31:13 2012 EDT

  Modified files:              
    /loncom/interface	lonwhatsnew.pm 
  Log:
  - Fix some side effects of changes in rev 1.106.
  - Eliminate nested forms.
  - "Counters reset for following problems" now only displayed when
    "Reset counters" button was clicked.
  - Single refpage hidden form element.
  
  
Index: loncom/interface/lonwhatsnew.pm
diff -u loncom/interface/lonwhatsnew.pm:1.108 loncom/interface/lonwhatsnew.pm:1.109
--- loncom/interface/lonwhatsnew.pm:1.108	Thu Oct  4 11:31:58 2012
+++ loncom/interface/lonwhatsnew.pm	Thu Nov 29 23:31:13 2012
@@ -1,5 +1,5 @@
 #
-# $Id: lonwhatsnew.pm,v 1.108 2012/10/04 11:31:58 droeschl Exp $
+# $Id: lonwhatsnew.pm,v 1.109 2012/11/29 23:31:13 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -285,6 +285,11 @@
         $scripttag.='document.visible.submit();
 }
 
+function thresholdreset() {
+    document.visible.command.value="reset";
+    document.visible.submit();
+}
+
 function togglelogins() {
     var total = document.visible.logincount.value;
     var sumrow = document.visible.loginrow.value;
@@ -1663,10 +1668,7 @@
     );
     if (@{$warnings} > 0) {
         @{$warnings} = sort { &cmp_title($a,$b,$res_title) } @{$warnings};
-        $r->print('<form name="reset_tracking" method="post" action="/adm/whatsnew">'.
-                ' <input type="hidden" name="command" value="reset" />'."\n".
-                ' <input type="hidden" name="refpage" value="'.$refpage.'" />'.
-                "\n");
+        $r->print('<input type="hidden" name="command" value="" />'."\n");
         $r->print('<tr class="LC_info_row">'.
 		  '<td class="LC_left_item">'.$lt{'reso'}.'</td>'.
 		  '<td>'.$lt{'part'}.'</td><td>'.$lt{'nust'}.'</td>'.
@@ -1704,7 +1706,7 @@
                 }
             }
         }
-        $r->print('<tr class="LC_info_row"><td colspan="7" class="LC_right_item"><br /><input type="submit" name="counters" value="'.$lt{'rese'}.'" /></td></tr></form>');
+        $r->print('<tr class="LC_info_row"><td colspan="7" class="LC_right_item"><br /><input type="button" name="counters" value="'.$lt{'rese'}.'" onclick="javascript:thresholdreset();" /></td></tr></form>');
     } elsif ($itemserror) {
         $r->print('<tr class="LC_empty_row"><td>'.$itemserror.'</td></tr>');
     } else {




More information about the LON-CAPA-cvs mailing list