[LON-CAPA-cvs] cvs: rat / lonpage.pm

raeburn raeburn at source.lon-capa.org
Mon Sep 11 08:30:55 EDT 2017


raeburn		Mon Sep 11 12:30:55 2017 EDT

  Modified files:              
    /rat	lonpage.pm 
  Log:
  - Support optionresponse using checkboxes instead of select boxes in a
    .page.
  
  
Index: rat/lonpage.pm
diff -u rat/lonpage.pm:1.123 rat/lonpage.pm:1.124
--- rat/lonpage.pm:1.123	Mon Sep 11 12:23:55 2017
+++ rat/lonpage.pm	Mon Sep 11 12:30:55 2017
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Page Handler
 #
-# $Id: lonpage.pm,v 1.123 2017/09/11 12:23:55 raeburn Exp $
+# $Id: lonpage.pm,v 1.124 2017/09/11 12:30:55 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -444,7 +444,7 @@
                                   $output=~
                                       s/\<((?:input|select|button|textarea)[^\>]+)id\s*\=\s*[\'\"]*([^\'\"]+)[\'\"]*([^\>]*)\>/\<$1 id="$idprefix$2" $3\>/gsi;
                                   $output=~
-                                      s/(\Qthis.form.elements['HWVAL_\E)([^']+\'\]\.)(value=|checked)/$1$prefix$2$3/gsi; 
+                                      s/(\Qthis.form.elements['\E)(HW(?:VAL|CHK)_[^']+\'\]\.(?:value=\'|checked))/$1$prefix$2/gsi;
                                   if ($hastimer) {
                                       $output=~
                                           s/\<(input[^\>]+name=\Q"$prefix\Eaccessbutton"[^\>]+)(?:\Qdocument.markaccess.submit();\E)([^\>]*)\>/\<$1pageTimer(this.form,'$prefix')$2\>/gsi;




More information about the LON-CAPA-cvs mailing list