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

raeburn raeburn at source.lon-capa.org
Mon Sep 11 08:23:56 EDT 2017


raeburn		Mon Sep 11 12:23:56 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.122 rat/lonpage.pm:1.123
--- rat/lonpage.pm:1.122	Wed Feb 22 22:10:20 2017
+++ rat/lonpage.pm	Mon Sep 11 12:23:55 2017
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Page Handler
 #
-# $Id: lonpage.pm,v 1.122 2017/02/22 22:10:20 raeburn Exp $
+# $Id: lonpage.pm,v 1.123 2017/09/11 12:23:55 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -443,6 +443,8 @@
 				      s/\<((?:input|select|button|textarea)[^\>]+)name\s*\=\s*[\'\"]*([^\'\"]+)[\'\"]*([^\>]*)\>/\<$1 name="$prefix$2" $3\>/gsi;
                                   $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; 
                                   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