';
+ $result.= ''."\n";
}
return $result;
}
@@ -295,18 +302,19 @@ sub add_request_another_attempt_button {
my $description=&Apache::slotrequest::get_description($slot_name,
$slot);
$result.=(< Will be next available: $description
+
Will be next available: $description
STUFF
}
if ($env{'request.enc'}) { $symb=&Apache::lonenc::encrypted($symb); }
$symb=&escape($symb);
- $result.='';
+ &mt($text).'" />'."\n\t".
+ ''."\n";
return $result;
}
@@ -584,7 +592,7 @@ sub start_Task {
$result.='";
+ $result.=$uri.'">'.&add_grading_button()."\n";
my $symb=&Apache::lonnet::symbread();
if (&Apache::lonnet::allowed('mgq',$env{'request.course.id'})) {
$result.='';
+ }
+
+ $result.='';
+
+ if (!$previous && $status ne 'SHOW_ANSWER' &&
+ &show_task($status,$previous)) {
my $action = &Apache::lonenc::check_encrypt($env{'request.uri'});
$result.=<
@@ -1037,7 +1050,8 @@ DONEBUTTON
}
$start_time=&Apache::lonlocal::locallocaltime($start_time);
- my $status = "\n
\n";
+ my $status =
+ "\n
\n\t";
if ($bt_status eq 'pass') {
$status.='
You passed the '.$title.' given on '.
@@ -1050,13 +1064,13 @@ DONEBUTTON
$status.=&add_request_another_attempt_button();
}
}
- $status.='
';
+ $status.="\n".'
'."\n";
my $dim = $top;
my %counts = &get_counts($dim,undef,$parstack,
$safeeval);
- $status.="\n
".
+ $status.="\n
\n\t
".
&question_status_message(\%counts,-1).
- "
\n";
+ "\n
\n";
foreach my $id (@{$dimension{$dim}{'criterias'}}) {
@@ -2090,8 +2104,10 @@ sub start_Dimension {
}
push(@Apache::bridgetask::dimension,$dim);
&Apache::lonxml::startredirection();
- &enable_dimension_parsing($dim);
- return &internal_location($dim);
+ if (!&skip_dimension_parsing($dim)) {
+ &enable_dimension_parsing($dim);
+ }
+ return;# &internal_location($dim);
}
sub start_QuestionText {
@@ -2210,40 +2226,55 @@ sub end_Dimension {
if (&Apache::lonxml::get_param('Mandatory',$parstack,$safeeval) eq 'N') {
$mandatory='Optional';
}
- my $dim_info="
\n";
+ my $dim_info=
+ "\n
\n\t";
my $question = ('sub' x $dimension{$dim}{'depth'}).'question';
$question =~ s/^(.)/uc($1)/e;
if ($dim_status eq 'pass') {
- $dim_info.='
'.$question.' : you passed this '.$mandatory.' question
';
+ $dim_info.='
'.$question.' : you passed the above '.$mandatory.' question
';
}
if ($dim_status eq 'fail') {
- $dim_info.='
'.$question.' : you did not pass this '.$mandatory.' question
';
+ $dim_info.='
'.$question.' : you did not pass the above '.$mandatory.' question
';
}
my %counts = &get_counts($dim,$instance,$parstack,
$safeeval);
- $dim_info.="\n
\n";
foreach my $id (@{$dimension{$dim}{$instance.'.criterias'}},
@{$dimension{$dim}{'criterias'}}) {
my $type = $dimension{$dim}{'criteria.'.$id.'.type'};
if ($type eq 'dimension') {
- $result.=$dimension{$id}{'result'};
- next;
+ if (defined($dimension{$id}{'result'})) {
+ $result.=$dimension{$id}{'result'};
+ next;
+ } else {
+ $dim_info .=
+ &nested_parse(\$dimension{$dim}{'criteria.'.$id},
+ [@_],{'set_dim_id' => $id});
+ }
+ } else {
+ my $criteria =
+ &nested_parse(\$dimension{$dim}{'criteria.'.$id},
+ [@_]);
+ $dim_info .= &layout_web_Criteria($dim,$id,$criteria);
}
- my $criteria =
- &nested_parse(\$dimension{$dim}{'criteria.'.$id},
- [@_]);
- $dim_info .= &layout_web_Criteria($dim,$id,$criteria);
}
+ # puts the results at the end of the dimension
+ $result .= $dim_info;
- my $internal_location=&internal_location($dim);
- $result=~s/\Q$internal_location\E/$dim_info/;
+ # puts the results at the beginning of the dimension
+ # my $internal_location=&internal_location($dim);
+ # $result=~s/\Q$internal_location\E/$dim_info/;
}
}
+ if ($result !~ /^\s*$/s) {
+ $result = "\n".'
'.
+ "\n".$result."\n
\n";
+ }
} elsif ($target eq 'webgrade') {
# in case of any side effects that we need
&nested_parse(\$dimension{$dim}{'intro'},[@_]);
@@ -2499,11 +2530,12 @@ sub grading_history {
$entry.=' comment: "'.$Apache::lonhomework::history{"$t:$scope.comment"}.'"';
}
if ($entry) {
- $result.= "
$grader : $entry
";
+ $result.= "\n\t\t
\n\t\t\t$grader :\n\t\t\t $entry \n\t\t
";
}
}
if ($result) {
- return '
'.$result.'
';
+ return "\n\t".'
'.$result.
+ "\n\t".'
'."\n";
}
return '';
}
@@ -2579,7 +2611,7 @@ sub start_Criteria {
$dimension{$dim}{'result'} .= &internal_location($id);
} else {
&Apache::lonxml::debug(" not stashing $dim $id");
- $result .= &internal_location($id);
+ #$result .= &internal_location($id);
}
}
&Apache::lonxml::debug("Criteria $id with $dim");
@@ -2616,15 +2648,21 @@ sub layout_web_Criteria {
my $status_display=$status;
$status_display=~s/^([a-z])/uc($1)/e;
my $criteria_info.=
- '