Diff for /loncom/interface/lonsimplepage.pm between versions 1.30 and 1.31

version 1.30, 2005/11/16 13:17:30 version 1.31, 2005/11/22 00:01:41
Line 77  ENDDOCUMENT Line 77  ENDDOCUMENT
     if ($caller eq 'grppg') {      if ($caller eq 'grppg') {
         $marker =~ s/\W//g;          $marker =~ s/\W//g;
         $namespace = 'grppage_'.$marker;          $namespace = 'grppage_'.$marker;
         unless(&Apache::lonnet::get_coursegroups($dom,$crs,\%curr_group,          my %curr_groups;
                                                                     $marker)) {          if (!&Apache::loncommon::coursegroups(\%curr_groups,$dom,$crs,$marker)) {
             $r->print('<body>Invalid group name</body>');              $r->print('<body>Invalid group name</body>');
             return OK;              return OK;
         }          }
         %groupinfo = &Apache::loncommon::get_group_settings($curr_group{$marker});          %groupinfo = &Apache::loncommon::get_group_settings($curr_groups{$marker});
     } else {        } else {  
         $marker=~s/\D//g;          $marker=~s/\D//g;
         $namespace = 'smppage_'.$marker;          $namespace = 'smppage_'.$marker;
Line 139  ENDDOCUMENT Line 139  ENDDOCUMENT
                            (&Apache::loncommon::check_group_access($caller))) {                             (&Apache::loncommon::check_group_access($caller))) {
             unless(&Apache::lonnet::allowed('vgh',              unless(&Apache::lonnet::allowed('vgh',
                                       $env{'request.course.id'}.'/'.$marker)) {                                        $env{'request.course.id'}.'/'.$marker)) {
                 &display_group_links($r,$target,$marker,%groupinfo,'view');                  &display_group_links($r,$target,$marker,'view',%groupinfo);
                 return OK;                  return OK;
             }              }
         } else {          } else {
Line 244  ENDDOCUMENT Line 244  ENDDOCUMENT
                 if ($_ eq 'abb_links' && $caller eq 'grppg') {                  if ($_ eq 'abb_links' && $caller eq 'grppg') {
                     $r->print('<br /><input type="hidden" name="'.$_.                      $r->print('<br /><input type="hidden" name="'.$_.
                                           '" value="'.$syllabus{$_}.'" />');                                            '" value="'.$syllabus{$_}.'" />');
                     &display_group_links($r,$target,$marker,%groupinfo,'edit');                      &display_group_links($r,$target,$marker,'edit',%groupinfo);
                     $r->print('<br />');                      $r->print('<br />');
                 } elsif ($_ eq 'aaa_title') {                  } elsif ($_ eq 'aaa_title') {
                     if ($target ne 'tex') {                      if ($target ne 'tex') {
Line 310  ENDDOCUMENT Line 310  ENDDOCUMENT
 }  }
   
 sub display_group_links {  sub display_group_links {
     my ($r,$target,$marker,%groupinfo,$context) = @_;      my ($r,$target,$marker,$context,%groupinfo) = @_;
     my @available = ();      my @available = ();
                                                                                      
     my %menu = ();      my %menu = ();
     %{$menu{'email'}} = (      %{$menu{'email'}} = (
                         text => 'Group e-mail',                          text => 'Group e-mail',
Line 360  sub display_group_links { Line 359  sub display_group_links {
         if ($context eq 'edit') {          if ($context eq 'edit') {
             $output = 'No group functionality';              $output = 'No group functionality';
         } else {            } else {  
             $output = 'No group functionality (e.g., e-mail, discussion,chat or file upload) is currently available to you in this group: '.$marker;              $output = 'No group functionality (e.g., e-mail, discussion, chat or file upload) is currently available to you in this group: '.$marker;
         }          }
         if ($target eq 'tex') {          if ($target eq 'tex') {
             $r->print(&Apache::lonxml::xmlparse($r,'tex',$output));              $r->print(&Apache::lonxml::xmlparse($r,'tex',$output));

Removed from v.1.30  
changed lines
  Added in v.1.31


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