version 1.69, 2007/01/03 21:55:37
|
version 1.81, 2008/12/03 21:59:37
|
Line 76 sub handler {
|
Line 76 sub handler {
|
|
|
my %functions = ( |
my %functions = ( |
email => 'E-mail', |
email => 'E-mail', |
discussion => 'Discussion boards', |
discussion => 'Discussion Boards', |
chat => 'Chat', |
chat => 'Chat', |
files => 'File repository', |
files => 'File Repository', |
roster => 'Membership roster', |
roster => 'Membership Roster', |
homepage => $ucgpterm.' home page', |
homepage => $ucgpterm.' home page', |
); |
); |
|
|
Line 111 sub handler {
|
Line 111 sub handler {
|
$crstype); |
$crstype); |
} |
} |
} else { |
} else { |
$r->print(&mt('You do not have [_1] administration '. |
$r->print('<div class="LC_warning">' |
'privileges in this [_2]',$gpterm,lc($crstype))); |
.&mt('You do not have '.$gpterm.' administration ' |
|
.'privileges in this '.lc($crstype).'.') |
|
.'</div>'); |
} |
} |
} else { |
} else { |
&print_main_menu($r,$cdom,$cnum,\%functions,\%idx,$view_permission, |
&print_main_menu($r,$cdom,$cnum,\%functions,\%idx,$view_permission, |
Line 140 function openGroupRoster(group,status) {
|
Line 142 function openGroupRoster(group,status) {
|
rosterbrowser.focus(); |
rosterbrowser.focus(); |
}\n|; |
}\n|; |
$r->print(&header('Groups',$jscript,$action,$state)); |
$r->print(&header('Groups',$jscript,$action,$state)); |
if ($env{'form.refpage'} eq 'enrl') { |
if ($env{'form.refpage'} eq 'cusr') { |
&Apache::lonhtmlcommon::add_breadcrumb |
&Apache::lonhtmlcommon::add_breadcrumb |
({href=>"/adm/dropadd", |
({href=>"/adm/createuser", |
text=>"Enrollment Manager"}); |
text=>"User Management"}); |
} |
} |
&Apache::lonhtmlcommon::add_breadcrumb |
&Apache::lonhtmlcommon::add_breadcrumb |
({href=>"/adm/coursegroups", |
({href=>"/adm/coursegroups", |
text=>"Groups"}); |
text=>"Groups"}); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Groups')); |
my $helpitem; |
|
if ($manage_permission) { |
|
$helpitem = 'Creating_Groups'; |
|
} |
|
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Groups',$helpitem)); |
&display_groups($r,$cdom,$cnum,$functions,$idx,$view_permission, |
&display_groups($r,$cdom,$cnum,$functions,$idx,$view_permission, |
$manage_permission,$action,$state,$gpterm,$ucgpterm, |
$manage_permission,$action,$state,$gpterm,$ucgpterm, |
$crstype); |
$crstype); |
Line 189 sub display_groups {
|
Line 195 sub display_groups {
|
dius => 'Disk Use (%)', |
dius => 'Disk Use (%)', |
nogr => 'No groups exist.', |
nogr => 'No groups exist.', |
crng => 'Create a new group', |
crng => 'Create a new group', |
|
redg => 'Re-enable a deleted group', |
alth => 'Although your current role has privileges'. |
alth => 'Although your current role has privileges'. |
' to view any existing groups in this '. |
' to view any existing groups in this '. |
lc($crstype).', you do not have privileges '. |
lc($crstype).', you do not have privileges '. |
Line 198 sub display_groups {
|
Line 205 sub display_groups {
|
if (!defined($action)) { |
if (!defined($action)) { |
$action = 'view'; |
$action = 'view'; |
} |
} |
my $status; |
my ($status,$reenable_link); |
if ($action eq 'reenable') { |
if ($action eq 'reenable') { |
$status = 'deleted_groups'; |
$status = 'deleted_groups'; |
|
} else { |
|
if ($manage_permission) { |
|
my %deleted_groups = |
|
&Apache::longroup::coursegroups($cdom,$cnum,undef,'deleted_groups'); |
|
if (keys(%deleted_groups) > 0) { |
|
$reenable_link = ' <a href="/adm/coursegroups?action=reenable&refpage='.$env{'form.refpage'}.'">'.$lt{'redg'}.'</a>'; |
|
} |
|
} |
} |
} |
my %curr_groups = &Apache::longroup::coursegroups($cdom,$cnum,undef, |
my %curr_groups = &Apache::longroup::coursegroups($cdom,$cnum,undef, |
$status); |
$status); |
|
|
if (%curr_groups) { |
if (%curr_groups) { |
if ($manage_permission) { |
if ($manage_permission) { |
if (!exists($env{'form.refpage'})) { |
if ($action ne 'reenable') { |
$r->print('<br /><a href="/adm/coursegroups?action=create">'.$lt{'crng'}.'</a>'); |
$r->print('<br /><a href="/adm/coursegroups?action=create&refpage='.$env{'form.refpage'}.'">'.$lt{'crng'}.'</a>'); |
|
} |
|
if ($reenable_link) { |
|
$r->print($reenable_link); |
} |
} |
} |
} |
$r->print('<br /><br />'); |
$r->print('<br /><br />'); |
Line 237 END
|
Line 256 END
|
my $members_result = &group_members($cdom,$cnum,$group, |
my $members_result = &group_members($cdom,$cnum,$group, |
\%grp_info); |
\%grp_info); |
my $port_path = '/userfiles/groups/'.$group.'/portfolio'; |
my $port_path = '/userfiles/groups/'.$group.'/portfolio'; |
my $port_dir = &Apache::loncommon::propath($cdom,$cnum).$port_path; |
|
my $totaldirs = 0; |
my $totaldirs = 0; |
my $totalfiles = 0; |
my $totalfiles = 0; |
&group_files($group,$port_dir,\$totalfiles,\$totaldirs); |
&group_files($group,$port_path,\$totalfiles,\$totaldirs); |
$grp_info{$group}{'totalfiles'} = $totalfiles; |
$grp_info{$group}{'totalfiles'} = $totalfiles; |
$grp_info{$group}{'totaldirs'} = $totaldirs; |
$grp_info{$group}{'totaldirs'} = $totaldirs; |
my $diskuse = &Apache::lonnet::diskusage($cdom,$cnum,$port_dir); |
my $getpropath = 1; |
|
my $diskuse = &Apache::lonnet::diskusage($cdom,$cnum,$port_path, $getpropath); |
if ($grp_info{$group}{'quota'} > 0) { |
if ($grp_info{$group}{'quota'} > 0) { |
my $pct_use = 0.1 * $diskuse/$grp_info{$group}{'quota'}; |
my $pct_use = 0.1 * $diskuse/$grp_info{$group}{'quota'}; |
$grp_info{$group}{'diskuse'} = sprintf("%.0f",$pct_use); |
$grp_info{$group}{'diskuse'} = sprintf("%.0f",$pct_use); |
Line 312 END
|
Line 331 END
|
} |
} |
$link .= '">'.$lt{$action}.'</a>'; |
$link .= '">'.$lt{$action}.'</a>'; |
if ($action eq 'view') { |
if ($action eq 'view') { |
if (($manage_permission) && |
if ($manage_permission) { |
($env{'form.refpage'} ne 'enrl')) { |
|
$link .= ' '.$actionlinks{'modify'}. |
$link .= ' '.$actionlinks{'modify'}. |
$group.'">'.$lt{'modify'}.'</a>'. |
$group.'">'.$lt{'modify'}.'</a>'. |
' '.$actionlinks{'delete'}. |
' '.$actionlinks{'delete'}. |
Line 330 END
|
Line 348 END
|
'<td>'.$functionality.'</td>'. |
'<td>'.$functionality.'</td>'. |
'<td align="right">'.$quota.'</td>'. |
'<td align="right">'.$quota.'</td>'. |
'<td align="right">'.$totalmembers.'</td>'. |
'<td align="right">'.$totalmembers.'</td>'. |
'<td align="right"><nobr>'.&mt('Files: ').$totalfiles.'</nobr><br /><nobr>'.&mt('Folders: ').$totaldirs.'</nobr></td>'. |
'<td align="right">'. |
|
'<div class="LC_nobreak">'.&mt('Files: [_1]',$totalfiles).'</div>'. |
|
'<div class="LC_nobreak">'.&mt('Folders: [_1]',$totaldirs).'</div>'. |
|
'</td>'. |
'<td align="right">'.$boards.'</td>'. |
'<td align="right">'.$boards.'</td>'. |
'<td align="right">'.$diskuse.'</td>'. |
'<td align="right">'.$diskuse.'</td>'. |
&Apache::loncommon::end_data_table_row()); |
&Apache::loncommon::end_data_table_row()); |
Line 349 END
|
Line 370 END
|
} else { |
} else { |
$r->print($lt{'nogr'}); |
$r->print($lt{'nogr'}); |
if ($manage_permission) { |
if ($manage_permission) { |
if (!exists($env{'form.refpage'})) { |
$r->print('<br /><br /><a href="/adm/coursegroups?action=create&refpage='.$env{'form.refpage'}.'">'.$lt{'crng'}.'</a>'); |
$r->print('<br /><br /><a href="/adm/coursegroups?action=create">'.$lt{'crng'}.'</a>'); |
if ($action ne 'reenable') { |
|
if ($reenable_link) { |
|
$r->print($reenable_link); |
|
} |
} |
} |
} else { |
} else { |
$r->print('<br /><br />'.$lt{'alth'}); |
$r->print('<br /><br />'.$lt{'alth'}); |
|
|
} |
} |
} |
} |
} else { |
} else { |
Line 372 END
|
Line 395 END
|
} |
} |
} |
} |
} else { |
} else { |
$r->print(&mt('You are not currently a member of any '. |
$r->print(&mt('You are not currently a member of any active '.$gpterm.'s in this '.lc($crstype).'.')); |
'active [_1]s in this [_2]',$gpterm, |
|
lc($crstype))); |
|
} |
} |
} |
} |
return; |
return; |
Line 388 sub group_administration {
|
Line 409 sub group_administration {
|
my @types = (); |
my @types = (); |
my @roles = (); |
my @roles = (); |
my @sections = (); |
my @sections = (); |
my @buildsections = (); |
|
my %users = (); |
my %users = (); |
my %userdata = (); |
my %userdata = (); |
my @members = (); |
my @members = (); |
Line 548 sub group_administration {
|
Line 568 sub group_administration {
|
} |
} |
if (defined($env{'form.sectionpick'})) { |
if (defined($env{'form.sectionpick'})) { |
@sections=&Apache::loncommon::get_env_multiple('form.sectionpick'); |
@sections=&Apache::loncommon::get_env_multiple('form.sectionpick'); |
if (grep/^all$/,@sections) { |
|
@buildsections = sort {$a cmp $b} keys(%sectioncount); |
|
} else { |
|
@buildsections = @sections; |
|
} |
|
} |
} |
} |
} |
|
|
if (($state eq 'pick_members') || ($state eq 'pick_privs') || ($state eq 'change_privs')) { |
if (($state eq 'pick_members') || ($state eq 'pick_privs') || ($state eq 'change_privs')) { |
&build_members_list($cdom,$cnum,\@types,\@roles,\@buildsections,\%users, |
&build_members_list($cdom,$cnum,\@types,\@roles,\@sections,\%users, |
\%userdata); |
\%userdata); |
} |
} |
if ($state eq 'pick_members') { |
if ($state eq 'pick_members') { |
Line 848 function changeSort(caller) {
|
Line 863 function changeSort(caller) {
|
$r->print(&header("Groups Manager", |
$r->print(&header("Groups Manager", |
$jscript,$action,$state,$page,$loaditems)); |
$jscript,$action,$state,$page,$loaditems)); |
|
|
if ($env{'form.refpage'} eq 'enrl') { |
if ($env{'form.refpage'} eq 'cusr') { |
&Apache::lonhtmlcommon::add_breadcrumb |
&Apache::lonhtmlcommon::add_breadcrumb |
({href=>"/adm/dropadd", |
({href=>"/adm/createuser", |
text=>"Enrollment Manager", |
text=>"User Management", |
faq=>9,bug=>'Instructor Interface',}); |
faq=>9,bug=>'Instructor Interface',}); |
if ($action eq 'modify' || $action eq 'delete') { |
if ($action eq 'modify' || $action eq 'delete') { |
&Apache::lonhtmlcommon::add_breadcrumb |
&Apache::lonhtmlcommon::add_breadcrumb |
({href=>"/adm/coursegroups?refpage=enrl&action=$action", |
({href=>"/adm/coursegroups?refpage=cusr&action=$action", |
text=>"Groups", |
text=>"Groups", |
faq=>9,bug=>'Instructor Interface',}); |
faq=>9,bug=>'Instructor Interface',}); |
} |
} |
Line 1122 sub display_control {
|
Line 1137 sub display_control {
|
sub verify_delete { |
sub verify_delete { |
my ($r,$groupname,$formname,$action,$page,$states,$stored) = @_; |
my ($r,$groupname,$formname,$action,$page,$states,$stored) = @_; |
$r->print(&Apache::lonhtmlcommon::echo_form_input([])); |
$r->print(&Apache::lonhtmlcommon::echo_form_input([])); |
$r->print(&mt("You have requested deletion of the following group: ").'<i>'. |
$r->print(&mt('You have requested deletion of the group [_1].' |
$stored->{'description'}.'</i>'. |
,'<i>'.$stored->{'description'}.'</i>'). |
'<br /><br />'.&mt('When a group is deleted the following occurs:').'<ul>'. |
'<br /><br />'.&mt('When a group is deleted the following occurs:').'<ul>'. |
'<li>'.&mt('All group membership is terminated.').'</li>'. |
'<li>'.&mt('All group membership is terminated.').'</li>'. |
'<li>'.&mt('The group ceases to be available either for viewing or for modification of group settings and membership.').'</li>'. |
'<li>'.&mt('The group ceases to be available either for viewing or for modification of group settings and membership.').'</li>'. |
Line 1132 sub verify_delete {
|
Line 1147 sub verify_delete {
|
my $prevtext = &mt('Go back'); |
my $prevtext = &mt('Go back'); |
my $nexttext = &mt('Delete group'); |
my $nexttext = &mt('Delete group'); |
my $prev; |
my $prev; |
if ($env{'form.refpage'} eq 'enrl') { |
if ($env{'form.refpage'} eq 'cusr') { |
$prev = 'view'; |
$prev = 'view'; |
} |
} |
&display_navbuttons($r,$formname,$prev,$prevtext, |
&display_navbuttons($r,$formname,$prev,$prevtext, |
Line 1151 sub delete_group {
|
Line 1166 sub delete_group {
|
my @deleted; |
my @deleted; |
my @undeleted; |
my @undeleted; |
my %usersettings; |
my %usersettings; |
|
my $context = 'deletegroup'; |
foreach my $key (sort(keys(%membership))) { |
foreach my $key (sort(keys(%membership))) { |
if ($key =~ /^\Q$groupname\E:([^:]+:[^:]+)$/) { |
if ($key =~ /^\Q$groupname\E:([^:]+:[^:]+)$/) { |
my $user = $1; |
my $user = $1; |
Line 1160 sub delete_group {
|
Line 1176 sub delete_group {
|
$usersettings{$groupname.':'.$user} = $now.':-1:'.$userprivs; |
$usersettings{$groupname.':'.$user} = $now.':-1:'.$userprivs; |
if (&Apache::lonnet::modify_group_roles($cdom,$cnum, |
if (&Apache::lonnet::modify_group_roles($cdom,$cnum, |
$groupname,$user, |
$groupname,$user, |
$now,'-1',$userprivs) |
$now,'-1',$userprivs, |
|
'',$context) |
eq 'ok') { |
eq 'ok') { |
$num_ok ++; |
$num_ok ++; |
push(@deleted,$user); |
push(@deleted,$user); |
Line 1177 sub delete_group {
|
Line 1194 sub delete_group {
|
\%usersettings); |
\%usersettings); |
} |
} |
if ($num_fail > 0) { |
if ($num_fail > 0) { |
$r->print(&mt('Group deletion failed because deletion of [_1] out of [_2] members failed.',$num_fail,$num_users)); |
$r->print('<div class="LC_error">' |
|
.&mt('Group deletion failed because deletion of [_1] out of [_2] members failed.' |
|
,$num_fail,$num_users) |
|
.'</div>'); |
|
|
} else { |
} else { |
my ($result,$message) = |
my ($result,$message) = |
Line 1186 sub delete_group {
|
Line 1206 sub delete_group {
|
if ($result eq 'ok') { |
if ($result eq 'ok') { |
my $outcome = &modify_folders($cdom,$cnum,$groupname); |
my $outcome = &modify_folders($cdom,$cnum,$groupname); |
if ($outcome eq '') { |
if ($outcome eq '') { |
$r->print(&mt('Group successfully deleted.')); |
$r->print('<div class="LC_success">' |
|
.&mt('Group successfully deleted.') |
|
.'</div>'); |
} else { |
} else { |
$r->print(&mt("Although the group was deleted, an error ([_1]) occurred when removing the group's folder from the 'Course Groups' folder.",$outcome)); |
$r->print('<div class="LC_error">' |
|
.&mt("Although the group was deleted, an error occurred when removing" |
|
." the group's folder from the 'Course Groups' folder: [_1]",$outcome) |
|
.'</div>'); |
} |
} |
} else { |
} else { |
$r->print(&mt('Group deletion failed.')); |
$r->print('<div class="LC_error">' |
|
.&mt('Group deletion failed.') |
|
.'</div>'); |
} |
} |
} |
} |
return; |
return; |
Line 1202 sub reenable_folder {
|
Line 1229 sub reenable_folder {
|
my $outcome; |
my $outcome; |
my $crspath = '/uploaded/'.$cdom.'/'.$cnum.'/'; |
my $crspath = '/uploaded/'.$cdom.'/'.$cnum.'/'; |
my $allgrpsmap = $crspath.'group_allfolders.sequence'; |
my $allgrpsmap = $crspath.'group_allfolders.sequence'; |
my $foldertitle = &mt('Course Folder -').$description; |
my $foldertitle = &mt('Course Folder -[_1]',$description); |
my $mapurl = $crspath.'group_folder_'. |
my $mapurl = $crspath.'group_folder_'. |
$groupname.'.sequence'; |
$groupname.'.sequence'; |
my ($errtext,$fatal)=&LONCAPA::map::mapread($allgrpsmap); |
my ($errtext,$fatal)=&LONCAPA::map::mapread($allgrpsmap); |
if ($fatal) { |
if ($fatal) { |
$outcome=&mt('Error reading contents of parent folder to group'). |
$outcome='<div class="LC_error">' |
" ($allgrpsmap): $errtext".'<br />'; |
.&mt('An error occurred when reading contents of parent folder to group:') |
|
."<br />($allgrpsmap): $errtext" |
|
.'</div>'; |
} else { |
} else { |
my $idx=&LONCAPA::map::getresidx($mapurl); |
my $idx=&LONCAPA::map::getresidx($mapurl); |
$LONCAPA::map::resources[$idx] = $foldertitle.':'.$mapurl. |
$LONCAPA::map::resources[$idx] = $foldertitle.':'.$mapurl. |
Line 1216 sub reenable_folder {
|
Line 1245 sub reenable_folder {
|
$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); |
if ($errtext) { |
if ($errtext) { |
$outcome = &mt('Error storing updated parent folder to group'). |
$outcome='<div class="LC_error">' |
"- $allgrpsmap - $errtext".'<br />'; |
.&mt('An error occurred when saving updated parent folder to group:' |
|
,"<br />$allgrpsmap - $errtext") |
|
.'</div>'; |
} else { |
} else { |
my ($furl,$ferr) = |
my ($furl,$ferr) = |
&Apache::lonuserstate::readmap($cdom.'/'.$cnum); |
&Apache::lonuserstate::readmap($cdom.'/'.$cnum); |
Line 1242 sub modify_folders {
|
Line 1273 sub modify_folders {
|
$map = '/'.$map; |
$map = '/'.$map; |
my ($errtext,$fatal) = &LONCAPA::map::mapread($map); |
my ($errtext,$fatal) = &LONCAPA::map::mapread($map); |
if ($fatal) { |
if ($fatal) { |
$outcome=&mt('Error reading contents of parent folder to group'). |
$outcome='<div class="LC_error">' |
" ($map): $errtext".'<br />'; |
.&mt('An error occurred when reading contents of parent folder to group:') |
|
."<br />($map): $errtext" |
|
.'</div>'; |
} else { |
} else { |
my $idx = 0; |
my $idx = 0; |
my $grpidx; |
my $grpidx; |
Line 1266 sub modify_folders {
|
Line 1299 sub modify_folders {
|
$#LONCAPA::map::order--; |
$#LONCAPA::map::order--; |
my ($outtext,$errtext) = &LONCAPA::map::storemap($map,1); |
my ($outtext,$errtext) = &LONCAPA::map::storemap($map,1); |
if ($errtext) { |
if ($errtext) { |
$outcome = &mt('Error storing updated parent folder to group'). "- $map - $errtext".'<br />'; |
$outcome='<div class="LC_error">' |
|
.&mt('An error occurred when saving updated parent folder to group:') |
|
."<br />$map - $errtext" |
|
.'</div>'; |
} else { |
} else { |
my ($furl,$ferr) = |
my ($furl,$ferr) = |
&Apache::lonuserstate::readmap($cdom.'/'.$cnum); |
&Apache::lonuserstate::readmap($cdom.'/'.$cnum); |
Line 1280 sub modify_folders {
|
Line 1316 sub modify_folders {
|
sub verify_reenable { |
sub verify_reenable { |
my ($r,$groupname,$formname,$action,$page,$states,$stored) = @_; |
my ($r,$groupname,$formname,$action,$page,$states,$stored) = @_; |
$r->print(&Apache::lonhtmlcommon::echo_form_input([])); |
$r->print(&Apache::lonhtmlcommon::echo_form_input([])); |
$r->print(&mt("You have requested enabling the following previously deleted group: ").'<i>'. |
$r->print(&mt('You have requested enabling the previously deleted group [_1].' |
$stored->{'description'}.'</i>'. |
,'<i>'.$stored->{'description'}.'</i>'). |
'<br /><br />'.&mt('When a deleted group is re-enabled the following occurs:').'<ul>'. |
'<br /><br />'.&mt('When a deleted group is re-enabled the following occurs:').'<ul>'. |
'<li>'.&mt('Group settings and membership at the time the group was deleted are reinstated.').'</li>'. |
'<li>'.&mt('Group settings and membership at the time the group was deleted are reinstated.').'</li>'. |
'<li>'.&mt('A group folder is added to the "Course Groups" folder which contains folders for all groups in the course.').'</li></ul>'); |
'<li>'.&mt('A group folder is added to the "Course Groups" folder which contains folders for all groups in the course.').'</li></ul>'); |
my $prevtext = &mt('Go back'); |
my $prevtext = &mt('Go back'); |
my $nexttext = &mt('Reenable group'); |
my $nexttext = &mt('Reenable group'); |
my $prev; |
my $prev; |
if ($env{'form.refpage'} eq 'enrl') { |
if ($env{'form.refpage'} eq 'cusr') { |
$prev = 'view'; |
$prev = 'view'; |
} |
} |
&display_navbuttons($r,$formname,$prev,$prevtext, |
&display_navbuttons($r,$formname,$prev,$prevtext, |
Line 1302 sub reenable_group {
|
Line 1338 sub reenable_group {
|
&Apache::longroup::coursegroups($cdom,$cnum,$groupname, |
&Apache::longroup::coursegroups($cdom,$cnum,$groupname, |
'deleted_groups'); |
'deleted_groups'); |
if (keys(%groups) == 0) { |
if (keys(%groups) == 0) { |
$r->print(&mt('The group ([_1]) was not re-enabled, because it is not a deleted group.<br />Perhaps it has already been re-enabled?',$groupname)); |
$r->print(&mt('The group [_1] was not re-enabled, because it is not a deleted group.[_2]Perhaps it has already been re-enabled?','<i>'.$groupname.'</i>'),'<br />'); |
return; |
return; |
} |
} |
my %groupinfo = |
my %groupinfo = |
Line 1320 sub reenable_group {
|
Line 1356 sub reenable_group {
|
my $num_users = 0; |
my $num_users = 0; |
my $num_ok = 0; |
my $num_ok = 0; |
my $num_fail = 0; |
my $num_fail = 0; |
|
my $context = 'reenablegroup'; |
my (%usersettings,@enabled,@unenabled); |
my (%usersettings,@enabled,@unenabled); |
my ($result,$message) = |
my ($result,$message) = |
&Apache::lonnet::toggle_coursegroup_status($cdom,$cnum,$groupname, |
&Apache::lonnet::toggle_coursegroup_status($cdom,$cnum,$groupname, |
Line 1339 sub reenable_group {
|
Line 1376 sub reenable_group {
|
if (&Apache::lonnet::modify_group_roles($cdom,$cnum, |
if (&Apache::lonnet::modify_group_roles($cdom,$cnum, |
$groupname,$user, |
$groupname,$user, |
$defend,$defstart, |
$defend,$defstart, |
$userprivs) eq 'ok') { |
$userprivs,'', |
|
$context) eq 'ok') { |
$num_ok ++; |
$num_ok ++; |
push(@enabled,$user); |
push(@enabled,$user); |
} else { |
} else { |
Line 1355 sub reenable_group {
|
Line 1393 sub reenable_group {
|
&Apache::lonnet::modify_coursegroup_membership($cdom,$cnum, |
&Apache::lonnet::modify_coursegroup_membership($cdom,$cnum, |
\%usersettings); |
\%usersettings); |
if ($roster_result eq 'ok') { |
if ($roster_result eq 'ok') { |
$r->print(&mt('Membership reinstated for [_1] users, each with start and end dates for group access set to defaults: [_2] and [_3]',$num_ok,$showstart,$showend).'<br />'); |
$r->print('<div class="LC_success">' |
|
.&mt('Membership reinstated for [quant,_1,user], each with start and end dates for group access set to defaults: [_2] and [_3]',$num_ok,$showstart,$showend) |
|
.'</div>'); |
} |
} |
} else { |
} else { |
$r->print(&mt('A problem occurred when trying to reinstate [_1] of the [_2] members of the pre-existing group.',$num_fail,$num_users).'<br />'); |
$r->print('<div class="LC_error">' |
|
.&mt('A problem occurred when trying to reinstate [_1] of the [_2] members of the pre-existing group.',$num_fail,$num_users) |
|
.'</div>'); |
} |
} |
} else { |
} else { |
$r->print(&mt('There were no group members to reinstate, as none were removed when the group was deleted.').'<br />'); |
$r->print('<div class="LC_info">' |
|
.&mt('There were no group members to reinstate, as none were removed when the group was deleted.') |
|
.'</div>'); |
} |
} |
my $outcome = &reenable_folder($cdom,$cnum,$groupname,$description); |
my $outcome = &reenable_folder($cdom,$cnum,$groupname,$description); |
if ($outcome eq '') { |
if ($outcome eq '') { |
$r->print(&mt('Group successfully re-enabled.')); |
$r->print('<div class="LC_success">' |
} else { |
.&mt('Group successfully re-enabled.') |
$r->print(&mt("Although the group was re-enabled, an error ([_1]) occurred when adding the group's folder to the 'Course Groups' folder.",$outcome)); |
.'</div>'); |
|
} else { |
|
$r->print('<div class="LC_error">' |
|
.&mt("Although the group was re-enabled, an error occurred when adding the group's folder to the 'Course Groups' folder: [_1]",$outcome) |
|
.'</div>'); |
} |
} |
} else { |
} else { |
$r->print(&mt('Re-enabling group failed')); |
$r->print('<div class="LC_error">' |
|
.&mt('Re-enabling group failed.') |
|
.'</div>'); |
} |
} |
return; |
return; |
} |
} |
Line 1442 sub build_members_list {
|
Line 1492 sub build_members_list {
|
} |
} |
|
|
sub group_files { |
sub group_files { |
my ($group,$currdir,$numfiles,$numdirs) = @_; |
my ($group,$portpath,$numfiles,$numdirs) = @_; |
my $dirptr=16384; |
my $dirptr=16384; |
my @dir_list=&Apache::portfolio::get_dir_list($currdir,$group); |
my @dir_list=&Apache::portfolio::get_dir_list($portpath,undef,$group); |
foreach my $line (@dir_list) { |
foreach my $line (@dir_list) { |
my ($filename,$dom,undef,$testdir,undef,undef,undef,undef,$size,undef,$mtime,undef,undef,undef,$obs,undef)=split(/\&/,$line,16); |
my ($filename,$dom,undef,$testdir,undef,undef,undef,undef,$size,undef,$mtime,undef,undef,undef,$obs,undef)=split(/\&/,$line,16); |
if (($filename !~ /^\.\.?$/) && ($filename !~ /\.meta$/ ) && ($filename !~ /(.*)\.(\d+)\.([^\.]*)$/) && ($filename ne 'no_such_dir')) { |
if (($filename !~ /^\.\.?$/) && ($filename !~ /\.meta$/ ) && ($filename !~ /(.*)\.(\d+)\.([^\.]*)$/) && ($filename ne 'no_such_dir')) { |
if ($dirptr&$testdir) { |
if ($dirptr&$testdir) { |
$currdir .= '/'.$filename; |
$portpath .= '/'.$filename; |
$$numdirs ++; |
$$numdirs ++; |
&group_files($numfiles,$numdirs) |
&group_files($group,$portpath,$numfiles,$numdirs) |
} else { |
} else { |
$$numfiles ++; |
$$numfiles ++; |
} |
} |
Line 1558 sub groupsettings_options {
|
Line 1608 sub groupsettings_options {
|
'for different group members?', |
'for different group members?', |
); |
); |
my ($crsquota,$freespace,$maxposs) = &get_quota_constraints($action,$stored); |
my ($crsquota,$freespace,$maxposs) = &get_quota_constraints($action,$stored); |
&topic_bar($r,$image,$lt{'gnde'}); |
$r->print(&Apache::lonhtmlcommon::topic_bar($image,$lt{'gnde'}).' |
$r->print(' |
|
<table class="LC_descriptive_input"> |
<table class="LC_descriptive_input"> |
<tr> |
<tr> |
<td class="LC_description">'.$lt{'gnam'}.':</td> |
<td class="LC_description">'.$lt{'gnam'}.':</td> |
Line 1597 END
|
Line 1646 END
|
$$functions{$allfunctions[$i]}.'</label></td> |
$$functions{$allfunctions[$i]}.'</label></td> |
<td> </td><td> </td>'); |
<td> </td><td> </td>'); |
} |
} |
$r->print('<td><input type="button" value="check all" '. |
$r->print('<td><input type="button" value="'.&mt('check all').'" '. |
'onclick="javascript:checkAll(document.'.$formname.'.tool)" />'. |
'onclick="javascript:checkAll(document.'.$formname.'.tool)" />'. |
'</td></tr><tr><td> </td>'); |
'</td></tr><tr><td> </td>'); |
for (my $j=$halfnum; $j<@allfunctions; $j++) { |
for (my $j=$halfnum; $j<@allfunctions; $j++) { |
Line 1611 END
|
Line 1660 END
|
} |
} |
$r->print(' |
$r->print(' |
<td> |
<td> |
<input type="button" value="uncheck all" |
<input type="button" value="'.&mt('uncheck all').'" |
onclick="javascript:uncheckAll(document.'.$formname.'.tool)" /> |
onclick="javascript:uncheckAll(document.'.$formname.'.tool)" /> |
</td> |
</td> |
</tr> |
</tr> |
Line 1620 END
|
Line 1669 END
|
<td colspan="10">'.$lt{'doyo'}.' <label><input type="radio" name="granularity" value="Yes" />'.&mt('Yes').'</label> <label><input type="radio" name="granularity" value="No" checked="checked" />'.&mt('No').'</label>'); |
<td colspan="10">'.$lt{'doyo'}.' <label><input type="radio" name="granularity" value="Yes" />'.&mt('Yes').'</label> <label><input type="radio" name="granularity" value="No" checked="checked" />'.&mt('No').'</label>'); |
if ($action eq 'modify') { |
if ($action eq 'modify') { |
$r->print(' ('.&mt('Currently set to "[_1]"', |
$r->print(' ('.&mt('Currently set to "[_1]"', |
$$stored{'granularity'}).')'); |
&mt($$stored{'granularity'})).')'); |
} |
} |
$r->print(' |
$r->print(' |
</td> |
</td> |
Line 1628 END
|
Line 1677 END
|
<tr> |
<tr> |
<td class="LC_description">'.&mt('Disk quota: ').'</td><td colspan="10">'); |
<td class="LC_description">'.&mt('Disk quota: ').'</td><td colspan="10">'); |
if ($action eq 'create') { |
if ($action eq 'create') { |
$r->print(&mt('If you enable the file repository for the [_1], allocate a disk quota.',$gpterm)); |
$r->print(&mt('If you enable the file repository for the '.$gpterm.', allocate a disk quota.')); |
} else { |
} else { |
$r->print(&mt('Quota allocated to file repository:')); |
$r->print(&mt('Quota allocated to file repository:')); |
} |
} |
$r->print(' <input type="text" name="quota" size="4" />Mb'); |
$r->print(' '.&mt('[_1] Mb','<input type="text" name="quota" size="4" />')); |
if ($action eq 'create') { |
if ($action eq 'create') { |
$r->print('<br />'. |
$r->print('<br />' |
&mt('A total of [_1] Mb can be divided amongst all [_2]s in the '. |
.&mt('A total of [_1] Mb can be divided amongst all '.$gpterm.'s in the ' |
'[_3], and [_4] Mb are currently unallocated.',$crsquota, |
.lc($crstype).', and [_2] Mb are currently unallocated.' |
$gpterm,lc($crstype),sprintf("%.2f",$freespace))); |
,$crsquota,sprintf("%.2f",$freespace)) |
|
); |
} else { |
} else { |
$r->print(' ('.&mt('The quota is currently [_1] Mb', |
$r->print(' ('.&mt('The quota is currently [_1] Mb', |
$$stored{'quota'}).').'); |
$$stored{'quota'}).').'); |
|
|
$r->print('<br />'.&mt('The quota can be increased to [_1] Mb, '. |
$r->print('<br />' |
'by adding all unallocated space for [_2]s in the [_3].', |
.&mt('The quota can be increased to [_1] Mb, ' |
sprintf("%.2f",$maxposs),$gpterm,lc($crstype))); |
.'by adding all unallocated space for '.$gpterm.'s in the '.lc($crstype).'.' |
|
,sprintf("%.2f",$maxposs))); |
} |
} |
$r->print(' |
$r->print(' |
</td> |
</td> |
Line 1697 sub membership_options {
|
Line 1748 sub membership_options {
|
|
|
my @sections = keys(%{$sectioncount}); |
my @sections = keys(%{$sectioncount}); |
|
|
&topic_bar($r,$image,$lt{'pipa'}); |
$r->print(&Apache::lonhtmlcommon::topic_bar($image,$lt{'pipa'}).' |
$r->print(' |
|
<b>'.$lt{'gmem'}.'</b><br />'.$lt{'picr'}); |
<b>'.$lt{'gmem'}.'</b><br />'.$lt{'picr'}); |
if ($action eq 'create') { |
if ($action eq 'create') { |
$r->print($lt{'meof'}.'<br />'.$lt{'ifno'}.'<br />'.$lt{'asub'}); |
$r->print($lt{'meof'}.'<br />'.$lt{'ifno'}.'<br />'.$lt{'asub'}); |
Line 1756 sub sections_selection {
|
Line 1806 sub sections_selection {
|
|
|
sub access_date_settings { |
sub access_date_settings { |
my ($r,$action,$formname,$stored,$image,$gpterm,$ucgpterm) = @_; |
my ($r,$action,$formname,$stored,$image,$gpterm,$ucgpterm) = @_; |
my %lt = &Apache::lonlocal::texthash( |
my $sten = &mt("Default start and end dates for $gpterm access"); |
'sten' => "Default start and end dates for $gpterm access", |
|
); |
|
my $starttime = time; |
my $starttime = time; |
my $endtime = time+(6*30*24*60*60); # 6 months from now, approx |
my $endtime = time+(6*30*24*60*60); # 6 months from now, approx |
if ($action eq 'modify') { |
if ($action eq 'modify') { |
Line 1768 sub access_date_settings {
|
Line 1816 sub access_date_settings {
|
} |
} |
} |
} |
my ($table) = &date_setting_table($starttime,$endtime,$formname); |
my ($table) = &date_setting_table($starttime,$endtime,$formname); |
&topic_bar($r,$image,$lt{'sten'}); |
$r->print(&Apache::lonhtmlcommon::topic_bar($image,$sten).' |
$r->print(' |
|
'.$table.' |
'.$table.' |
'); |
'); |
return; |
return; |
Line 1886 sub print_current_settings {
|
Line 1933 sub print_current_settings {
|
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:', |
difn => 'Different collaborative tools<br />for different members:', |
stda => 'Start date', |
stda => 'Start date:', |
enda => 'End date:', |
enda => 'End date:', |
); |
); |
my $showstart = &Apache::lonlocal::locallocaltime($startdate); |
my $showstart = &Apache::lonlocal::locallocaltime($startdate); |
Line 1920 sub print_current_settings {
|
Line 1967 sub print_current_settings {
|
<td> |
<td> |
'); |
'); |
if (@{$available} > 0) { |
if (@{$available} > 0) { |
$r->print(&mt('<b>Available for assignment to members:</b>'). |
$r->print('<b>'.&mt('Available for assignment to members:').'</b>'. |
'<table class="LC_group_priv"><tr>'); |
'<table class="LC_group_priv"><tr>'); |
my $rowcell = int(@{$available}/2) + @{$available}%2; |
my $rowcell = int(@{$available}/2) + @{$available}%2; |
for (my $i=0; $i<@{$available}; $i++) { |
for (my $i=0; $i<@{$available}; $i++) { |
Line 1938 sub print_current_settings {
|
Line 1985 sub print_current_settings {
|
$r->print('</tr></table><br />'); |
$r->print('</tr></table><br />'); |
} |
} |
if (@{$unavailable} > 0) { |
if (@{$unavailable} > 0) { |
$r->print(&mt('<b>Unavailable for assignment:</b>'). |
$r->print('<b>'.&mt('Unavailable for assignment:').'</b>'. |
'<table class="LC_group_priv"><tr>'); |
'<table class="LC_group_priv"><tr>'); |
my $rowcell = int(@{$unavailable}/2) + @{$unavailable}%2; |
my $rowcell = int(@{$unavailable}/2) + @{$unavailable}%2; |
for (my $j=0; $j<@{$unavailable}; $j++) { |
for (my $j=0; $j<@{$unavailable}; $j++) { |
Line 1955 sub print_current_settings {
|
Line 2002 sub print_current_settings {
|
} |
} |
$r->print('</tr></table>'); |
$r->print('</tr></table>'); |
} |
} |
|
my $quota_text=&mt('[_1] Mb',$quota); |
|
my $granu_text=&mt($granularity); |
$r->print(<<"END"); |
$r->print(<<"END"); |
</td> |
</td> |
<td valign="top"><b>$lt{'difn'}</b> $granularity</td> |
<td valign="top"><b>$lt{'difn'}</b> $granu_text</td> |
<td valign="top">$quota Mb</td> |
<td valign="top">$quota_text</td> |
<td valign="top"><b>$lt{'stda'}</b> $showstart<br /> |
<td valign="top"><b>$lt{'stda'}</b> $showstart<br /> |
<b>$lt{'enda'}</b> $showend |
<b>$lt{'enda'}</b> $showend |
</td> |
</td> |
Line 1981 sub pick_new_members {
|
Line 2030 sub pick_new_members {
|
'nnew' => "There are no users to add as new members, as all users". |
'nnew' => "There are no users to add as new members, as all users". |
" matching the specified type(s), role(s), and ". |
" matching the specified type(s), role(s), and ". |
"section(s) are already affiliated with this group.", |
"section(s) are already affiliated with this group.", |
'yoma' => 'You may need to use the '."'".'modify existing, past or '. |
'yoma' => "You may need to use the 'modify existing, past or ". |
'future members'."'".' page if you need to re-enable '. |
"future members' page if you need to re-enable ". |
'or activate access for previous or future members.', |
"or activate access for previous or future members.", |
); |
); |
my %members; |
my %members; |
my $totalusers = 0; |
my $totalusers = 0; |
Line 2007 sub pick_new_members {
|
Line 2056 sub pick_new_members {
|
$r->print(&check_uncheck_tools($r,$available)); |
$r->print(&check_uncheck_tools($r,$available)); |
} |
} |
} |
} |
&topic_bar($r,$img,$lt{'gpme'}); |
$r->print(&Apache::lonhtmlcommon::topic_bar($img,$lt{'gpme'})); |
if (keys(%members) > 0) { |
if (keys(%members) > 0) { |
$r->print(' |
$r->print(' |
<table> |
<table> |
Line 2017 sub pick_new_members {
|
Line 2066 sub pick_new_members {
|
$r->print('<td> |
$r->print('<td> |
<fieldset><legend><b>'.$lt{'setf'}.'</b></legend> |
<fieldset><legend><b>'.$lt{'setf'}.'</b></legend> |
<nobr> |
<nobr> |
<input type="button" value="check all" |
<input type="button" value="'.&mt('check all').'" |
onclick="javascript:checkAllTools(document.'.$formname.')" /> |
onclick="javascript:checkAllTools(document.'.$formname.')" /> |
|
|
<input type="button" value="uncheck all" |
<input type="button" value="'.&mt('uncheck all').'" |
onclick="javascript:uncheckAllTools(document.'.$formname.')" /> |
onclick="javascript:uncheckAllTools(document.'.$formname.')" /> |
</nobr> |
</nobr> |
</fieldset></td>'); |
</fieldset></td>'); |
Line 2156 sub privilege_specificity {
|
Line 2205 sub privilege_specificity {
|
} |
} |
} |
} |
} |
} |
&topic_bar($r,$img,$lt{'uprv'}); |
$r->print(&Apache::lonhtmlcommon::topic_bar($img,$lt{'uprv'})); |
if ((($action eq 'create') && (@{$available} > 0)) || |
if ((($action eq 'create') && (@{$available} > 0)) || |
(($action eq 'modify') && ($formname eq 'change_settings'))) { |
(($action eq 'modify') && ($formname eq 'change_settings'))) { |
my %specific = ( |
my %specific = ( |
Line 2260 sub default_privileges {
|
Line 2309 sub default_privileges {
|
if ($fixed ne '') { |
if ($fixed ne '') { |
$fixed .= '</td><td class="LC_groups_fixed">'; |
$fixed .= '</td><td class="LC_groups_fixed">'; |
} |
} |
$fixed .= '<input type="hidden" name="defpriv" value="'.$priv.'" /><nobr>'.$$toolprivs{$tool}{$priv}.' '; |
$fixed .= '<input type="hidden" name="defpriv" value="'.$priv.'" />' |
|
.'<span class="LC_nobreak">'.$$toolprivs{$tool}{$priv}.' '; |
if ($action eq 'modify') { |
if ($action eq 'modify') { |
if (grep(/^$tool$/,@{$available})) { |
if (grep(/^$tool$/,@{$available})) { |
$fixed .= '<small>'.&mt('(on)').'<small> '; |
$fixed .= '<small>'.&mt('(on)').'<small> '; |
Line 2268 sub default_privileges {
|
Line 2318 sub default_privileges {
|
$fixed .= '<small>'.&mt('(off)').'<small> '; |
$fixed .= '<small>'.&mt('(off)').'<small> '; |
} |
} |
} |
} |
$fixed .= '</nobr>'; |
$fixed .= '</span>'; |
} else { |
} else { |
$privcount++; |
$privcount++; |
if ($privcount == 3) { |
if ($privcount == 3) { |
$dynamic .= '</tr> |
$dynamic .= '</tr> |
<tr>'."\n"; |
<tr>'."\n"; |
} |
} |
$dynamic .= '<td><nobr><label><input type="checkbox" name="defpriv" value="'.$priv.'" />'.$$toolprivs{$tool}{$priv}.'</label></nobr></td>'."\n"; |
$dynamic .= '<td><span class="LC_nobreak"><label><input type="checkbox" name="defpriv" value="'.$priv.'" />'.$$toolprivs{$tool}{$priv}.'</label></span></td>'."\n"; |
} |
} |
} |
} |
if ($privcount == 0) { |
if ($privcount == 0) { |
$dynamic .= '<td>None</td>'."\n"; |
$dynamic .= '<td>'.&mt('None').'</td>'."\n"; |
} |
} |
if ($privcount < 3) { |
if ($privcount < 3) { |
$dynamic .= '<td> </td>'."\n"; |
$dynamic .= '<td> </td>'."\n"; |
Line 2397 sub change_members_form {
|
Line 2447 sub change_members_form {
|
$r->print(' |
$r->print(' |
<br /> |
<br /> |
'); |
'); |
&topic_bar($r,1,$lt{'grse'}); |
$r->print(&Apache::lonhtmlcommon::topic_bar(1,$lt{'grse'})); |
&print_current_settings($r,$action,$functions,$startdate,$enddate, |
&print_current_settings($r,$action,$functions,$startdate,$enddate, |
$groupname,$description,$granularity,$quota, |
$groupname,$description,$granularity,$quota, |
\@available,\@unavailable,$gpterm,$ucgpterm); |
\@available,\@unavailable,$gpterm,$ucgpterm); |
&topic_bar($r,2,$lt{'mogm'}); |
$r->print(&Apache::lonhtmlcommon::topic_bar(2,$lt{'mogm'})); |
my $numcurrent = ¤t_membership($r,$cdom,$cnum,$formname,$groupname, |
my $numcurrent = ¤t_membership($r,$cdom,$cnum,$formname,$groupname, |
\@available,\@unavailable,$fixedprivs, |
\@available,\@unavailable,$fixedprivs, |
$granularity,$specificity); |
$granularity,$specificity); |
Line 2461 sub current_membership {
|
Line 2511 sub current_membership {
|
<td> |
<td> |
<nobr> |
<nobr> |
<fieldset><legend><b>'.$lt{'curf'}.'</b></legend> |
<fieldset><legend><b>'.$lt{'curf'}.'</b></legend> |
<input type="button" value="check all" |
<input type="button" value="'.&mt('check all').'" |
onclick="javascript:checkAllTools(document.'.$formname.')" /> |
onclick="javascript:checkAllTools(document.'.$formname.')" /> |
|
|
<input type="button" value="uncheck all" |
<input type="button" value="'.&mt('uncheck all').'" |
onclick="javascript:uncheckAllTools(document.'.$formname.')" /> |
onclick="javascript:uncheckAllTools(document.'.$formname.')" /> |
</fieldset> |
</fieldset> |
</nobr> |
</nobr> |
Line 2620 sub check_uncheck_buttons {
|
Line 2670 sub check_uncheck_buttons {
|
<fieldset> |
<fieldset> |
<legend><b>'.$title.'</b></legend> |
<legend><b>'.$title.'</b></legend> |
<nobr> |
<nobr> |
<input type="button" value="check all" |
<input type="button" value="'.&mt('check all').'" |
onclick="javascript:checkAll(document.'.$formname.'.'.$field.')" /> |
onclick="javascript:checkAll(document.'.$formname.'.'.$field.')" /> |
|
|
<input type="button" value="uncheck all" |
<input type="button" value="'.&mt('uncheck all').'" |
onclick="javascript:uncheckAll(document.'.$formname.'.'.$field.')" /> |
onclick="javascript:uncheckAll(document.'.$formname.'.'.$field.')" /> |
</nobr> |
</nobr> |
</fieldset> |
</fieldset> |
Line 2651 sub change_privs_form {
|
Line 2701 sub change_privs_form {
|
} else { |
} else { |
$nexttext = $$navbuttons{'mose'}; |
$nexttext = $$navbuttons{'mose'}; |
} |
} |
&topic_bar($r,3,&mt('Members to delete or expire')); |
$r->print(&Apache::lonhtmlcommon::topic_bar(3,&mt('Members to delete or expire'))); |
my $exp_or_del = 0; |
my $exp_or_del = 0; |
if (ref($$memchg{'deletion'}) eq 'ARRAY') { |
if (ref($$memchg{'deletion'}) eq 'ARRAY') { |
if (@{$$memchg{'deletion'}} > 0) { |
if (@{$$memchg{'deletion'}} > 0) { |
Line 2679 sub change_privs_form {
|
Line 2729 sub change_privs_form {
|
$r->print($lt{'nome'}.'<br />'); |
$r->print($lt{'nome'}.'<br />'); |
} |
} |
|
|
&topic_bar($r,4,&mt('Setting optional privileges for specific group members')); |
$r->print(&Apache::lonhtmlcommon::topic_bar(4,&mt('Setting optional privileges for specific group members'))); |
|
|
my $numchgs = &member_privileges_form($r,$action,$formname,$tools, |
my $numchgs = &member_privileges_form($r,$action,$formname,$tools, |
$toolprivs,$fixedprivs,$userdata, |
$toolprivs,$fixedprivs,$userdata, |
Line 2736 sub choose_privs_form {
|
Line 2786 sub choose_privs_form {
|
$nexttext = $$navbuttons{'adme'}; |
$nexttext = $$navbuttons{'adme'}; |
} |
} |
|
|
&topic_bar($r,6,&mt('Setting optional privileges for specific group members')); |
$r->print(&Apache::lonhtmlcommon::topic_bar(6,&mt('Setting optional privileges for specific group members'))); |
|
|
&member_privileges_form($r,$action,$formname,$tools,$toolprivs, |
&member_privileges_form($r,$action,$formname,$tools,$toolprivs, |
$fixedprivs,$userdata,$usertools,$idx,undef, |
$fixedprivs,$userdata,$usertools,$idx,undef, |
Line 2825 sub member_privileges_form {
|
Line 2875 sub member_privileges_form {
|
'members being added or modified, '. |
'members being added or modified, '. |
'there are no optional privileges to set '. |
'there are no optional privileges to set '. |
'for specific members.', |
'for specific members.', |
'algr' => 'All new group members will receive the same privileges.', 'ifex' => 'If previously expired members are being re-enabled, or '. |
'algr' => 'All new group members will receive the same privileges.', |
|
'ifex' => 'If previously expired members are being re-enabled, or '. |
'if access for future members is being activated now, '. |
'if access for future members is being activated now, '. |
'previously set privileges will be preserved.', |
'previously set privileges will be preserved.', |
'asno' => 'As no group members are being added, '. |
'asno' => 'As no group members are being added, '. |
Line 2903 sub member_privileges_form {
|
Line 2954 sub member_privileges_form {
|
$r->print('<td valign="top">'); |
$r->print('<td valign="top">'); |
$r->print('<table class="thinborder"><tr>'. |
$r->print('<table class="thinborder"><tr>'. |
'<th colspan="'.$colspan.'">'. |
'<th colspan="'.$colspan.'">'. |
$tool.'</th></tr><tr>'); |
&mt($tool).'</th></tr><tr>'); |
my $privcount = 0; |
my $privcount = 0; |
foreach my $priv (@{$showboxes{$tool}}) { |
foreach my $priv (@{$showboxes{$tool}}) { |
$privcount ++; |
$privcount ++; |
Line 2917 sub member_privileges_form {
|
Line 2968 sub member_privileges_form {
|
} else { |
} else { |
$r->print('<td>'); |
$r->print('<td>'); |
} |
} |
$r->print(qq| |
$r->print( |
<fieldset><legend><b>$$toolprivs{$tool}{$priv}</b></legend> |
'<fieldset><legend><b>'.&mt($$toolprivs{$tool}{$priv}).'</b></legend>' |
<nobr> |
.'<span class="LC_nobreak">' |
<input type="button" value="check all" |
.' <input type="button" value="'.&mt('check all').'"' |
onclick="javascript:checkAll(document.$formname.userpriv_$priv)" /> |
.' onclick="javascript:checkAll(document.'.$formname.'.userpriv_'.$priv.')" />' |
|
.' ' |
<input type="button" value="uncheck all" |
.'<input type="button" value="'.&mt('uncheck all').'"' |
onclick="javascript:uncheckAll(document.$formname.userpriv_$priv)" /> |
.' onclick="javascript:uncheckAll(document.'.$formname.'.userpriv_'.$priv.')" />' |
</nobr></fieldset><br />|); |
.'</span></fieldset><br />' |
|
); |
$r->print('</td>'); |
$r->print('</td>'); |
if ($privcount < @{$showboxes{$tool}}) { |
if ($privcount < @{$showboxes{$tool}}) { |
if (@{$showboxes{$tool}} > 2) { |
if (@{$showboxes{$tool}} > 2) { |
Line 3069 sub write_group_data {
|
Line 3121 sub write_group_data {
|
} |
} |
if ($quota !~ /^\d*\.?\d*$/) { |
if ($quota !~ /^\d*\.?\d*$/) { |
$quota = 0; |
$quota = 0; |
$r->print(&mt('The value you entered for the quota for the file repository in this [_1] contained invalid characters, so it has been set to 0 Mb. You can change this by modifying the [_1] settings.<br />',$gpterm)); |
$r->print('<div class="LC_warning">' |
|
.&mt('The value you entered for the quota for the file repository in this '.$gpterm |
|
.' contained invalid characters, so it has been set to 0 Mb. You can change this by' |
|
.' modifying the '.$gpterm.' settings.') |
|
.'</div>'); |
} |
} |
if ($quota > $maxposs) { |
if ($quota > $maxposs) { |
$quota = $maxposs; |
$quota = $maxposs; |
$r->print(&mt('The value you entered for the quota for the file repository in this [_1] exceeded the maximum possible value, so it has been set to [_2] Mb (the maximum possible value).<br />',$gpterm,sprintf("%.2f",$maxposs))); |
$r->print('<div class="LC_warning">' |
|
.&mt('The value you entered for the quota for the file repository in this '.$gpterm |
|
.' exceeded the maximum possible value, so it has been set to [_1] Mb ' |
|
.'(the maximum possible value).',sprintf("%.2f",$maxposs)) |
|
.'</div>'); |
} |
} |
my %groupinfo = ( |
my %groupinfo = ( |
description => $esc_description, |
description => $esc_description, |
Line 3138 sub write_group_data {
|
Line 3198 sub write_group_data {
|
my $result = &add_group_folder($cdom,$cnum,$now,$groupname,$action, |
my $result = &add_group_folder($cdom,$cnum,$now,$groupname,$action, |
$description,$tools,\%groupinfo, |
$description,$tools,\%groupinfo, |
$gpterm,$ucgpterm,$crstype); |
$gpterm,$ucgpterm,$crstype); |
if ($result ne 'ok') { |
if ($result eq 'ok') { |
$r->print(&mt('A problem occurred when creating folders for the new [_1].<br />[_2]<br />',$gpterm,$result)); |
$r->print('<div class="LC_success">' |
|
.&mt($ucgpterm.' [_1] was created.','<i>'.$groupname.'</i>') |
|
.'</div>'); |
|
} else { |
|
$r->print('<div class="LC_error">' |
|
.&mt('A problem occurred when creating folders for the new '.$gpterm.' [_1]:' |
|
,'<i>'.$groupname.'</i>') |
|
.'<br />'.$result |
|
.'</div>'); |
} |
} |
$r->print(&mt('[_1] [_2] was created.<br />',$ucgpterm,$groupname)); |
|
} elsif ($action eq 'modify') { |
} elsif ($action eq 'modify') { |
my (@oldtools,@newtools); |
my (@oldtools,@newtools); |
if (ref($$stored{'tool'}) eq 'ARRAY') { |
if (ref($$stored{'tool'}) eq 'ARRAY') { |
Line 3171 sub write_group_data {
|
Line 3238 sub write_group_data {
|
my $parm_result = &parm_setter($navmap,$cdom,$boardsmap, |
my $parm_result = &parm_setter($navmap,$cdom,$boardsmap, |
$groupname); |
$groupname); |
if ($parm_result) { |
if ($parm_result) { |
$r->print(&mt('Error while setting parameters '. |
$r->print('<div class="LC_error">' |
'for Discussion Boards folder: '. |
.&mt('An error occurred while setting parameters ' |
'[_1]<br />.',$parm_result)); |
.'for Discussion Boards folder: ' |
|
.'[_1]',$parm_result) |
|
.'</div>'); |
} else { |
} else { |
$r->print(&mt('Discussion Boards Folder created.<br />')); |
$r->print('<div class="LC_success">' |
|
.&mt('Discussion Boards Folder created.') |
|
.'</div>'); |
} |
} |
} else { |
} else { |
$r->print($outcome); |
$r->print($outcome); |
Line 3183 sub write_group_data {
|
Line 3254 sub write_group_data {
|
undef($navmap); |
undef($navmap); |
} |
} |
} |
} |
$r->print(&mt('[_1] [_2] was updated.<br />',$ucgpterm,$groupname)); |
$r->print('<div class="LC_success">' |
|
.&mt($ucgpterm.' [_1] was updated.','<i>'.$groupname.'</i>') |
|
.'</div>'); |
} |
} |
} else { |
} else { |
my %actiontype = ( |
my %actiontype = ( |
Line 3193 sub write_group_data {
|
Line 3266 sub write_group_data {
|
&Apache::lonnet::logthis("Failed to store $gpterm $groupname ". |
&Apache::lonnet::logthis("Failed to store $gpterm $groupname ". |
'in '.lc($crstype).': '.$cnum. |
'in '.lc($crstype).': '.$cnum. |
' in domain: '.$cdom); |
' in domain: '.$cdom); |
$r->print(&mt('An error occurred when [_1] the [_2]. '. |
$r->print('<div class="LC_error">' |
'Please try again.',$actiontype{$action},$gpterm)); |
.&mt('An error occurred when [_1] the '.$gpterm.'. ' |
|
.'Please try again.',$actiontype{$action}) |
|
.'</div>'); |
} |
} |
return $result; |
return $result; |
} |
} |
Line 3213 sub process_membership {
|
Line 3288 sub process_membership {
|
my %curr_start = (); |
my %curr_start = (); |
my %curr_end = (); |
my %curr_end = (); |
my %tooltype = (); |
my %tooltype = (); |
|
my $context = 'processgroupmembership'; |
|
|
foreach my $tool (@{$tools}) { |
foreach my $tool (@{$tools}) { |
foreach my $priv (sort(keys(%{$$toolprivs{$tool}}))) { |
foreach my $priv (sort(keys(%{$$toolprivs{$tool}}))) { |
Line 3282 sub process_membership {
|
Line 3358 sub process_membership {
|
$curr_privs{$user}; |
$curr_privs{$user}; |
if (&Apache::lonnet::modify_group_roles($cdom,$cnum,$groupname, |
if (&Apache::lonnet::modify_group_roles($cdom,$cnum,$groupname, |
$user,$now,$savestart, |
$user,$now,$savestart, |
$curr_privs{$user}) eq 'ok') { |
$curr_privs{$user},'',$context) eq 'ok') { |
push(@{$added{'expired'}},$user); |
push(@{$added{'expired'}},$user); |
$num_ok ++; |
$num_ok ++; |
} else { |
} else { |
Line 3293 sub process_membership {
|
Line 3369 sub process_membership {
|
foreach my $user (@deletion) { |
foreach my $user (@deletion) { |
$usersettings{$groupname.':'.$user} = $now.':-1:'; |
$usersettings{$groupname.':'.$user} = $now.':-1:'; |
if (&Apache::lonnet::modify_group_roles($cdom,$cnum,$groupname, |
if (&Apache::lonnet::modify_group_roles($cdom,$cnum,$groupname, |
$user,$now,'-1','') |
$user,$now,'-1','','',$context) |
eq 'ok') { |
eq 'ok') { |
push(@{$added{'deleted'}},$user); |
push(@{$added{'deleted'}},$user); |
$num_ok ++; |
$num_ok ++; |
Line 3347 sub process_membership {
|
Line 3423 sub process_membership {
|
$group_privs{$user}; |
$group_privs{$user}; |
if (&Apache::lonnet::modify_group_roles($cdom,$cnum,$groupname, |
if (&Apache::lonnet::modify_group_roles($cdom,$cnum,$groupname, |
$user,$end,$start, |
$user,$end,$start, |
$group_privs{$user}) eq 'ok') { |
$group_privs{$user},'',$context) eq 'ok') { |
push(@{$added{$type}},$user); |
push(@{$added{$type}},$user); |
$num_ok ++; |
$num_ok ++; |
} else { |
} else { |
Line 3386 sub process_membership {
|
Line 3462 sub process_membership {
|
} |
} |
if ($num_fail) { |
if ($num_fail) { |
foreach my $type (sort(keys(%failed))) { |
foreach my $type (sort(keys(%failed))) { |
$r->print(&mt('The following users could not be [_1], because an error occurred:<br />',$type)); |
$r->print('<div class="LC_error">' |
|
.&mt("The following users could not be $type, because an error occurred:") |
|
.'</div>'); |
foreach my $user (@{$failed{$type}}) { |
foreach my $user (@{$failed{$type}}) { |
$r->print($$userdata{$user}[$$idx{fullname}].' - '.$user.'<br />'); |
$r->print($$userdata{$user}[$$idx{fullname}].' - '.$user.'<br />'); |
} |
} |
Line 3394 sub process_membership {
|
Line 3472 sub process_membership {
|
$r->print('<br />'); |
$r->print('<br />'); |
} |
} |
if (@unchanged > 0) { |
if (@unchanged > 0) { |
$r->print(&mt('No change occurred for the following users:<br />')); |
$r->print(&mt('No change occurred for the following users:').'<br />'); |
foreach my $user (sort(@unchanged)) { |
foreach my $user (sort(@unchanged)) { |
$r->print($$userdata{$user}[$$idx{fullname}].' - '.$user.'<br />'); |
$r->print($$userdata{$user}[$$idx{fullname}].' - '.$user.'<br />'); |
} |
} |
$r->print('<br />'); |
$r->print('<br />'); |
} |
} |
if ($roster_result eq 'ok') { |
if ($roster_result eq 'ok') { |
$r->print('<br />'.&mt('[_1] membership list updated.',$ucgpterm)); |
$r->print('<div class="LC_success">' |
$r->print('<p>'.&mt("Any currently logged in course users affected by the changes you made to group membership or privileges for the [_1] group will need to log out and log back in for their LON-CAPA sessions to reflect these changes.",$groupname).'</p>'); |
.&mt($ucgpterm.' membership list updated.') |
} else { |
.'</div>'); |
$r->print('<br />'.&mt('An error occurred while updating the [_1] membership list -',$gpterm).$roster_result.'<br />'); |
$r->print('<p class="LC_info">' |
|
.&mt('Any currently logged in course users affected by the changes you made' |
|
.' to group membership or privileges for the [_1] group will need to log out' |
|
.' and log back in for their LON-CAPA sessions to reflect these changes.' |
|
,'<i>'.$groupname.'</i>') |
|
.'</p>' |
|
); |
|
} else { |
|
$r->print('<div class="LC_error">' |
|
.&mt("An error occurred while updating the $gpterm membership list:") |
|
.'<br />'.$roster_result |
|
.'</div>'); |
} |
} |
return; |
return; |
} |
} |
Line 3443 sub automapping {
|
Line 3532 sub automapping {
|
if (exists($$stored{'autodrop'})) { |
if (exists($$stored{'autodrop'})) { |
$drop = $$stored{'autodrop'}; |
$drop = $$stored{'autodrop'}; |
} |
} |
&topic_bar($r,$image,$$lt{'endi'}); |
$r->print(&Apache::lonhtmlcommon::topic_bar($image,$$lt{'endi'}).' |
$r->print(' |
|
<b>'.$$lt{'gmma'}.':</b><br />'.$$lt{'adds'}.'<br />'.$$lt{'drops'}.'<br /><br /> |
<b>'.$$lt{'gmma'}.':</b><br />'.$$lt{'adds'}.'<br />'.$$lt{'drops'}.'<br /><br /> |
<nobr>'.$$lt{'auad'}.': |
<nobr>'.$$lt{'auad'}.': |
<label><input type="radio" name="autoadd" value="on" />on </label><label><input type="radio" name="autoadd" value="off" checked="checked" />off</label>'); |
<label><input type="radio" name="autoadd" value="on" />'.&mt('on').' </label><label><input type="radio" name="autoadd" value="off" checked="checked" />'.&mt('off').'</label>'); |
if ($action eq 'modify') { |
if ($action eq 'modify') { |
$r->print(' ('.$$lt{'curr'}.' <b>'.$$lt{$add}.'</b>)'); |
$r->print(' ('.$$lt{'curr'}.' <b>'.$$lt{$add}.'</b>)'); |
} |
} |
$r->print(' |
$r->print(' |
</nobr><br /> |
</nobr><br /> |
<nobr>'.$$lt{'auex'}.': |
<nobr>'.$$lt{'auex'}.': |
<label><input type="radio" name="autodrop" value="on" />on </label><label><input type="radio" name="autodrop" value="off" checked="checked" />off</label>'); |
<label><input type="radio" name="autodrop" value="on" />'.&mt('on').' </label><label><input type="radio" name="autodrop" value="off" checked="checked" />'.&mt('off').'</label>'); |
if ($action eq 'modify') { |
if ($action eq 'modify') { |
$r->print(' ('.$$lt{'curr'}.' <b>'.$$lt{$drop}.'</b>)'); |
$r->print(' ('.$$lt{'curr'}.' <b>'.$$lt{$drop}.'</b>)'); |
} |
} |
Line 3471 sub mapping_settings {
|
Line 3559 sub mapping_settings {
|
} else { |
} else { |
@sections = ('all','none'); |
@sections = ('all','none'); |
} |
} |
&topic_bar($r,$image,$$lt{'pirs'}); |
$r->print(&Apache::lonhtmlcommon::topic_bar($image,$$lt{'pirs'})); |
my @roles = &standard_roles(); |
my @roles = &standard_roles(); |
my %customroles = &Apache::lonhtmlcommon::course_custom_roles($cdom,$cnum); |
my %customroles = &Apache::lonhtmlcommon::course_custom_roles($cdom,$cnum); |
$r->print(&Apache::loncommon::start_data_table(). |
$r->print(&Apache::loncommon::start_data_table(). |
Line 3671 sub add_group_folder {
|
Line 3759 sub add_group_folder {
|
my ($cdom,$cnum,$now,$groupname,$action,$description,$tools,$groupinfo, |
my ($cdom,$cnum,$now,$groupname,$action,$description,$tools,$groupinfo, |
$gpterm,$ucgpterm,$crstype) = @_; |
$gpterm,$ucgpterm,$crstype) = @_; |
if ($cdom eq '' || $cnum eq '') { |
if ($cdom eq '' || $cnum eq '') { |
return &mt('Error: invalid course domain or number - group folder creation failed'); |
return '<span class="LC_error">' |
|
.&mt('Error: invalid course domain or number - group folder creation failed.') |
|
.'</span>'; |
} |
} |
my ($outcome,$allgrpsmap,$grpmap,$boardsmap,$grppage,$warning); |
my ($outcome,$allgrpsmap,$grpmap,$boardsmap,$grppage,$warning); |
my $crspath = '/uploaded/'.$cdom.'/'.$cnum.'/'; |
my $crspath = '/uploaded/'.$cdom.'/'.$cnum.'/'; |
Line 3681 sub add_group_folder {
|
Line 3771 sub add_group_folder {
|
# check if group_allfolders.sequence exists. |
# check if group_allfolders.sequence exists. |
my $mapcontents = &Apache::lonnet::getfile($allgrpsmap); |
my $mapcontents = &Apache::lonnet::getfile($allgrpsmap); |
if ($mapcontents eq '-1') { #file does not exist; |
if ($mapcontents eq '-1') { #file does not exist; |
my $grpstitle = &mt('[_1] [_2]s',$crstype,$ucgpterm); |
my $grpstitle = &mt("$crstype $ucgpterm".'s'); |
my $topmap_url = '/'.$env{'course.'.$env{'request.course.id'}.'.url'}; |
my $topmap_url = '/'.$env{'course.'.$env{'request.course.id'}.'.url'}; |
$topmap_url =~ s|/+|/|g; |
$topmap_url =~ s|/+|/|g; |
if ($topmap_url =~ m|^/uploaded|) { |
if ($topmap_url =~ m|^/uploaded|) { |
$outcome = &map_updater($cdom,$cnum,'group_allfolders.sequence', |
$outcome = &map_updater($cdom,$cnum,'group_allfolders.sequence', |
'toplevelgroup',$grpstitle,$topmap_url); |
'toplevelgroup',$grpstitle,$topmap_url); |
} else { |
} else { |
$outcome = &mt('Non-standard course - folder for all groups not added.'); |
$outcome = '<span class="LC_warning">' |
|
.&mt('Non-standard course - folder for all groups not added.') |
|
.'</span>'; |
} |
} |
if ($outcome ne 'ok') { |
if ($outcome ne 'ok') { |
my $delresult = &release_folder_lock($cdom,$cnum,'group_allfolders'); |
my $delresult = &release_folder_lock($cdom,$cnum,'group_allfolders'); |
Line 3703 sub add_group_folder {
|
Line 3795 sub add_group_folder {
|
$warning = $delresult ; |
$warning = $delresult ; |
} |
} |
} else { |
} else { |
$outcome = &mt('Could not obtain exclusive lock to check status of the folder for all groups. No group folder added.'); |
$outcome = '<span class="LC_error">' |
|
.&mt('Could not obtain exclusive lock to check status of the folder for all groups. No group folder added.') |
|
.'</div>'; |
return $outcome; |
return $outcome; |
} |
} |
my $grpfolder = &mt('[_1] Folder -',$ucgpterm,).$description; |
my $grpfolder = &mt($ucgpterm.' Folder - [_1]',$description); |
$grppage='/adm/'.$cdom.'/'.$cnum.'/'.$groupname.'/smppg'; |
$grppage='/adm/'.$cdom.'/'.$cnum.'/'.$groupname.'/smppg'; |
my $grptitle = &mt('Group homepage').' - '.$description; |
my $grptitle = &mt('Group homepage - [_1]',$description); |
my ($discussions,$disctitle); |
my ($discussions,$disctitle); |
my $outcome = &map_updater($cdom,$cnum,'group_folder_'.$groupname.'.sequence', |
my $outcome = &map_updater($cdom,$cnum,'group_folder_'.$groupname.'.sequence', |
'grpseq',$grpfolder,$allgrpsmap,$grppage, |
'grpseq',$grpfolder,$allgrpsmap,$grppage, |
Line 3779 sub release_folder_lock {
|
Line 3873 sub release_folder_lock {
|
my @del_lock = ($folder_name."\0".'locked_folder'); |
my @del_lock = ($folder_name."\0".'locked_folder'); |
my $dellockoutcome=&Apache::lonnet::del('coursegroups',\@del_lock,$cdom,$cnum); |
my $dellockoutcome=&Apache::lonnet::del('coursegroups',\@del_lock,$cdom,$cnum); |
if ($dellockoutcome ne 'ok') { |
if ($dellockoutcome ne 'ok') { |
return ('<br />'.&mt('Warning: failed to release lock for folder: [_1].',$folder_name).'<br />'); |
return ('<div class="LC_error">' |
|
.&mt('Warning: failed to release lock for folder: [_1].','<tt>'.$folder_name.'</tt>') |
|
.'</div>' |
|
); |
} else { |
} else { |
return 'ok'; |
return 'ok'; |
} |
} |
Line 3794 sub map_updater {
|
Line 3891 sub map_updater {
|
my $newmapurl=&Apache::lonnet::finishuserfileupload($cnum,$cdom,$itemname, |
my $newmapurl=&Apache::lonnet::finishuserfileupload($cnum,$cdom,$itemname, |
$newfile); |
$newfile); |
if ($newmapurl !~ m|^/uploaded|) { |
if ($newmapurl !~ m|^/uploaded|) { |
$outcome = &mt('Error uploading new folder.')." ($newfile): $newmapurl".'<br />'; |
$outcome = '<div class="LC_error">' |
|
.&mt('Error uploading new folder.')." ($newfile): $newmapurl" |
|
.'</div>'; |
return $outcome; |
return $outcome; |
} |
} |
my ($errtext,$fatal)=&LONCAPA::map::mapread($parentmap); |
my ($errtext,$fatal)=&LONCAPA::map::mapread($parentmap); |
if ($fatal) { |
if ($fatal) { |
$outcome = &mt('Error reading contents of parent folder')." ($parentmap): $errtext".'<br />'; |
$outcome = '<div class="LC_error">' |
|
.&mt('Error reading contents of parent folder.')." ($parentmap): $errtext" |
|
.'</div>'; |
return $outcome; |
return $outcome; |
} else { |
} else { |
my $newidx=&LONCAPA::map::getresidx($newmapurl); |
my $newidx=&LONCAPA::map::getresidx($newmapurl); |
Line 3808 sub map_updater {
|
Line 3909 sub map_updater {
|
$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); |
if ($errtext) { |
if ($errtext) { |
$outcome = &mt('Error storing updated parent folder')." ($parentmap): $errtext".'<br />'; |
$outcome = '<div class="LC_error">' |
|
.&mt('Error saving updated parent folder.')." ($parentmap): $errtext" |
|
.'</div>'; |
return $outcome; |
return $outcome; |
} |
} |
} |
} |
Line 3858 sub parm_setter {
|
Line 3961 sub parm_setter {
|
} |
} |
} |
} |
} else { |
} else { |
$allresults = &mt('Parameters not set for [_1] because the resource was not recognized as part of the course',$url).'<br />'; |
$allresults = '<div class="LC_warning">' |
|
.&mt('Parameters not set for [_1] because the resource was not recognized' |
|
.' as part of the course.','<tt>'.$url.'</tt>') |
|
.'</div>'; |
} |
} |
return $allresults; |
return $allresults; |
} |
} |
Line 3972 sub validate_groupname {
|
Line 4078 sub validate_groupname {
|
return; |
return; |
} |
} |
|
|
sub topic_bar { |
|
my ($r,$imgnum,$title) = @_; |
|
$r->print(' |
|
<div class="LC_topic_bar"> |
|
<img alt="'.&mt('Step [_1]',$imgnum). |
|
'"src="/res/adm/pages/bl_step'.$imgnum.'.gif" /> |
|
<span>'.$title.'</span> |
|
</div> |
|
'); |
|
return; |
|
} |
|
|
|
sub check_changes { |
sub check_changes { |
my ($member_changes,$memchg) = @_; |
my ($member_changes,$memchg) = @_; |
my %exclusions; |
my %exclusions; |