';
+ $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'}}) {
@@ -2179,6 +2193,7 @@ sub end_Dimension {
my $instance=&get_instance($dim);
my $version=&get_version();
if ($target eq 'web') {
+ $result .= "\n".'
'."\n";
$result .= &nested_parse(\$dimension{$dim}{'intro'},[@_]);
my @instances = $instance;
if (&Apache::response::showallfoils()) {
@@ -2210,22 +2225,23 @@ 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'}}) {
@@ -2239,11 +2255,15 @@ sub end_Dimension {
[@_]);
$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/;
}
}
+ $result .= "\n
\n";
} elsif ($target eq 'webgrade') {
# in case of any side effects that we need
&nested_parse(\$dimension{$dim}{'intro'},[@_]);
@@ -2499,11 +2519,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 '';
}
@@ -2616,15 +2637,20 @@ sub layout_web_Criteria {
my $status_display=$status;
$status_display=~s/^([a-z])/uc($1)/e;
my $criteria_info.=
- '
'
- .$mandatory.' Criteria
';
+ '
'."\n\t".'
'
+ .$mandatory.' Criteria
'."\n\t".'
'.$status_display.'
';
+ $criteria_info.="\n\t".''.
+ "\n\t".'
'.$status_display.'
';
if ($comment =~ /\w/) {
- $criteria_info.='
'.
- &mt('Comment: [_1]',$comment).'
';
+ $criteria_info.=
+ "\n\t".
+ '
'.&mt('Comment: [_1]',$comment).'
';
}
- $criteria_info.='
';
+ $criteria_info.="\n".'
'."\n";
+
return $criteria_info;
}
@@ -2633,34 +2659,46 @@ sub layout_webgrade_Criteria {
my $link=&link($id);
my $version = &get_version();
my $status = &get_criteria('status',$version,$dim,$id);
- my $result =
- '