Diff for /loncom/interface/loncoursegroups.pm between versions 1.112 and 1.121

version 1.112, 2010/09/08 04:05:32 version 1.121, 2013/09/17 15:04:30
Line 31  use strict; Line 31  use strict;
 use Apache::lonnet;  use Apache::lonnet;
 use Apache::loncommon();  use Apache::loncommon();
 use Apache::lonhtmlcommon();  use Apache::lonhtmlcommon();
   use Apache::lonhtmlgateway;
 use Apache::lonlocal;  use Apache::lonlocal;
 use Apache::lonnavmaps();  use Apache::lonnavmaps();
 use Apache::longroup();  use Apache::longroup();
Line 416  END Line 417  END
                 }                  }
             }              }
         } else {          } else {
             $r->print(&mt('You are not currently a member of any active '.$gpterm.'s in this '.lc($crstype).'.'));              $r->print(
                   '<p class="LC_info">'
                  .&mt('You are not currently a member of any active '.$gpterm.'s'
                      .' in this '.lc($crstype).'.')
                  .'</p>'
               );
         }          }
     }      }
     return;      return;
Line 1276  sub reenable_folder { Line 1282  sub reenable_folder {
         $LONCAPA::map::resources[$idx] = $foldertitle.':'.$mapurl.          $LONCAPA::map::resources[$idx] = $foldertitle.':'.$mapurl.
                                          ':false:normal:res';                                           ':false:normal:res';
         $LONCAPA::map::order[1+$#LONCAPA::map::order]=$idx;          $LONCAPA::map::order[1+$#LONCAPA::map::order]=$idx;
         my ($outtext,$errtext) = &LONCAPA::map::storemap($allgrpsmap,1);          my ($outtext,$errtext) = &LONCAPA::map::storemap($allgrpsmap,1,1);
         if ($errtext) {          if ($errtext) {
             $outcome='<div class="LC_error">'              $outcome='<div class="LC_error">'
                     .&mt('An error occurred when saving updated parent folder to group:'                      .&mt('An error occurred when saving updated parent folder to group:'
Line 1341  sub modify_folders { Line 1347  sub modify_folders {
                     $LONCAPA::map::order[$i] = $LONCAPA::map::order[$i+1];                      $LONCAPA::map::order[$i] = $LONCAPA::map::order[$i+1];
                 }                  }
                 $#LONCAPA::map::order--;                  $#LONCAPA::map::order--;
                 my ($outtext,$errtext) = &LONCAPA::map::storemap($map,1);                  my ($outtext,$errtext) = &LONCAPA::map::storemap($map,1,1);
                 if ($errtext) {                  if ($errtext) {
                     $outcome='<div class="LC_error">'                      $outcome='<div class="LC_error">'
                             .&mt('An error occurred when saving updated parent folder to group:')                              .&mt('An error occurred when saving updated parent folder to group:')
Line 1487  sub header { Line 1493  sub header {
        {'add_entries' => $loaditems,});         {'add_entries' => $loaditems,});
     my $output = <<"END";      my $output = <<"END";
 $start_page  $start_page
 <form method="post" name="$state">  <form method="post" name="$state" action="">
   
 END  END
     if ($action eq 'create' || $action eq 'modify') {      if ($action eq 'create' || $action eq 'modify') {
Line 1547  sub build_members_list { Line 1553  sub build_members_list {
 sub group_files {  sub group_files {
     my ($group,$portpath,$numfiles,$numdirs) = @_;      my ($group,$portpath,$numfiles,$numdirs) = @_;
     my $dirptr=16384;      my $dirptr=16384;
     my @dir_list=&Apache::portfolio::get_dir_list($portpath,undef,$group);      my ($dirlistref,$listerror) = 
     foreach my $line (@dir_list) {          &Apache::portfolio::get_dir_list($portpath,undef,$group);
         my ($filename,$dom,undef,$testdir,undef,undef,undef,undef,$size,undef,$mtime,undef,undef,undef,$obs,undef)=split(/\&/,$line,16);      if (ref($dirlistref) eq 'ARRAY') {
         if (($filename !~ /^\.\.?$/) && ($filename !~ /\.meta$/ ) && ($filename !~ /(.*)\.(\d+)\.([^\.]*)$/) && ($filename ne 'no_such_dir')) {           foreach my $line (@{$dirlistref}) {
             if ($dirptr&$testdir) {              my ($filename,$dom,undef,$testdir,undef,undef,undef,undef,$size,undef,$mtime,undef,undef,undef,$obs,undef)=split(/\&/,$line,16);
                 $portpath .= '/'.$filename;              if (($filename !~ /^\.\.?$/) && ($filename !~ /\.meta$/ ) && ($filename !~ /(.*)\.(\d+)\.([^\.]*)$/) && ($filename ne 'no_such_dir')) { 
                 $$numdirs ++;                  if ($dirptr&$testdir) {
                 &group_files($group,$portpath,$numfiles,$numdirs)                      $portpath .= '/'.$filename;
             } else {                      $$numdirs ++;
                 $$numfiles ++;                      &group_files($group,$portpath,$numfiles,$numdirs)
                   } else {
                       $$numfiles ++;
                   }
             }              }
         }          }
     }      }
Line 2008  sub print_current_settings { Line 2017  sub print_current_settings {
         dfac => 'Default access dates',          dfac => 'Default access dates',
         ygrs => "Your group selections - ",          ygrs => "Your group selections - ",
         tfwa => "The following settings will apply to the group:",          tfwa => "The following settings will apply to the group:",
         difn => 'Different collaborative tools<br />for different members:',  
         stda => 'Start date:',          stda => 'Start date:',
         enda => 'End date:',          enda => 'End date:',
     );      );
       $lt{'difn'} = &mt('Different collaborative tools[_1]for different members:','<br />');
     my $showstart = &Apache::lonlocal::locallocaltime($startdate);      my $showstart = &Apache::lonlocal::locallocaltime($startdate);
     my $showend;      my $showend;
     if ($enddate == 0) {      if ($enddate == 0) {
Line 2251  sub privilege_specificity { Line 2260  sub privilege_specificity {
                 "for users who receive specific sections/roles in the course ",                  "for users who receive specific sections/roles in the course ",
       'asyo' => "As you have chosen not to include any collaborative tools ".        'asyo' => "As you have chosen not to include any collaborative tools ".
                 "in the group, no default optional privileges need to be set.",                  "in the group, no default optional privileges need to be set.",
       'plin' => 'Indicate which <b>optional</b> privileges members '.  
                 'will receive by default for a specific tool.',                  'will receive by default for a specific tool.',
       'oppr' => 'Optional privileges',        'oppr' => 'Optional privileges',
       'defp' => 'The default privileges new members will receive are:',         'defp' => 'The default privileges new members will receive are:', 
     );      );
       $lt{'plin'} = &mt('Indicate which [_1]optional[_2] privileges members '.
                         'will receive by default for a specific tool.','<b>','</b>');
     if ($crstype eq 'Community') {      if ($crstype eq 'Community') {
         $lt{'thes'} = &mt('These will be the privileges given to members assigned in the future via automatic group assignment for users who receive specific sections/roles in the community ');           $lt{'thes'} = &mt('These will be the privileges given to members assigned in the future via automatic group assignment for users who receive specific sections/roles in the community '); 
     }      }
Line 3525  sub process_membership { Line 3535  sub process_membership {
     if ($num_ok) {      if ($num_ok) {
         my $msgall ='';          my $msgall ='';
         foreach my $type (sort(keys(%added))) {          foreach my $type (sort(keys(%added))) {
             my $message = &mt('The following users were successfully [_1]',$type);               my $message = &mt("The following users were successfully $type"); 
             if (!($type eq 'deleted' || $type eq 'expired')) {                 if (!($type eq 'deleted' || $type eq 'expired')) {   
                 $message .= &mt(' with the following privileges');                  $message .= &mt(' with the following privileges');
             }              }
Line 4030  sub map_updater { Line 4040  sub map_updater {
         $LONCAPA::map::resources[$newidx] = $itemtitle.':'.$newmapurl.          $LONCAPA::map::resources[$newidx] = $itemtitle.':'.$newmapurl.
                                                  ':false:normal:res';                                                   ':false:normal:res';
         $LONCAPA::map::order[1+$#LONCAPA::map::order]=$newidx;          $LONCAPA::map::order[1+$#LONCAPA::map::order]=$newidx;
         my ($outtext,$errtext) = &LONCAPA::map::storemap($parentmap,1);          my ($outtext,$errtext) = &LONCAPA::map::storemap($parentmap,1,1);
         if ($errtext) {          if ($errtext) {
             $outcome = '<div class="LC_error">'              $outcome = '<div class="LC_error">'
                       .&mt('Error saving updated parent folder.')." ($parentmap):  $errtext"                        .&mt('Error saving updated parent folder.')." ($parentmap):  $errtext"
Line 4111  sub create_homepage { Line 4121  sub create_homepage {
     my ($cdom,$cnum,$name,$groupinfo,$tools,$gpterm,$ucgpterm,$now) = @_;      my ($cdom,$cnum,$name,$groupinfo,$tools,$gpterm,$ucgpterm,$now) = @_;
     my $functionality = join(',',@{$tools});      my $functionality = join(',',@{$tools});
     my $content = &unescape($$groupinfo{description});      my $content = &unescape($$groupinfo{description});
     $content=~s/\s+$//s;      chomp($content);
     $content=~s/^\s+//s;      my $gateway = Apache::lonhtmlgateway->new();
     $content=~s/\<br\s*\/*\>$//s;      $content = $gateway->process_incoming_html($content,1);
     $content=&Apache::lonfeedback::clear_out_html($content,1);  
   
     my %pageinfo = (      my %pageinfo = (
                      'aaa_title' => "$ucgpterm: $name",                       'aaa_title' => "$ucgpterm: $name",
Line 4200  sub validate_groupname { Line 4209  sub validate_groupname {
     }      }
     if ($action eq 'create') {       if ($action eq 'create') { 
  if (exists($curr_groups{$groupname})) {   if (exists($curr_groups{$groupname})) {
     return $exitmsg.$lt{'cnnb'}.&mt('an existing [_1]',$gpterm).      return $exitmsg.$lt{'cnnb'}.&mt("an existing $gpterm").
            $lt{'inth'}.'.<br />'.$lt{'grna'};             $lt{'inth'}.'.<br />'.$lt{'grna'};
         } elsif (exists($deleted_groups{$groupname})) {          } elsif (exists($deleted_groups{$groupname})) {
             return $exitmsg.$lt{'cnnb'}.&mt('a [_1] which previously existed',$gpterm).              return $exitmsg.$lt{'cnnb'}.&mt("a $gpterm which previously existed").
                    $lt{'inth'}.'.<br />'.$lt{'grna'};                     $lt{'inth'}.'.<br />'.$lt{'grna'};
         }          }
     } elsif ($action eq 'modify') {      } elsif ($action eq 'modify') {
         unless(exists($curr_groups{$groupname})) {          unless(exists($curr_groups{$groupname})) {
             $earlyout = &mt('[_1] name:',$ucgpterm).' '.$groupname.$lt{'thgr'}.              $earlyout = &mt("$ucgpterm name:").' '.$groupname.$lt{'thgr'}.
                         $lt{'inth'};                          $lt{'inth'};
             return $earlyout;              return $earlyout;
         }          }

Removed from v.1.112  
changed lines
  Added in v.1.121


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