--- loncom/interface/lonhtmlcommon.pm 2006/05/12 16:45:41 1.128 +++ loncom/interface/lonhtmlcommon.pm 2006/06/01 19:30:49 1.131 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common html routines # -# $Id: lonhtmlcommon.pm,v 1.128 2006/05/12 16:45:41 albertel Exp $ +# $Id: lonhtmlcommon.pm,v 1.131 2006/06/01 19:30:49 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -60,6 +60,8 @@ use Time::Local; use Time::HiRes; use Apache::lonlocal; use Apache::lonnet; +use lib '/home/httpd/lib/perl/'; +use LONCAPA; ############################################## ############################################## @@ -93,7 +95,7 @@ sub authorbombs { sub recent_filename { my $area=shift; - return 'nohist_recent_'.&Apache::lonnet::escape($area); + return 'nohist_recent_'.&escape($area); } sub store_recent { @@ -115,7 +117,7 @@ sub store_recent { } # store new value &Apache::lonnet::put($file,{ $name => - time.'&'.&Apache::lonnet::escape($value) }); + time.'&'.&escape($value) }); } sub remove_recent { @@ -134,7 +136,7 @@ sub select_recent { unless ($_=~/^error\:/) { my $escaped = &Apache::loncommon::escape_url($_); $return.="\n'; } } @@ -158,7 +160,7 @@ sub get_recent { my $idx = 1; foreach (reverse sort keys %time_hash) { $return_hash{$time_hash{$_}} = - &Apache::lonnet::unescape((split(/\&/,$recent{$_}))[1]); + &unescape((split(/\&/,$recent{$_}))[1]); if ($n && ($idx++ >= $n)) {last;} } @@ -818,10 +820,10 @@ sub Create_PrgWin { function openpopwin () { popwin=open(\'\',\'popwin\',\'width=400,height=100\');". "popwin.document.writeln(\'".$start_page. - "

$heading

". - "
". + "

$heading<\/h4>". + "". ''.$end_page. + &mt('Starting').'" /><\\/form>'.$end_page. "\');". "popwin.document.close();}". "\nwindow.setTimeout(openpopwin,0)"); @@ -996,7 +998,7 @@ var checkwin; function spellcheckerwindow() { checkwin=window.open($nothing,'spellcheckwin','height=320,width=280,resizable=yes,scrollbars=yes,location=no,menubar=no,toolbar=no'); - checkwin.document.writeln('$start_page
$end_page'); + checkwin.document.writeln('$start_page
<\\/form>$end_page'); checkwin.document.close(); } // END LON-CAPA Internal --> @@ -1079,7 +1081,7 @@ sub disablelink { if (defined($#fields)) { unless ($#fields>=0) { return ''; } } - return ''.&mt('Disable WYSIWYG Editor').''; + return ''.&mt('Disable WYSIWYG Editor').''; } sub enablelink { @@ -1087,7 +1089,7 @@ sub enablelink { if (defined($#fields)) { unless ($#fields>=0) { return ''; } } - return ''.&mt('Enable WYSIWYG Editor').''; + return ''.&mt('Enable WYSIWYG Editor').''; } # ----------------------------------------- Script to activate only some fields @@ -1430,11 +1432,11 @@ sub course_select_row { |; my $courseform=''.&Apache::loncommon::selectcourse_link ($formname,'pickcourse','pickdomain','coursedesc','',1).''; + $output .= ''.&mt('All courses').'
'; if ($totcodes > 0) { - $output .= ''.&mt('All courses'); my $numtitles = @$codetitles; if ($numtitles > 0) { - $output .= '
'.&mt('Pick courses by category:').'
'; + $output .= ''.&mt('Pick courses by category:').'
'; $output .= '
'.$$codetitles[0].'
'."\n". '