--- loncom/interface/loncommon.pm 2012/01/03 22:36:36 1.1049 +++ loncom/interface/loncommon.pm 2013/01/09 16:33:56 1.1075.2.27 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.1049 2012/01/03 22:36:36 www Exp $ +# $Id: loncommon.pm,v 1.1075.2.27 2013/01/09 16:33:56 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -67,9 +67,13 @@ use Apache::lonhtmlcommon(); use Apache::loncoursedata(); use Apache::lontexconvert(); use Apache::lonclonecourse(); +use Apache::lonuserutils(); +use Apache::lonuserstate(); use LONCAPA qw(:DEFAULT :match); use DateTime::TimeZone; use DateTime::Locale::Catalog; +use Authen::Captcha; +use Captcha::reCAPTCHA; # ---------------------------------------------- Designs use vars qw(%defaultdesign); @@ -885,10 +889,14 @@ sub check_uncheck_jscript { function checkAll(field) { if (field.length > 0) { for (i = 0; i < field.length; i++) { - field[i].checked = true ; + if (!field[i].disabled) { + field[i].checked = true; + } } } else { - field.checked = true + if (!field.disabled) { + field.checked = true; + } } } @@ -1374,7 +1382,7 @@ function helpMenu(target) { return; } function writeHelp(caller) { - caller.document.writeln('$start_page $end_page') + caller.document.writeln('$start_page\\n\\n\\n$end_page') caller.document.close() caller.focus() } @@ -1748,6 +1756,7 @@ Inputs: $workbook Returns: $format, a hash reference. + =cut ############################################################### @@ -1980,19 +1989,112 @@ sub select_form { # For display filters sub display_filter { + my ($context) = @_; if (!$env{'form.show'}) { $env{'form.show'}=10; } if (!$env{'form.displayfilter'}) { $env{'form.displayfilter'}='currentfolder'; } - return '