[LON-CAPA-cvs] cvs: loncom /interface courseprefs.pm lonquickgrades.pm

www www@source.lon-capa.org
Sat, 21 Nov 2009 18:07:03 -0000


www		Sat Nov 21 18:07:03 2009 EDT

  Modified files:              
    /loncom/interface	courseprefs.pm lonquickgrades.pm 
  Log:
  Mode to not display total parts.
  
  
Index: loncom/interface/courseprefs.pm
diff -u loncom/interface/courseprefs.pm:1.10 loncom/interface/courseprefs.pm:1.11
--- loncom/interface/courseprefs.pm:1.10	Thu Nov  5 14:48:39 2009
+++ loncom/interface/courseprefs.pm	Sat Nov 21 18:07:03 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set configuration settings for a course
 #
-# $Id: courseprefs.pm,v 1.10 2009/11/05 14:48:39 raeburn Exp $
+# $Id: courseprefs.pm,v 1.11 2009/11/21 18:07:03 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2201,10 +2201,11 @@
                    input => 'selectbox',
                    options => {
                                 standard => &mt('Standard: shows points'),
-                                external => &mt('External: shows number of completed parts'),
+                                external => &mt('External: shows number of completed parts and totals'),
+                                externalnototals => &mt('External: shows only number of completed parts'),
                                 spreadsheet => &mt('Spreadsheet: (with link to detailed scores)'), 
                               },
-                   order => ['standard','external','spreadsheet'],
+                   order => ['standard','external','externalnototals','spreadsheet'],
                  },
         'rndseed' => {
                    text => '<b>'.&mt($itemtext->{'rndseed'}).'</b>'.
Index: loncom/interface/lonquickgrades.pm
diff -u loncom/interface/lonquickgrades.pm:1.48 loncom/interface/lonquickgrades.pm:1.49
--- loncom/interface/lonquickgrades.pm:1.48	Sat May 16 23:21:00 2009
+++ loncom/interface/lonquickgrades.pm	Sat Nov 21 18:07:03 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Quick Student Grades Display
 #
-# $Id: lonquickgrades.pm,v 1.48 2009/05/16 23:21:00 bisitz Exp $
+# $Id: lonquickgrades.pm,v 1.49 2009/11/21 18:07:03 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -25,7 +25,6 @@
 #
 # http://www.lon-capa.org/
 #
-# Created Nov. 14, 2002 by Jeremy Bowers
 
 package Apache::lonquickgrades;
 
@@ -65,7 +64,10 @@
     my $showPoints = 
         $env{'course.'.$env{'request.course.id'}.'.grading'} eq 'standard';
     my $notshowSPRSlink = 
-        $env{'course.'.$env{'request.course.id'}.'.grading'} eq 'external';
+        (($env{'course.'.$env{'request.course.id'}.'.grading'} eq 'external')
+      || ($env{'course.'.$env{'request.course.id'}.'.grading'} eq 'externalnototals'));
+    my $notshowTotals=
+        $env{'course.'.$env{'request.course.id'}.'.grading'} eq 'externalnototals';
 
     # Create the nav map
     my $navmap = Apache::lonnavmaps::navmap->new();
@@ -234,7 +236,7 @@
     if ($totalAttempted) {
 	$title .= " / " . &mt("Attempted");
     }
-    $r->print("<th>$title / ".&mt('Total').'</td>'
+    $r->print("<th>$title".($notshowTotals?'':" / ".&mt('Total')).'</th>'
              .&Apache::loncommon::end_data_table_header_row());
     while ($depth > 0) {
         if ($curRes == $iterator->BEGIN_MAP()) {$depth++;}
@@ -262,7 +264,7 @@
 		    $r->print('<td valign="top">'
                              .$thisIndent
                              .'<span class="LC_nobreak">'
-                             .$correct.' / '.$attempted.' / '.$total
+                             .$correct.' / '.$attempted.($notshowTotals?'':' / '.$total)
                              .'</span></td>'
                              .&Apache::loncommon::end_data_table_row()
                     );
@@ -270,7 +272,7 @@
 		    $r->print('<td valign="top">'
                              .$thisIndent
                              .'<span class="LC_nobreak">'
-                             .$correct.' / '.$total
+                             .$correct.($notshowTotals?'':' / '.$total)
                              .'</span></td>'
                              .&Apache::loncommon::end_data_table_row());
 		}