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

raeburn raeburn at source.lon-capa.org
Fri May 31 20:22:42 EDT 2013


raeburn		Sat Jun  1 00:22:42 2013 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
    /loncom/homework	grades.pm 
  Log:
  - Printing Problems from folder for CODEd assignments:
    - If randompick parameter set for folder, seed used for selection of
      resources is set in lonnet::rndseed() based on CODE.
  - Bubblesheet grading CODEd exams -- randompick for folder being graded
      now supported. 
    - If randompick parameter set, seed used for selection of resources is
      set in lonnet::rndseed() based on CODE.
  
  - Work in progress.
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.631 loncom/interface/lonprintout.pm:1.632
--- loncom/interface/lonprintout.pm:1.631	Thu May 30 05:04:22 2013
+++ loncom/interface/lonprintout.pm	Sat Jun  1 00:22:37 2013
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.631 2013/05/30 05:04:22 raeburn Exp $
+# $Id: lonprintout.pm,v 1.632 2013/06/01 00:22:37 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3309,7 +3309,7 @@
 		 $moreenv{'CODE'}=&num_to_letters($code);
 	     }
              my $actual_seq = \@master_seq;
-             if ($randomorder) {
+             if ($randomorder || $randompick) {
                  $env{'form.CODE'} = $moreenv{'CODE'};
                  $actual_seq = master_seq_to_person_seq($map, \@master_seq,
                                                         undef,
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.688 loncom/homework/grades.pm:1.689
--- loncom/homework/grades.pm:1.688	Thu May 30 05:04:31 2013
+++ loncom/homework/grades.pm	Sat Jun  1 00:22:42 2013
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.688 2013/05/30 05:04:31 raeburn Exp $
+# $Id: grades.pm,v 1.689 2013/06/01 00:22:42 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -7923,9 +7923,10 @@
         return '';
     }  
     my $map=$navmap->getResourceByUrl($sequence);
-    my $randomorder;
+    my ($randomorder,$randompick);
     if (ref($map)) {
         $randomorder = $map->randomorder();
+        $randompick = $map->randompick();
     }
     my @resources=$navmap->retrieveResources($map,\&scantron_filter,1,0);
     my (%grader_partids_by_symb,%grader_randomlists_by_symb,%ordered);
@@ -8034,7 +8035,7 @@
         }
 
         my @mapresources = @resources;
-        if ($randomorder) {
+        if ($randomorder || $randompick) {
             @mapresources = 
                 &users_order($user,$scancode,$sequence,\@master_seq,\%ordered,
                              \%symb_to_resource);
@@ -8539,9 +8540,10 @@
         return '';
     }
     my $map=$navmap->getResourceByUrl($sequence);
-    my ($randomorder, at master_seq,%symb_to_resource);
+    my ($randomorder,$randompick, at master_seq,%symb_to_resource);
     if (ref($map)) { 
         $randomorder=$map->randomorder();
+        $randompick=$map->randompick();
     }
     my @resources=$navmap->retrieveResources($map,\&scantron_filter,1,0);
     foreach my $resource (@resources) {
@@ -8619,7 +8621,7 @@
         }
 
         my @mapresources = @resources;
-        if ($randomorder) {
+        if ($randomorder || $randompick) {
             @mapresources =
                 &users_order($user,$scancode,$sequence,\@master_seq,\%ordered,
                              \%symb_to_resource);




More information about the LON-CAPA-cvs mailing list