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

raeburn raeburn at source.lon-capa.org
Wed Feb 19 10:50:56 EST 2014


raeburn		Wed Feb 19 15:50:56 2014 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
  Log:
  - autocomplete set to "off" for text box used to enter CAPTCHA code.
  - third arg returned by &cpatcha_display() is type of captcha in use:
    "original" or "recaptcha".
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1175 loncom/interface/loncommon.pm:1.1176
--- loncom/interface/loncommon.pm:1.1175	Sun Feb 16 22:04:14 2014
+++ loncom/interface/loncommon.pm	Wed Feb 19 15:50:56 2014
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.1175 2014/02/16 22:04:14 raeburn Exp $
+# $Id: loncommon.pm,v 1.1176 2014/02/19 15:50:56 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -14902,7 +14902,7 @@
             $error = 'recaptcha';
         }
     }
-    return ($output,$error);
+    return ($output,$error,$captcha);
 }
 
 sub captcha_response {
@@ -14978,8 +14978,9 @@
         if (-e $Apache::lonnet::perlvar{'lonCaptchaDir'}.'/'.$md5sum.'.png') {
             $output = '<input type="hidden" name="crypt" value="'.$md5sum.'" />'."\n".
                       &mt('Type in the letters/numbers shown below').' '.
-                     '<input type="text" size="5" name="code" value="" /><br />'.
-                     '<img src="'.$captcha_params{'www_output_dir'}.'/'.$md5sum.'.png" alt="captcha" />';
+                      '<input type="text" size="5" name="code" value="" autocomplete="off" />'.
+                      '<br />'.
+                      '<img src="'.$captcha_params{'www_output_dir'}.'/'.$md5sum.'.png" alt="captcha" />';
             last;
         }
     }




More information about the LON-CAPA-cvs mailing list