--- loncom/homework/lonhomework.pm 2003/02/25 23:18:22 1.110
+++ loncom/homework/lonhomework.pm 2003/03/11 18:43:08 1.115
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Homework handler
#
-# $Id: lonhomework.pm,v 1.110 2003/02/25 23:18:22 albertel Exp $
+# $Id: lonhomework.pm,v 1.115 2003/03/11 18:43:08 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -370,17 +370,23 @@ sub analyze {
my %allparts;
my $rndseed=$ENV{'form.rndseed'};
&analyze_header($request);
+ my %prog_state=
+ &Apache::lonhtmlcommon::Create_PrgWin($request,'Analyze Progress',
+ 'Getting Problem Variants',
+ $ENV{'form.numtoanalyze'});
for(my $i=1;$i<$ENV{'form.numtoanalyze'}+1;$i++) {
+ &Apache::lonhtmlcommon::Increment_PrgWin($request,\%prog_state,
+ 'last problem');
my $subresult=&Apache::lonnet::ssi($request->uri,
('grade_target' => 'analyze'),
('rndseed' => $i));
&Apache::lonxml::debug(":$subresult:");
(my $garbage,$subresult)=split(/_HASH_REF__/,$subresult,2);
my %analyze=&Apache::lonnet::str2hash($subresult);
- $Apache::lonxml::debug=1;
- &Apache::lonhomework::showhash(%analyze);
- $Apache::lonxml::debug=0;
- my @parts = @{ $analyze{'parts'} };
+ my @parts;
+ if (defined(@{ $analyze{'parts'} })) {
+ @parts=@{ $analyze{'parts'} };
+ }
foreach my $part (@parts) {
if (!exists($allparts{$part})) {$allparts{$part}=1;};
if ($analyze{$part.'.type'} eq 'numericalresponse' ||
@@ -391,6 +397,8 @@ sub analyze {
}
}
}
+ &Apache::lonhtmlcommon::Update_PrgWin($request,\%prog_state,
+ 'Analyzing Results');
foreach my $part (keys(%allparts)) {
if (defined(@{ $overall{$part.'.answer'} })) {
$request->print('
Part '.$part.' |
');
@@ -404,6 +412,7 @@ sub analyze {
' is not analyzabale at this time');
}
}
+ &Apache::lonhtmlcommon::Close_PrgWin($request,\%prog_state);
&analyze_footer($request);
&Apache::lonhomework::showhash(%overall);
return $result;
@@ -429,7 +438,15 @@ sub editxmlmode {
&renderpage($request,$file);
} else {
my ($rows,$cols) = &Apache::edit::textarea_sizes(\$problem);
- my $xml_help = Apache::loncommon::help_open_topic("Problem_Editor_XML_Index",'Problem Editing Help');
+ my $xml_help = ''.
+ &Apache::loncommon::help_open_topic("Problem_Editor_XML_Index",'Problem Editing Help')
+ .' | '.
+ &Apache::loncommon::help_open_topic("Greek_Symbols",'Greek Symbols',
+ undef,undef,600)
+ .' | '.
+ &Apache::loncommon::help_open_topic("Other_Symbols",'Other Symbols',
+ undef,undef,600)
+ .' |
';
if ($cols > 80) { $cols = 80; }
if ($cols < 70) { $cols = 70; }
if ($rows < 20) { $rows = 20; }
@@ -475,7 +492,7 @@ sub renderpage {
&Apache::lonxml::debug("Should be parsing now");
$result = &Apache::lonxml::xmlparse($request, $target, $problem,
&setup_vars($target),%mystyle);
-
+ undef($Apache::lonhomework::parsing_a_problem);
#$request->print("Result follows:");
if ($target eq 'modified') {
&handle_save_or_undo($request,\$problem,\$result);
@@ -490,6 +507,7 @@ sub renderpage {
#$result.="
Spent $td seconds processing target $target\n