[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /homework lonhomework.pm

raeburn raeburn at source.lon-capa.org
Fri Sep 21 00:37:36 EDT 2018


raeburn		Fri Sep 21 04:37:36 2018 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/homework	lonhomework.pm 
  Log:
  - For 2.11
    Backport 1.374 (part).
  
  
Index: loncom/homework/lonhomework.pm
diff -u loncom/homework/lonhomework.pm:1.344.2.9 loncom/homework/lonhomework.pm:1.344.2.10
--- loncom/homework/lonhomework.pm:1.344.2.9	Wed Sep 13 19:07:44 2017
+++ loncom/homework/lonhomework.pm	Fri Sep 21 04:37:36 2018
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Homework handler
 #
-# $Id: lonhomework.pm,v 1.344.2.9 2017/09/13 19:07:44 raeburn Exp $
+# $Id: lonhomework.pm,v 1.344.2.10 2018/09/21 04:37:36 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -235,6 +235,12 @@
 	    $Apache::lonhomework::history{"resource.$version.0.status"} eq 'pass') {
 	    return ('SHOW_ANSWER');
 	}
+    } elsif (($type eq 'problem') &&
+             ($Apache::lonhomework::browse eq 'F') &&
+             ($ENV{'REMOTE_ADDR'} eq '127.0.0.1') &&
+             ($env{'form.grade_courseid'} eq $env{'request.course.id'}) &&
+             (&Apache::lonnet::allowed('mgr',$env{'request.course.id'}))) {
+        return ($status,$datemsg);
     }
 
     my $availablestudent = &Apache::lonnet::EXT("resource.0.availablestudent",$symb);
@@ -311,7 +317,7 @@
                         $earlyout = 1;
                     }
                 }
-                if (($currtries == $maxtries) || ($is_correct)) {
+                if ($currtries == $maxtries) {
                     $earlyout = 1;
                 } else {
                     $numgraded ++;




More information about the LON-CAPA-cvs mailing list