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

raeburn raeburn at source.lon-capa.org
Wed Feb 9 10:46:57 EST 2022


raeburn		Wed Feb  9 15:46:57 2022 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
  Log:
  - Bug 6967.
    Support randompick and/or randomorder set for sub-folders when printing
    problems or resources for CODEd assignments in a specified folder.
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.674 loncom/interface/lonprintout.pm:1.675
--- loncom/interface/lonprintout.pm:1.674	Tue Nov 30 15:55:37 2021
+++ loncom/interface/lonprintout.pm	Wed Feb  9 15:46:57 2022
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.674 2021/11/30 15:55:37 raeburn Exp $
+# $Id: lonprintout.pm,v 1.675 2022/02/09 15:46:57 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3252,18 +3252,10 @@
                  }
 	     }
 	 }
-         my ($randomorder,$randompick,$map);
+         my $map;
          if ($helper->{VARS}{'symb'}) {
              ($map, my $id, my $resource) =
                  &Apache::lonnet::decode_symb($helper->{VARS}{'symb'});
-             my $navmap = Apache::lonnavmaps::navmap->new();
-             if (defined($navmap)) {
-                 if ($map) {
-                     my $mapres = $navmap->getResourceByUrl($map);
-                     $randomorder = $mapres->randomorder();
-                     $randompick = $mapres->randompick();
-                 }
-             }
          }
 	 my %moreenv = ('textwidth' => &get_textwidth($helper,$LaTeXwidth));
 	 $moreenv{'problem_split'}    = $parmhash{'problem_stream_switch'};
@@ -3332,14 +3324,11 @@
 	     } else {
 		 $moreenv{'CODE'}=&num_to_letters($code);
 	     }
-             my $actual_seq = \@master_seq;
-             if ($randomorder || $randompick) {
-                 $env{'form.CODE'} = $moreenv{'CODE'};
-                 $actual_seq = master_seq_to_person_seq($map, \@master_seq,
-                                                        undef,
-                                                        $moreenv{'CODE'}, $nohidemap);
-                 delete($env{'form.CODE'});
-             }
+             $env{'form.CODE'} = $moreenv{'CODE'};
+             my $actual_seq = master_seq_to_person_seq($map, \@master_seq,
+                                                       undef,
+                                                       $moreenv{'CODE'}, $nohidemap);
+             delete($env{'form.CODE'});
 	     my ($output,$fullname, $printed)=
 		 &print_resources($r,$helper,'anonymous',$type,\%moreenv,
 				  $actual_seq,$flag_latex_header_remove,




More information about the LON-CAPA-cvs mailing list