[LON-CAPA-cvs] cvs: loncom /interface lonquickgrades.pm
www
www@source.lon-capa.org
Tue, 24 May 2011 18:06:10 -0000
www Tue May 24 18:06:10 2011 EDT
Modified files:
/loncom/interface lonquickgrades.pm
Log:
Adjusted raw points
Index: loncom/interface/lonquickgrades.pm
diff -u loncom/interface/lonquickgrades.pm:1.89 loncom/interface/lonquickgrades.pm:1.90
--- loncom/interface/lonquickgrades.pm:1.89 Tue May 24 17:17:24 2011
+++ loncom/interface/lonquickgrades.pm Tue May 24 18:06:10 2011
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Quick Student Grades Display
#
-# $Id: lonquickgrades.pm,v 1.89 2011/05/24 17:17:24 www Exp $
+# $Id: lonquickgrades.pm,v 1.90 2011/05/24 18:06:10 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -669,21 +669,29 @@
$r->print('</td>');
}
# Total
+ if ($output) { $r->print('<td>'); }
if ($cangrade) {
if ($output) {
- $r->print('<td>'.
+ $r->print(
'<select name="totaltype_'.$id.'">'.
'<option value="default"'.($categories{$id.'_totaltype'} eq 'default'?' selected="selected"':'').'>'.&mt('default').'</option>'.
'<option value="typein"'.($categories{$id.'_totaltype'} eq 'typein'?' selected="selected"':'').'>'.&mt('Type-in value').'</option>'.
'</select>'.
'<input type="text" size="4" name="total_'.$id.
- '" value="'.&Apache::lonhtmlcommon::entity_encode($categories{$id.'_total'}).'" /></td>');
+ '" value="'.&Apache::lonhtmlcommon::entity_encode($categories{$id.'_total'}).'" />');
}
} else {
if ($output) {
- $r->print('<td>'.($categories{$id.'_totaltype'} eq 'default'?&mt('default'):$categories{$id.'_total'}).'</td>');
+ $r->print('<td>'.($categories{$id.'_totaltype'} eq 'default'?&mt('default'):$categories{$id.'_total'}));
}
}
+# Adjust total points
+ if ($categories{$id.'_totaltype'} eq 'typein') {
+ $totalpossible=1.*$categories{$id.'_total'};
+ }
+ if ($output) {
+ $r->print('<p>'.&mt('Adjusted raw points: [_1]/[_2]',$totalcorrect,$totalpossible).'</p>');
+ }
# Calculation