[LON-CAPA-cvs] cvs: loncom /homework bridgetask.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Mon, 13 Nov 2006 21:23:20 -0000
albertel Mon Nov 13 16:23:20 2006 EDT
Modified files:
/loncom/homework bridgetask.pm
Log:
- adds a <div> around the whole of a question/dimension
- move the question results to come after the question
- strip the excess start/ending ws from the criteria text
Index: loncom/homework/bridgetask.pm
diff -u loncom/homework/bridgetask.pm:1.201 loncom/homework/bridgetask.pm:1.202
--- loncom/homework/bridgetask.pm:1.201 Thu Nov 9 16:39:34 2006
+++ loncom/homework/bridgetask.pm Mon Nov 13 16:23:19 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: bridgetask.pm,v 1.201 2006/11/09 21:39:34 albertel Exp $
+# $Id: bridgetask.pm,v 1.202 2006/11/13 21:23:19 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2193,6 +2193,7 @@
my $instance=&get_instance($dim);
my $version=&get_version();
if ($target eq 'web') {
+ $result .= "\n".'<div class="LC_question">'."\n";
$result .= &nested_parse(\$dimension{$dim}{'intro'},[@_]);
my @instances = $instance;
if (&Apache::response::showallfoils()) {
@@ -2229,10 +2230,10 @@
my $question = ('sub' x $dimension{$dim}{'depth'}).'question';
$question =~ s/^(.)/uc($1)/e;
if ($dim_status eq 'pass') {
- $dim_info.='<h3>'.$question.' : you passed this '.$mandatory.' question</h3>';
+ $dim_info.='<h3>'.$question.' : you passed the above'.$mandatory.' question</h3>';
}
if ($dim_status eq 'fail') {
- $dim_info.='<h3>'.$question.' : you did not pass this '.$mandatory.' question</h3>';
+ $dim_info.='<h3>'.$question.' : you did not pass the above '.$mandatory.' question</h3>';
}
my %counts = &get_counts($dim,$instance,$parstack,
$safeeval);
@@ -2254,11 +2255,15 @@
[@_]);
$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</div>\n";
} elsif ($target eq 'webgrade') {
# in case of any side effects that we need
&nested_parse(\$dimension{$dim}{'intro'},[@_]);
@@ -2633,7 +2638,9 @@
$status_display=~s/^([a-z])/uc($1)/e;
my $criteria_info.=
'<div class="LC_'.$status.' LC_criteria">'."\n\t".'<h4>'
- .$mandatory.' Criteria</h4>'."\n\t".'<p>'."\n";
+ .$mandatory.' Criteria</h4>'."\n\t".'<p class="LC_criteria_text>'."\n";
+ $criteria =~ s/^\s*//s;
+ $criteria =~ s/\s*$//s;
$criteria_info.= $criteria;
$criteria_info.="\n\t".'</p>'.
"\n\t".'<p class="LC_grade">'.$status_display.'</p>';
@@ -2675,6 +2682,8 @@
</label>
END_BUTTON
}
+ $criteria =~ s/^\s*//s;
+ $criteria =~ s/\s*$//s;
my $result = <<END_CRITERIA;
<div class="LC_GRADING_criteria">
<div class="LC_GRADING_criteriatext">