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

raeburn raeburn at source.lon-capa.org
Mon Nov 4 15:47:18 EST 2019


raeburn		Mon Nov  4 20:47:18 2019 EDT

  Modified files:              
    /loncom/homework	structuretags.pm 
  Log:
  - Eliminate unnecessary scalars. Use: $Apache::lonhomework::default_type
  
  
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.566 loncom/homework/structuretags.pm:1.567
--- loncom/homework/structuretags.pm:1.566	Mon Nov  4 19:36:46 2019
+++ loncom/homework/structuretags.pm	Mon Nov  4 20:47:18 2019
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: structuretags.pm,v 1.566 2019/11/04 19:36:46 raeburn Exp $
+# $Id: structuretags.pm,v 1.567 2019/11/04 20:47:18 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3009,10 +3009,9 @@
 		} elsif ($target eq 'web') {
                     if ($status eq 'CAN_ANSWER') {
                         my $problemstatus = &get_problem_status($Apache::inputtags::part); 
-                        my $probrandomize = &Apache::lonnet::EXT("resource.$Apache::inputtags::partlist[0].type");
-                        my $probrandtries = &Apache::lonnet::EXT("resource.$Apache::inputtags::partlist[0].randomizeontries");
                         my $num = scalar(@Apache::inputtags::partlist)-1;
-                        if ((($probrandomize eq 'randomizetry') || ($Apache::lonhomework::randomizetrypart)) &&
+                        if ((($Apache::lonhomework::default_type eq 'randomizetry') || 
+                            ($Apache::lonhomework::randomizetrypart)) &&
                             ($Apache::lonhomework::type ne 'randomizetry')) {
                             $result .= &randomizetry_part_header($problemstatus,'none',$num);
                         } elsif ($Apache::lonhomework::type eq 'randomizetry') {




More information about the LON-CAPA-cvs mailing list