Diff for /loncom/interface/lonparmset.pm between versions 1.579 and 1.580

version 1.579, 2017/07/15 02:31:33 version 1.580, 2017/07/15 02:49:10
Line 138  javascript function 'pjump'. Line 138  javascript function 'pjump'.
   
 =item print_td()  =item print_td()
   
 =item print_usergroups()  =item check_other_groups()
   
 =item parm_control_group()  =item parm_control_group()
   
Line 1500  sub print_row { Line 1500  sub print_row {
             if (@{$usersgroups} > 1) {              if (@{$usersgroups} > 1) {
                 my ($coursereply,$grp_parm,$controlgrp);                  my ($coursereply,$grp_parm,$controlgrp);
                 ($coursereply,$othergrp,$grp_parm,$controlgrp) =                  ($coursereply,$othergrp,$grp_parm,$controlgrp) =
                     &print_usergroups($r,$$part{$which}.'.'.$$name{$which},                      &check_other_groups($$part{$which}.'.'.$$name{$which},
                        $rid,$cgroup,$defbgone,$usersgroups,$result,$courseopt);                         $rid,$cgroup,$defbgone,$usersgroups,$result,$courseopt);
                 if ($coursereply && $result > 4) {                  if ($coursereply && $result > 4) {
                     if (defined($controlgrp)) {                      if (defined($controlgrp)) {
Line 1639  sub print_td { Line 1639  sub print_td {
     $r->print('</td>'."\n");      $r->print('</td>'."\n");
 }  }
   
 # FIXME: Despite the name, this does not print anything, the $r parameter is unused.  
 # Returns HTML and other info for the cell added when a user is selected  # Returns HTML and other info for the cell added when a user is selected
 # and that user is in several groups. This is the cell with the title "Control by other group".  # and that user is in several groups. This is the cell with the title "Control by other group".
 #  #
 # @param {Apache2::RequestRec} $r - the Apache request (unused)  
 # @param {string} $what - parameter part.'.'.parameter name  # @param {string} $what - parameter part.'.'.parameter name
 # @param {string} $rid - resource id  # @param {string} $rid - resource id
 # @param {string} $cgroup - group name  # @param {string} $cgroup - group name
Line 1652  sub print_td { Line 1650  sub print_td {
 # @param {integer} $result - level  # @param {integer} $result - level
 # @param {hash reference} $courseopt - course parameters hash (result of lonnet::get_courseresdata, dump of course's resourcedata.db)  # @param {hash reference} $courseopt - course parameters hash (result of lonnet::get_courseresdata, dump of course's resourcedata.db)
 # @returns {Array} - array (parameter value for the other group, HTML for the cell, HTML with the value, name of the other group)  # @returns {Array} - array (parameter value for the other group, HTML for the cell, HTML with the value, name of the other group)
 sub print_usergroups {  sub check_other_groups {
     my ($r,$what,$rid,$cgroup,$defbg,$usersgroups,$result,$courseopt) = @_;      my ($what,$rid,$cgroup,$defbg,$usersgroups,$result,$courseopt) = @_;
     my $courseid = $env{'request.course.id'};      my $courseid = $env{'request.course.id'};
     my $output;      my $output;
     my $symb = &symbcache($rid);      my $symb = &symbcache($rid);
Line 1669  sub print_usergroups { Line 1667  sub print_usergroups {
     if (($coursereply) && ($cgroup ne $resultgroup)) {      if (($coursereply) && ($cgroup ne $resultgroup)) {
         if ($result > 3) {          if ($result > 3) {
             $bgcolor = '#AAFFAA';              $bgcolor = '#AAFFAA';
             $grp_parm = &valout($coursereply,$resulttype,$what);  
         }          }
         $grp_parm = &valout($coursereply,$resulttype,$what);          $grp_parm = &valout($coursereply,$resulttype,$what);
         $output = '<td style="background-color:'.$bgcolor.';" align="center">';          $output = '<td style="background-color:'.$bgcolor.';" align="center">';
Line 1686  sub print_usergroups { Line 1683  sub print_usergroups {
 }  }
   
 # Looks for a group with a defined parameter for given user and parameter.  # Looks for a group with a defined parameter for given user and parameter.
 # Used by print_usergroups.  # Used by check_other_groups.
 #  #
 # @param {string} $courseid - the course id  # @param {string} $courseid - the course id
 # @param {array reference} $usersgroups - list of groups the user belongs to, if any  # @param {array reference} $usersgroups - list of groups the user belongs to, if any

Removed from v.1.579  
changed lines
  Added in v.1.580


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