Diff for /loncom/interface/lonselstudent.pm between versions 1.14 and 1.15

version 1.14, 2009/01/15 18:23:27 version 1.15, 2015/08/16 00:21:21
Line 61  use     HTML::Entities(); Line 61  use     HTML::Entities();
 #  Course personnel elements include:  #  Course personnel elements include:
 #       [0]    Last, First of the user.  #       [0]    Last, First of the user.
 #       [1]    Role held by the user.  #       [1]    Role held by the user.
 #       [2]    Empty.  #       [2]    Section associated with role.
 #       [3]    Empty  #       [3]    Empty
 #       [4]    username:domain of the user.  #       [4]    username:domain of the user.
 #  #
Line 74  use     HTML::Entities(); Line 74  use     HTML::Entities();
 #       [4]    username:domain of the user.  #       [4]    username:domain of the user.
 #  #
 sub get_people_in_class {  sub get_people_in_class {
     my ($section_restriction) = @_;      my ($section_restriction,$personnel_section) = @_;
     my %coursepersonnel = &Apache::lonnet::get_course_adv_roles();      my %coursepersonnel = &Apache::lonnet::get_course_adv_roles($env{'request.course.id'},1);
       my $crstype = &Apache::loncommon::course_type();
     #      #
     #  Enumerate the course_personnel.      #  Enumerate the course_personnel.
     #      #
     my @course_personnel;      my @course_personnel;
     for my $role (sort(keys(%coursepersonnel))) {      foreach my $key (sort(keys(%coursepersonnel))) {
           my ($role,$section) = split(/:/,$key);
  # extract the names so we can sort them   # extract the names so we can sort them
           next if (($personnel_section ne '') && ($personnel_section ne $section)); 
  my @people;   my @people;
  for my $person (split(/,/, $coursepersonnel{$role})) {          
    foreach my $person (split(/,/, $coursepersonnel{$key})) {
     my ($uname,$domain) = split(/:/, $person);      my ($uname,$domain) = split(/:/, $person);
     push(@people, [&Apache::loncommon::plainname($uname,$domain),      push(@people, [&Apache::loncommon::plainname($uname,$domain),
    $uname,$domain]);     $uname,$domain]);
  }   }
  @people = sort { $a->[0] cmp $b->[0] } (@people);   @people = sort { $a->[0] cmp $b->[0] } (@people);
           
  for my $person (@people) {   foreach my $person (@people) {
     push(@course_personnel, [join(':', $person->[1],$person->[2]),       push(@course_personnel, [join(':', $person->[1],$person->[2]), 
      $person->[0], '', '', $role]);       $person->[0], $section, 'Active',
                                        &Apache::lonnet::plaintext($role)]);
  }   }
     }      }
     #  Students must be split into the three categories:      #  Students must be split into the three categories:
Line 179  sub get_people_in_class { Line 184  sub get_people_in_class {
 #                     and false for all other calls... only matters if  #                     and false for all other calls... only matters if
 #                     multiselect is true.  #                     multiselect is true.
 #     $context      - If email, do not include <br /><hr /> tags at the end  #     $context      - If email, do not include <br /><hr /> tags at the end
 #                     of the data table.   #                     of the data table.
 #  Returns:  #  Returns:
 #     HTML  text to add to the rendering of the helper.  #     HTML  text to add to the rendering of the helper.
 #  #

Removed from v.1.14  
changed lines
  Added in v.1.15


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