--- loncom/homework/lonhomework.pm 2009/06/09 16:33:55 1.312 +++ loncom/homework/lonhomework.pm 2009/10/20 08:00:36 1.316 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Homework handler # -# $Id: lonhomework.pm,v 1.312 2009/06/09 16:33:55 bisitz Exp $ +# $Id: lonhomework.pm,v 1.316 2009/10/20 08:00:36 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -715,10 +715,10 @@ sub analyze_header { 'onclick="javascript:setmode(this.form,'."'editxml'".')" /> -
+
-
+
'; &Apache::lonxml::add_messages(\$result); @@ -792,7 +792,7 @@ sub analyze { } &Apache::lonhtmlcommon::Update_PrgWin($request,\%prog_state, &mt('Analyzing Results')); - $request->print('
' + $request->print('
' .'

' .&mt('List of possible answers') .'

' @@ -971,7 +971,7 @@ sub editxmlmode { -
+
'.&Apache::lonxml::message_location().' ' . ' @@ -1101,15 +1101,21 @@ sub get_template_list { } my $count = 0; my $currentcategory=''; + my $first = 1; foreach my $file (@files) { next if ($file->[1] !~ /\S/); if ($file->[2] ne $currentcategory) { $currentcategory=$file->[2]; if ((!$seconddiv) && ($count >= $midpoint)) { - $result .= ''."\n".'
'."\n"; + $result .= '
'."\n".'
'."\n"; $seconddiv = 1; + } elsif (!$first) { + $result.='
'."\n"; + } else { + $first = 0; } - $result.='

'.$currentcategory.'

'; + $result.= '
'."\n" + .'

'.$currentcategory.'

'."\n"; $count++; } $result .= @@ -1120,11 +1126,13 @@ sub get_template_list { } my $filename=$file->[0]; $filename=~s/^\/home\/httpd\/html//; - $result.=' '.&mt('Example').'
'."\n"; + $result.=' ' + .''.&mt('Example').'' + .'
'."\n"; $count ++; } if ($numfiles > 0) { - $result .= '
'."\n".''."\n"; + $result .= ''."\n".''."\n"; } return $result; } @@ -1173,19 +1181,18 @@ sub newproblem { .'

'.&mt("Creating a new $extension resource.")."

$errormsg ".&mt("The requested file [_1] currently does not exist.", - ''.$shownurl.'')." -

- -".&mt("To create a new $extension, select a template from the". - " list below. Then click on the \"Create $extension\" button.").' -

'); + ''.$shownurl.'').' +

+'.&mt("To create a new $extension, select a template from the". + " list below. Then click on the \"Create $extension\" button.").' +

'); if (defined($templatelist)) { $request->print($templatelist); } $request->print('
'); - $request->print("

".&Apache::loncommon::end_page()); + $request->print('
'.&Apache::loncommon::end_page()); } return; }