Diff for /rat/lonuserstate.pm between versions 1.147 and 1.148

version 1.147, 2013/08/16 01:41:05 version 1.148, 2014/02/23 20:27:54
Line 282  sub loadmap { Line 282  sub loadmap {
     # Handle randomization and random selection      # Handle randomization and random selection
   
     if ($randomize) {      if ($randomize) {
  if (!$env{'request.role.adv'}) {          my $advanced;
           if ($env{'request.course.id'}) {
               $advanced = (&Apache::lonnet::allowed('adv') eq 'F');
           } else {
               $env{'request.course.id'} = $courseid;
               $advanced = (&Apache::lonnet::allowed('adv') eq 'F');
               $env{'request.course.id'} = '';
           }
           unless ($advanced) {
               # Order of resources is not randomized if user has and advanced role in the course.
     my $seed;      my $seed;
   
     # In the advanced role, the map's random seed              # If the map's random seed parameter has been specified
     # parameter is used as the basis for computing the              # it is used as the basis for computing the seed ...
     # seed ... if it has been specified:  
   
     if (defined($randompickseed{$parent_rid})) {      if (defined($randompickseed{$parent_rid})) {
  $seed = $randompickseed{$parent_rid};   $seed = $randompickseed{$parent_rid};
Line 327  sub loadmap { Line 335  sub loadmap {
     # processing the randomorder parameter if it is set, not      # processing the randomorder parameter if it is set, not
     # randompick.      # randompick.
   
     @map_ids=&Math::Random::random_permutation(@map_ids);       @map_ids=&Math::Random::random_permutation(@map_ids);
  }   }
   
   

Removed from v.1.147  
changed lines
  Added in v.1.148


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>