Diff for /rat/lonpage.pm between versions 1.130 and 1.132

version 1.130, 2020/02/17 16:12:35 version 1.132, 2020/02/17 23:32:03
Line 898  sub get_buttons { Line 898  sub get_buttons {
             return;              return;
         }          }
     }      }
       my $crs_sec = $env{'request.course.id'} . (($env{'request.course.sec'} ne '')
                                                  ? "/$env{'request.course.sec'}"
                                                  : '');
     if ($hash->{'encrypted_'.$rid}) {      if ($hash->{'encrypted_'.$rid}) {
  $symb=&Apache::lonenc::encrypted($symb);   $symb=&Apache::lonenc::encrypted($symb);
  $esrc=&Apache::lonenc::encrypted($esrc);   $esrc=&Apache::lonenc::encrypted($esrc);
Line 927  sub get_buttons { Line 930  sub get_buttons {
     if (($hash->{'src_'.$rid}=~/$LONCAPA::assess_re/) &&      if (($hash->{'src_'.$rid}=~/$LONCAPA::assess_re/) &&
  ($hash->{'src_'.$rid} !~ m-^/uploaded/-)) {   ($hash->{'src_'.$rid} !~ m-^/uploaded/-)) {
   
  if (&Apache::lonnet::allowed('mgr',$env{'request.course.id'})) {   if ((&Apache::lonnet::allowed('mgr',$crs_sec)) ||
               (&Apache::lonnet::allowed('vgr',$crs_sec))) {
     $metainfo.=      $metainfo.=
  '<a href="/adm/grades?symb='.&escape($symb).   '<a href="/adm/grades?symb='.&escape($symb).
 #               '&command=submission" target="LONcatInfo">'.  #               '&command=submission" target="LONcatInfo">'.
Line 935  sub get_buttons { Line 939  sub get_buttons {
                 '<img src="/adm/lonMisc/subm_button.png" class="LC_icon"'.                  '<img src="/adm/lonMisc/subm_button.png" class="LC_icon"'.
                 ' alt="'.&mt('View Submissions for a Student or a Group of Students').'"'.                  ' alt="'.&mt('View Submissions for a Student or a Group of Students').'"'.
                 ' title="'.&mt('View Submissions for a Student or a Group of Students').'" />'.                  ' title="'.&mt('View Submissions for a Student or a Group of Students').'" />'.
  '</a>'.   '</a>';
           }
           if (&Apache::lonnet::allowed('mgr',$crs_sec)) {
               $metainfo.=
  '<a href="/adm/grades?symb='.&escape($symb).   '<a href="/adm/grades?symb='.&escape($symb).
 #               '&command=gradingmenu" target="LONcatInfo">'.  #               '&command=gradingmenu" target="LONcatInfo">'.
  '&command=gradingmenu">'.   '&command=gradingmenu">'.
Line 944  sub get_buttons { Line 951  sub get_buttons {
                 ' title="'.&mt('Content Grades').'" />'.                  ' title="'.&mt('Content Grades').'" />'.
  '</a>';   '</a>';
  }   }
  if (&Apache::lonnet::allowed('opa',$env{'request.course.id'})) {   if ((&Apache::lonnet::allowed('opa',$crs_sec)) ||
               (&Apache::lonnet::allowed('vpa',$crs_sec))) {
     $metainfo.=      $metainfo.=
  '<a href="/adm/parmset?symb='.&escape($symb).   '<a href="/adm/parmset?symb='.&escape($symb).
 #               '" target="LONcatInfo">'.  #               '" target="LONcatInfo">'.
Line 985  sub get_buttons { Line 993  sub get_buttons {
             if ((&Apache::lonnet::allowed('cre','/')) &&              if ((&Apache::lonnet::allowed('cre','/')) &&
                 (&Apache::lonnet::metadata($url,'sourceavail') eq 'open')) {                  (&Apache::lonnet::metadata($url,'sourceavail') eq 'open')) {
                 $viewsrcbutton = 1;                  $viewsrcbutton = 1;
             } elsif (&Apache::lonnet::allowed('vxc',$env{'request.course.id'})) {              } elsif (&Apache::lonnet::allowed('vxc',$crs_sec)) {
                 if ($url =~ m{^\Q/res/$cdom/\E($LONCAPA::match_username)/}) {                  if ($url =~ m{^\Q/res/$cdom/\E($LONCAPA::match_username)/}) {
                     my $auname = $1;                      my $auname = $1;
                     if (($env{'request.course.adhocsrcaccess'} ne '') &&                      if (($env{'request.course.adhocsrcaccess'} ne '') &&
                         (grep(/^\Q$auname\E$/,split(/,/,$env{'request.course.adhocsrcaccess'})))) {                          (grep(/^\Q$auname\E$/,split(/,/,$env{'request.course.adhocsrcaccess'})))) {
                         $viewsrcbutton = 1;                          $viewsrcbutton = 1;
                     } elsif ((&Apache::lonnet::metadata($url,'sourceavail') eq 'open') &&                      } elsif ((&Apache::lonnet::metadata($url,'sourceavail') eq 'open') &&
                              (&Apache::lonnet::allowed('bre','/'))) {                               (&Apache::lonnet::allowed('bre',$crs_sec))) {
                         $viewsrcbutton = 1;                          $viewsrcbutton = 1;
                     }                      }
                 }                  }

Removed from v.1.130  
changed lines
  Added in v.1.132


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