Diff for /loncom/interface/lonmodifycourse.pm between versions 1.53 and 1.54

version 1.53, 2010/03/31 20:09:07 version 1.54, 2010/05/18 16:13:31
Line 208  sub print_course_selection_page { Line 208  sub print_course_selection_page {
 sub print_modification_menu {  sub print_modification_menu {
     my ($r,$cdesc,$domdesc,$dom,$type) = @_;      my ($r,$cdesc,$domdesc,$dom,$type) = @_;
     &print_header($r,$type);      &print_header($r,$type);
     my ($ccrole,$setquota_text,$setparams_text,$cat_text);      my ($ccrole,$categorytitle,$setquota_text,$setparams_text,$cat_text);
     if ($type eq 'Community') {      if ($type eq 'Community') {
         $ccrole = 'co';          $ccrole = 'co';
     } else {      } else {
         $ccrole = 'cc';          $ccrole = 'cc';
     }       } 
     my $action = '/adm/modifycourse';  
     if ($type eq 'Community') {      if ($type eq 'Community') {
           $categorytitle = 'View/Modify Community Settings';
         $setquota_text = &mt('Total disk space allocated for storage of portfolio files in all groups in a community.');          $setquota_text = &mt('Total disk space allocated for storage of portfolio files in all groups in a community.');
         $setparams_text = 'View/Modify community owner';          $setparams_text = 'View/Modify community owner';
         $cat_text = 'View/Modify catalog settings for community';          $cat_text = 'View/Modify catalog settings for community';
     } else {      } else {
           $categorytitle = 'View/Modify Course Settings';
         $setquota_text = &mt('Total disk space allocated for storage of portfolio files in all groups in a course.');          $setquota_text = &mt('Total disk space allocated for storage of portfolio files in all groups in a course.');
         $setparams_text = 'View/Modify course owner, institutional code, and default authentication';          $setparams_text = 'View/Modify course owner, institutional code, and default authentication';
         $cat_text = 'View/Modify catalog settings for course';           $cat_text = 'View/Modify catalog settings for course'; 
     }      }
     my @menu =  
         (  
           { text => $setparams_text,  
              phase => 'setparms',  
           },  
           { text  => 'View/Modify quota for group portfolio files',  
             phase => 'setquota',  
           }  
     );  
     my %domconf = &Apache::lonnet::get_dom('configuration',['coursecategories'],$dom);      my %domconf = &Apache::lonnet::get_dom('configuration',['coursecategories'],$dom);
     my @additional_params = &catalog_settable($domconf{'coursecategories'},$type);      my @additional_params = &catalog_settable($domconf{'coursecategories'},$type);
     if (@additional_params > 0) {  
         push (@menu, { text => $cat_text,      sub phaseurl {
                        phase => 'catsettings',          my $phase = shift;
                      });          return "javascript:changePage(document.menu,'$phase')"
     }      }
     unless ($type eq 'Community') {      my @menu =
         push(@menu,          ({  categorytitle => $categorytitle,
            { text  => 'Display current settings for automated enrollment',          items => [
             phase => 'viewparms',              {
            }                  linktext => $setparams_text,
                   url => &phaseurl('setparms'),
                   permission => 1,
                   #help => '',
                   icon => 'mcrs.png',
                   linktitle => ''
               },
               {
                   linktext => 'View/Modify quota for group portfolio files',
                   url => &phaseurl('setquota'),
                   permission => 1,
                   #help => '',
                   icon => 'mcrs.png',
                   linktitle => ''
               },
               {
                   linktext => $cat_text,
                   url => &phaseurl('catsettings'),
                   permission => (@additional_params > 0),
                   #help => '',
                   icon => 'mcrs.png',
                   linktitle => ''
               },
               {
                   linktext => 'Display current settings for automated enrollment',
                   url => &phaseurl('viewparms'),
                   permission => ($type ne 'Community'),
                   #help => '',
                   icon => 'mcrs.png',
                   linktitle => ''
               },
           ]
           },
         );          );
     }  
     my $menu_html = '<h3>'.&mt('View/Modify settings for: ').      my $menu_html =
                     ' <span class="LC_nobreak">'.$cdesc.'</span></h3>'."\n";          '<h3>'
          .&mt('View/Modify settings for: [_1]',
                   '<span class="LC_nobreak">'.$cdesc.'</span>')
          .'</h3>'."\n".'<p>';
     if ($type eq 'Community') {      if ($type eq 'Community') {
         $menu_html .= &mt('Although almost all community settings can be modified by a Coordinator, the following may only be set or modified by a Domain Coordinator:');          $menu_html .= &mt('Although almost all community settings can be modified by a Coordinator, the following may only be set or modified by a Domain Coordinator:');
     } else {      } else {
         $menu_html .= &mt('Although almost all course settings can be modified by a Course Coordinator, the following may only be set or modified by a Domain Coordinator:');          $menu_html .= &mt('Although almost all course settings can be modified by a Course Coordinator, the following may only be set or modified by a Domain Coordinator:');
     }      }
     $menu_html .= '<ul>';      $menu_html .= '</p>'."\n".'<ul>';
     if ($type eq 'Community') {      if ($type eq 'Community') {
         $menu_html .= '<li>'.&mt('Community owner (permitted to assign Coordinator roles in the community).').'</li>';          $menu_html .= '<li>'.&mt('Community owner (permitted to assign Coordinator roles in the community).').'</li>';
     } else {      } else {
Line 265  sub print_modification_menu { Line 293  sub print_modification_menu {
     foreach my $item (@additional_params) {      foreach my $item (@additional_params) {
         if ($type eq 'Community') {          if ($type eq 'Community') {
             if ($item eq 'togglecats') {              if ($item eq 'togglecats') {
                 $menu_html .= '  <li>'.&mt('Hiding/unhiding a community from the catalog (although can be [_1]configured[_2] to be modifiable by a Coordinator in community context).','<a href="/adm/domainprefs?actions=coursecategories&phase=display">','</a>').'</li>'."\n";                  $menu_html .= '  <li>'.&mt('Hiding/unhiding a community from the catalog (although can be [_1]configured[_2] to be modifiable by a Coordinator in community context).','<a href="/adm/domainprefs?actions=coursecategories&amp;phase=display">','</a>').'</li>'."\n";
             } elsif ($item eq 'categorize') {              } elsif ($item eq 'categorize') {
                 $menu_html .= '  <li>'.&mt('Manual cataloging of a community (although can be [_1]configured[_2] to be modifiable by a Coordinator in community context).','<a href="/adm/domainprefs?actions=coursecategories&phase=display">','</a>').'</li>'."\n";                  $menu_html .= '  <li>'.&mt('Manual cataloging of a community (although can be [_1]configured[_2] to be modifiable by a Coordinator in community context).','<a href="/adm/domainprefs?actions=coursecategories&amp;phase=display">','</a>').'</li>'."\n";
             }              }
         } else {          } else {
             if ($item eq 'togglecats') {              if ($item eq 'togglecats') {
                 $menu_html .= '  <li>'.&mt('Hiding/unhiding a course from the course catalog (although can be [_1]configured[_2] to be modifiable by a Course Coordinator in course context).','<a href="/adm/domainprefs?actions=coursecategories&phase=display">','</a>').'</li>'."\n";                  $menu_html .= '  <li>'.&mt('Hiding/unhiding a course from the course catalog (although can be [_1]configured[_2] to be modifiable by a Course Coordinator in course context).','<a href="/adm/domainprefs?actions=coursecategories&amp;phase=display">','</a>').'</li>'."\n";
             } elsif ($item eq 'categorize') {              } elsif ($item eq 'categorize') {
                 $menu_html .= '  <li>'.&mt('Manual cataloging of a course (although can be [_1]configured[_2] to be modifiable by a Course Coordinator in course context).','<a href="/adm/domainprefs?actions=coursecategories&phase=display">','</a>').'</li>'."\n";                  $menu_html .= '  <li>'.&mt('Manual cataloging of a course (although can be [_1]configured[_2] to be modifiable by a Course Coordinator in course context).','<a href="/adm/domainprefs?actions=coursecategories&amp;phase=display">','</a>').'</li>'."\n";
             }              }
         }          }
     }      }
     $menu_html .= ' </ul>      $menu_html .=
 <form name="menu" method="post" action="'.$action.'" />'."\n".          ' </ul>'
     &hidden_form_elements();         .'<form name="menu" method="post" action="/adm/modifycourse">'
     foreach my $menu_item (@menu) {         ."\n"
         $menu_html.='<h3>';         .&hidden_form_elements();
         $menu_html.=  
                 qq|<a href="javascript:changePage(document.menu,'$menu_item->{'phase'}')">|;  
         $menu_html.= &mt($menu_item->{'text'}).'</a>';  
         $menu_html.='</h3>';  
     }  
           
     $r->print($menu_html);      $r->print($menu_html);
       $r->print(&Apache::lonhtmlcommon::generate_menu(@menu));
       $r->print('</form>');
     return;      return;
 }  }
   

Removed from v.1.53  
changed lines
  Added in v.1.54


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