Diff for /loncom/interface/lonparmset.pm between versions 1.349 and 1.350

version 1.349, 2006/11/29 22:02:47 version 1.350, 2006/12/05 02:55:53
Line 65  use Apache::lonlocal; Line 65  use Apache::lonlocal;
 use Apache::lonnavmaps;  use Apache::lonnavmaps;
 use Apache::longroup;  use Apache::longroup;
 use Apache::lonrss;  use Apache::lonrss;
 use LONCAPA;  use LONCAPA qw(:DEFAULT :match);
   
 # --- Caches local to lonparmset  # --- Caches local to lonparmset
   
Line 2363  sub readdata { Line 2363  sub readdata {
   
     my $classlist=&Apache::loncoursedata::get_classlist();      my $classlist=&Apache::loncoursedata::get_classlist();
     foreach (keys %$classlist) {      foreach (keys %$classlist) {
         # the following undefs are for 'domain', and 'username' respectively.          if ($_=~/^($match_username)\:($match_domain)$/) {
         if ($_=~/^(\w+)\:(\w+)$/) {  
     my ($tuname,$tudom)=($1,$2);      my ($tuname,$tudom)=($1,$2);
     my $useropt=&Apache::lonnet::get_userresdata($tuname,$tudom);      my $useropt=&Apache::lonnet::get_userresdata($tuname,$tudom);
             foreach my $userkey (keys %{$useropt}) {              foreach my $userkey (keys %{$useropt}) {
Line 2486  sub storedata { Line 2485  sub storedata {
   
 sub extractuser {  sub extractuser {
     my $key=shift;      my $key=shift;
     return ($key=~/^$env{'request.course.id'}.\[useropt\:(\w+)\:(\w+)\]\./);      return ($key=~/^$env{'request.course.id'}.\[useropt\:($match_username)\:($match_domain)\]\./);
 }  }
   
 sub listdata {  sub listdata {
Line 2544  sub listdata { Line 2543  sub listdata {
     my $section=&mt('All Students');      my $section=&mt('All Students');
     if ($middle=~/^\[(.*)\]/) {      if ($middle=~/^\[(.*)\]/) {
  my $issection=$1;   my $issection=$1;
  if ($issection=~/^useropt\:(\w+)\:(\w+)/) {   if ($issection=~/^useropt\:($match_username)\:($match_domain)/) {
     $section=&mt('User').": ".&Apache::loncommon::plainname($1,$2);      $section=&mt('User').": ".&Apache::loncommon::plainname($1,$2);
  } else {   } else {
     $section=&mt('Group/Section').': '.$issection;      $section=&mt('Group/Section').': '.$issection;
Line 2918  sub parse_key { Line 2917  sub parse_key {
     $data{'scope_type'} = 'all';      $data{'scope_type'} = 'all';
     if ($middle=~/^\[(.*)\]/) {      if ($middle=~/^\[(.*)\]/) {
         $data{'scope'} = $1;          $data{'scope'} = $1;
  if ($data{'scope'}=~/^useropt\:(\w+)\:(\w+)/) {   if ($data{'scope'}=~/^useropt\:($match_username)\:($match_domain)/) {
     $data{'scope_type'} = 'user';      $data{'scope_type'} = 'user';
     $data{'scope'} = [$1,$2];      $data{'scope'} = [$1,$2];
  } else {   } else {

Removed from v.1.349  
changed lines
  Added in v.1.350


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