[LON-CAPA-cvs] cvs: loncom /homework grades.pm

raeburn raeburn at source.lon-capa.org
Thu Dec 21 18:20:49 EST 2017


raeburn		Thu Dec 21 23:20:49 2017 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  - If &get_last_submission() or displaySubByDates() finds nothing recorded,
    for external tool report 'no grade passed back', instead of 'nothing 
    submitted'.
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.746 loncom/homework/grades.pm:1.747
--- loncom/homework/grades.pm:1.746	Thu Dec 21 23:05:04 2017
+++ loncom/homework/grades.pm	Thu Dec 21 23:20:48 2017
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.746 2017/12/21 23:05:04 raeburn Exp $
+# $Id: grades.pm,v 1.747 2017/12/21 23:20:48 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -856,7 +856,7 @@
 sub listStudents {
     my ($request,$symb,$submitonly) = @_;
 
-    my $is_tool = ($symb =~ /ext\.tool$/);
+    my $is_tool   = ($symb =~ /ext\.tool$/);
     my $cdom      = $env{"course.$env{'request.course.id'}.domain"};
     my $cnum      = $env{"course.$env{'request.course.id'}.num"};
     my $getsec    = $env{'form.section'} eq '' ? 'all' : $env{'form.section'};
@@ -2635,7 +2635,7 @@
     if (!@string) {
         my $msg;
         if ($is_tool) {
-            $msg = &mt('Nothing passed back - no attempts.');
+            $msg = &mt('No grade passed back.');
         } else {
             $msg = &mt('Nothing submitted - no attempts.');
         }
@@ -5110,6 +5110,7 @@
     my ($symb,$record,$parts,$responseType,$checkIcon,$uname,$udom) = @_;
     my $isCODE=0;
     my $isTask = ($symb =~/\.task$/);
+    my $is_tool = ($symb =~/\.tool$/);
     if (exists($record->{'resource.CODE'})) { $isCODE=1; }
     my $studentTable=&Apache::loncommon::start_data_table().
 	&Apache::loncommon::start_data_table_header_row().
@@ -5124,7 +5125,11 @@
     my %orders;
     $mark{'correct_by_student'} = $checkIcon;
     if (!exists($$record{'1:timestamp'})) {
-	return '<br /> <span class="LC_warning">'.&mt('Nothing submitted - no attempts.').'</span><br />';
+        if ($is_tool) {
+            return '<br /> <span class="LC_warning">'.&mt('No grade passed back.').'</span><br />';
+        } else {
+            return '<br /> <span class="LC_warning">'.&mt('Nothing submitted - no attempts.').'</span><br />';
+        }
     }
 
     my $interaction;




More information about the LON-CAPA-cvs mailing list