[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm

raeburn raeburn at source.lon-capa.org
Fri Dec 22 12:58:16 EST 2017


raeburn		Fri Dec 22 17:58:16 2017 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - Populate the metadata cache correctly for an instance of an External Tool
    on course initialization.
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1363 loncom/lonnet/perl/lonnet.pm:1.1364
--- loncom/lonnet/perl/lonnet.pm:1.1363	Fri Dec 22 17:19:43 2017
+++ loncom/lonnet/perl/lonnet.pm	Fri Dec 22 17:58:16 2017
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.1363 2017/12/22 17:19:43 raeburn Exp $
+# $Id: lonnet.pm,v 1.1364 2017/12/22 17:58:16 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -11729,7 +11729,15 @@
 # uploaded map containing the tool. The value is retrieved via
 # &EXT(), if a valid symb is available.  Otherwise the value of
 # gradable in the exttool_$marker.db file for the tool instance
-# is retrived via &get().
+# is retrieved via &get().
+#
+# When lonuserstate::traceroute() calls lonnet::EXT() for 
+# hiddenresource and encrypturl (during course initialization)
+# the map-level parameter for resource.0.gradable included in the 
+# uploaded map containing the tool will not yet have been stored
+# in the user_course_parms.db file for the user's session, so in 
+# this case fall back to retrieving gradable status from the
+# exttool_$marker.db file.
 #
 # In order to avoid an infinite loop, &metadata() will return
 # before a call to &EXT(), if the uri is for an external tool
@@ -11744,7 +11752,7 @@
             my ($checked,$use_passback);
             if ($toolsymb ne '') {
                 (undef,undef,my $tooluri) = &decode_symb($toolsymb);
-                if ($tooluri eq $uri) {
+                if (($tooluri eq $uri) && (&EXT('resource.0.gradable',$toolsymb))) {
                     $checked = 1;
                     if (&EXT('resource.0.gradable',$toolsymb) =~ /^yes$/i) {
                         $use_passback = 1;




More information about the LON-CAPA-cvs mailing list