version 1.81, 2008/12/03 21:59:37
|
version 1.103, 2009/09/09 04:31:53
|
Line 75 sub handler {
|
Line 75 sub handler {
|
my $crstype = &Apache::loncommon::course_type(); |
my $crstype = &Apache::loncommon::course_type(); |
|
|
my %functions = ( |
my %functions = ( |
email => 'E-mail', |
email => 'Send Messages', |
discussion => 'Discussion Boards', |
discussion => 'Discussion Boards', |
chat => 'Chat', |
chat => 'Chat Room', |
files => 'File Repository', |
files => 'Group Portfolio', |
roster => 'Membership Roster', |
roster => 'Membership Roster', |
homepage => $ucgpterm.' home page', |
homepage => $ucgpterm.' home page', |
); |
); |
Line 141 function openGroupRoster(group,status) {
|
Line 141 function openGroupRoster(group,status) {
|
rosterbrowser = open(url,title,options,'1'); |
rosterbrowser = open(url,title,options,'1'); |
rosterbrowser.focus(); |
rosterbrowser.focus(); |
}\n|; |
}\n|; |
$r->print(&header('Groups',$jscript,$action,$state)); |
$r->print(&header('My Space',$jscript,$action,$state)); |
if ($env{'form.refpage'} eq 'cusr') { |
if ($env{'form.refpage'} eq 'cusr') { |
&Apache::lonhtmlcommon::add_breadcrumb |
&Apache::lonhtmlcommon::add_breadcrumb |
({href=>"/adm/createuser", |
({href=>"/adm/createuser", |
Line 349 END
|
Line 349 END
|
'<td align="right">'.$quota.'</td>'. |
'<td align="right">'.$quota.'</td>'. |
'<td align="right">'.$totalmembers.'</td>'. |
'<td align="right">'.$totalmembers.'</td>'. |
'<td align="right">'. |
'<td align="right">'. |
'<div class="LC_nobreak">'.&mt('Files: [_1]',$totalfiles).'</div>'. |
'<span class="LC_nobreak">'.&mt('Files: [_1]',$totalfiles).'</span><br />'. |
'<div class="LC_nobreak">'.&mt('Folders: [_1]',$totaldirs).'</div>'. |
'<span class="LC_nobreak">'.&mt('Folders: [_1]',$totaldirs).'</span>'. |
'</td>'. |
'</td>'. |
'<td align="right">'.$boards.'</td>'. |
'<td align="right">'.$boards.'</td>'. |
'<td align="right">'.$diskuse.'</td>'. |
'<td align="right">'.$diskuse.'</td>'. |
Line 785 sub group_administration {
|
Line 785 sub group_administration {
|
} |
} |
var maxposs = '.sprintf("%.2f",$maxposs).'; |
var maxposs = '.sprintf("%.2f",$maxposs).'; |
if (newquota > maxposs) { |
if (newquota > maxposs) { |
alert("The file repository quota you entered for this group ("+newquota+" Mb) exceeds the maximum possible ("+maxposs+" Mb). Please enter a smaller number."); |
alert("The group portfolio quota you entered for this group ("+newquota+" Mb) exceeds the maximum possible ("+maxposs+" Mb). Please enter a smaller number."); |
return; |
return; |
} |
} |
var re_quota = '.$float_check.'; |
var re_quota = '.$float_check.'; |
Line 804 sub group_administration {
|
Line 804 sub group_administration {
|
} |
} |
} |
} |
if (warn_zero == 1) { |
if (warn_zero == 1) { |
alert("You have indicated that the file repository should be enabled, but you have set the respository quota to 0 Mb.\nThis will prevent any upload of files.\nPlease set a value or disable the repository feature."); |
alert("You have indicated that the group portfolio should be enabled, but you have set the respository quota to 0 Mb.\nThis will prevent any upload of files.\nPlease set a value or disable the repository feature."); |
return; |
return; |
} |
} |
} |
} |
Line 915 function changeSort(caller) {
|
Line 915 function changeSort(caller) {
|
result => 'Re-enabled' |
result => 'Re-enabled' |
); |
); |
my %navbuttons = &Apache::lonlocal::texthash( |
my %navbuttons = &Apache::lonlocal::texthash( |
gtns => 'Go to next step', |
gtns => 'Next',#'Go to next step', |
gtps => 'Go to previous step', |
gtps => 'Back',#'Go to previous step', |
crgr => 'Create '.$gpterm, |
crgr => 'Create '.$gpterm, |
mose => 'Modify settings', |
mose => 'Save',#'Modify settings', |
gtpp => 'Go to previous page', |
gtpp => 'Back',#'Go to previous page', |
adme => 'Add members', |
adme => 'Add members', |
); |
); |
if ((($action eq 'create') || ($action eq 'modify') || ($action eq 'delete') || ($action eq 'reenable')) && |
if ((($action eq 'create') || ($action eq 'modify') || ($action eq 'delete') || ($action eq 'reenable')) && |
Line 1259 sub reenable_folder {
|
Line 1259 sub reenable_folder {
|
|
|
sub modify_folders { |
sub modify_folders { |
my ($cdom,$cnum,$groupname) = @_; |
my ($cdom,$cnum,$groupname) = @_; |
my $outcome; |
my ($outcome,$groupmap,$groupmapres,$map,$id,$src); |
my $navmap = Apache::lonnavmaps::navmap->new(); |
my $navmap = Apache::lonnavmaps::navmap->new(); |
my $groupmap = '/uploaded/'.$cdom.'/'.$cnum.'/'.'group_folder_'. |
if (!defined($navmap)) { |
|
$outcome = '<div class="LC_error">'. |
|
&mt('Error reading course contents.').' '. |
|
&mt('You need to re-initialize the course.'). |
|
'</div>'; |
|
return $outcome; |
|
} |
|
$groupmap = '/uploaded/'.$cdom.'/'.$cnum.'/'.'group_folder_'. |
$groupname.'.sequence'; |
$groupname.'.sequence'; |
my $groupmapres = $navmap->getResourceByUrl($groupmap); |
$groupmapres = $navmap->getResourceByUrl($groupmap); |
my ($map,$id,$src); |
|
if ($groupmapres) { |
if ($groupmapres) { |
($map,$id,$src)=&Apache::lonnet::decode_symb($groupmapres->symb()); |
($map,$id,$src)=&Apache::lonnet::decode_symb($groupmapres->symb()); |
} |
} |
Line 1434 sub header {
|
Line 1440 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"> |
|
|
END |
END |
if ($action eq 'create' || $action eq 'modify') { |
if ($action eq 'create' || $action eq 'modify') { |
Line 1553 sub open_list_window {
|
Line 1559 sub open_list_window {
|
my ($group,$status,$count,$text) = @_; |
my ($group,$status,$count,$text) = @_; |
my $entry; |
my $entry; |
if ($count > 0) { |
if ($count > 0) { |
$entry = '<nobr><a href="javascript:openGroupRoster('. |
$entry = '<span class="LC_nobreak"><a href="javascript:openGroupRoster('. |
"'$group','$status'".')">'.$text.'</a> - '.$count. |
"'$group','$status'".')">'.$text.'</a> - '.$count. |
'</nobr><br />'; |
'</span><br />'; |
} else { |
} else { |
$entry = '<nobr>'.$text.' - '.$count.'</nobr><br />'; |
$entry = '<span class="LC_nobreak">'.$text.' - '.$count.'</span><br />'; |
} |
} |
return $entry; |
return $entry; |
} |
} |
Line 1582 sub general_settings_form {
|
Line 1588 sub general_settings_form {
|
@{$tools} = sort(keys(%{$functions})); |
@{$tools} = sort(keys(%{$functions})); |
&privilege_specificity($r,$action,3,$tools,$stored,$toolprivs, |
&privilege_specificity($r,$action,3,$tools,$stored,$toolprivs, |
$fixedprivs,\@available,$formname, |
$fixedprivs,\@available,$formname, |
$gpterm,$ucgpterm); |
$gpterm,$ucgpterm,$functions); |
&mapping_options($r,$action,$formname,$page,$sectioncount, |
&mapping_options($r,$action,$formname,$page,$sectioncount, |
$states,$stored,$navbuttons,4,5, |
$states,$stored,$navbuttons,4,5, |
$gpterm,$ucgpterm,$crstype,$cdom,$cnum); |
$gpterm,$ucgpterm,$crstype,$cdom,$cnum); |
Line 1606 sub groupsettings_options {
|
Line 1612 sub groupsettings_options {
|
'lett' => 'Letters, numbers and underscore only', |
'lett' => 'Letters, numbers and underscore only', |
'doyo' => 'Different subsets of the chosen collaborative tools '. |
'doyo' => 'Different subsets of the chosen collaborative tools '. |
'for different group members?', |
'for different group members?', |
|
'gran' => 'Granularity', |
|
'dquo' => 'Disk quota', |
); |
); |
my ($crsquota,$freespace,$maxposs) = &get_quota_constraints($action,$stored); |
my ($crsquota,$freespace,$maxposs) = &get_quota_constraints($action,$stored); |
$r->print(&Apache::lonhtmlcommon::topic_bar($image,$lt{'gnde'}).' |
$r->print(&Apache::lonhtmlcommon::topic_bar($image,$lt{'gnde'})); |
<table class="LC_descriptive_input"> |
|
<tr> |
# Group Name |
<td class="LC_description">'.$lt{'gnam'}.':</td> |
$r->print(&Apache::lonhtmlcommon::start_pick_box() |
<td colspan="5"> |
.&Apache::lonhtmlcommon::row_title($lt{'gnam'}) |
'); |
); |
if ($action eq 'create') { |
if ($action eq 'create') { |
$r->print('<input type="text" name="groupname" size="25" /> ('. |
$r->print('<input type="text" name="groupname" size="25" />' |
$lt{'lett'}.')'); |
.' <span class="LC_nobreak">(' |
|
.$lt{'lett'}.')</span>' |
|
); |
} else { |
} else { |
$r->print('<input type="hidden" name="groupname" value="'. |
$r->print('<input type="hidden" name="groupname" value="'. |
$env{'form.groupname'}.'" />'.$env{'form.groupname'}); |
$env{'form.groupname'}.'" />'.$env{'form.groupname'}); |
} |
} |
$r->print(<<"END"); |
$r->print(&Apache::lonhtmlcommon::row_closure()); |
</td> |
|
<tr> |
# Group Title |
<tr> |
$r->print(&Apache::lonhtmlcommon::row_title($lt{'desc'}) |
<td class="LC_description">$lt{'desc'}:</td> |
.'<input type="text" name="description" size="40" value="" />' |
<td colspan="5"><input type="text" name="description" size="40" |
.&Apache::lonhtmlcommon::row_closure() |
value="" /> |
); |
</td> |
|
<tr> |
# Collaborative Tools |
<tr> |
|
<td class="LC_description">$lt{'func'}:</td> |
|
END |
|
my $numitems = keys(%{$functions}); |
my $numitems = keys(%{$functions}); |
my $halfnum = int($numitems/2); |
my $halfnum = int($numitems/2); |
my $remnum = $numitems%2; |
my $remnum = $numitems%2; |
Line 1640 END
|
Line 1647 END
|
$halfnum ++; |
$halfnum ++; |
} |
} |
my @allfunctions = sort(keys (%{$functions})); |
my @allfunctions = sort(keys (%{$functions})); |
for (my $i=0; $i<$halfnum; $i++) { |
|
$r->print('<td><label><input type="checkbox" name="tool" value="'. |
$r->print(&Apache::lonhtmlcommon::row_title($lt{'func'}) |
$allfunctions[$i].'" /> '. |
.'<div>' |
$$functions{$allfunctions[$i]}.'</label></td> |
.'<input type="button" value="'.&mt('check all').'"' |
<td> </td><td> </td>'); |
.' onclick="javascript:checkAll(document.'.$formname.'.tool)" />' |
} |
.' <input type="button" value="'.&mt('uncheck all').'"' |
$r->print('<td><input type="button" value="'.&mt('check all').'" '. |
.' onclick="javascript:uncheckAll(document.'.$formname.'.tool)" />' |
'onclick="javascript:checkAll(document.'.$formname.'.tool)" />'. |
.'</div>' |
'</td></tr><tr><td> </td>'); |
.'<table cellpadding="5px"><tr>' # FIXME Get rid of inflexible table (-> float) |
for (my $j=$halfnum; $j<@allfunctions; $j++) { |
); |
$r->print('<td><label><input type="checkbox" name="tool" value="'. |
for (my $i=0; $i<@allfunctions; $i++) { |
$allfunctions[$j].'" /> '. |
$r->print('<td><label><span class="LC_nobreak">' |
$$functions{$allfunctions[$j]}.'</label></td> |
.'<input type="checkbox" name="tool" value="' |
<td> </td><td> </td>'); |
.$allfunctions[$i].'" /> ' |
} |
.&mt($$functions{$allfunctions[$i]}) |
if ($remnum) { |
.'</span></label></td>' |
$r->print('<td> </td>'); |
); |
|
if ($i == $halfnum - 1) { |
|
$r->print('</tr><tr>'); |
|
} |
} |
} |
$r->print(' |
$r->print('</tr></table>' |
<td> |
.&Apache::lonhtmlcommon::row_closure() |
<input type="button" value="'.&mt('uncheck all').'" |
); |
onclick="javascript:uncheckAll(document.'.$formname.'.tool)" /> |
|
</td> |
# Granularity |
</tr> |
$r->print(&Apache::lonhtmlcommon::row_title($lt{'gran'}) |
<tr> |
.$lt{'doyo'}.'<br />' |
<td class="LC_description">'.&mt('Granularity:').'</td> |
.'<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>'); |
.'<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(' <span class="LC_nobreak">(' |
&mt($$stored{'granularity'})).')'); |
.&mt('Currently set to [_1].' |
|
,'"'.&mt($$stored{'granularity'}).'"') |
|
.')</span>' |
|
); |
} |
} |
$r->print(' |
$r->print(&Apache::lonhtmlcommon::row_closure()); |
</td> |
|
</tr> |
# Disk Quota |
<tr> |
$r->print(&Apache::lonhtmlcommon::row_title($lt{'dquo'})); |
<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 '.$gpterm.', allocate a disk quota.')); |
$r->print('<span class="LC_info">' |
|
.&mt('If you enable the group portfolio for the '.$gpterm |
|
.', allocate a disk quota.') |
|
.'</span>' |
|
); |
} else { |
} else { |
$r->print(&mt('Quota allocated to file repository:')); |
$r->print(&mt('Quota allocated to group portfolio:')); |
} |
} |
$r->print(' '.&mt('[_1] Mb','<input type="text" name="quota" size="4" />')); |
$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 '.$gpterm.'s in the ' |
.&mt('A total of [_1] Mb can be divided amongst all '.$gpterm.'s in the ' |
Line 1697 END
|
Line 1717 END
|
.'by adding all unallocated space for '.$gpterm.'s in the '.lc($crstype).'.' |
.'by adding all unallocated space for '.$gpterm.'s in the '.lc($crstype).'.' |
,sprintf("%.2f",$maxposs))); |
,sprintf("%.2f",$maxposs))); |
} |
} |
$r->print(' |
$r->print(&Apache::lonhtmlcommon::row_closure(1)); |
</td> |
|
</tr> |
$r->print(&Apache::lonhtmlcommon::end_pick_box()); |
</table> |
|
'); |
|
return; |
return; |
} |
} |
|
|
Line 1798 sub sections_selection {
|
Line 1817 sub sections_selection {
|
} |
} |
} |
} |
my $output = ' |
my $output = ' |
<select name="'.$elementname.'" multiple="true" size="'.$numvisible.'"> |
<select name="'.$elementname.'" multiple="multiple" size="'.$numvisible.'"> |
'.$section_sel.' |
'.$section_sel.' |
</select>'; |
</select>'; |
return $output; |
return $output; |
Line 1869 sub choose_members_form {
|
Line 1888 sub choose_members_form {
|
} |
} |
} |
} |
&privilege_specificity($r,$action,$specimg,$tools,$stored,$toolprivs, |
&privilege_specificity($r,$action,$specimg,$tools,$stored,$toolprivs, |
$fixedprivs,\@available,$formname,$gpterm,$ucgpterm); |
$fixedprivs,\@available,$formname,$gpterm,$ucgpterm, |
|
$functions); |
my $newusers = &pick_new_members($r,$action,$formname,\@available,$idx, |
my $newusers = &pick_new_members($r,$action,$formname,\@available,$idx, |
$stored,$memimg,$users,$userdata, |
$stored,$memimg,$users,$userdata, |
$granularity,\%origmembers,$gpterm, |
$granularity,\%origmembers,$gpterm, |
Line 1966 sub print_current_settings {
|
Line 1986 sub print_current_settings {
|
<td valign="top">'.$description.'</td> |
<td valign="top">'.$description.'</td> |
<td> |
<td> |
'); |
'); |
|
|
if (@{$available} > 0) { |
if (@{$available} > 0) { |
$r->print('<b>'.&mt('Available for assignment to members:').'</b>'. |
$r->print('<b>'.&mt('Available for assignment to members:').'</b>'); |
'<table class="LC_group_priv"><tr>'); |
$r->print('<ul>'); |
my $rowcell = int(@{$available}/2) + @{$available}%2; |
|
for (my $i=0; $i<@{$available}; $i++) { |
for (my $i=0; $i<@{$available}; $i++) { |
if (@{$available} > 3) { |
$r->print('<li>'.&mt($$functions{$$available[$i]}).'</li>'); |
if ($i==$rowcell) { |
|
$r->print('</tr><tr>'); |
|
} |
|
} |
|
$r->print('<td>'.$$functions{$$available[$i]}. |
|
'</td><td> </td>'); |
|
} |
} |
if ((@{$available} > 3) && (@{$available}%2)) { |
$r->print('</ul>'); |
$r->print('<td> </td><td> </td>'); |
|
} |
|
$r->print('</tr></table><br />'); |
|
} |
} |
|
|
if (@{$unavailable} > 0) { |
if (@{$unavailable} > 0) { |
$r->print('<b>'.&mt('Unavailable for assignment:').'</b>'. |
$r->print('<b>'.&mt('Unavailable for assignment:').'</b>'); |
'<table class="LC_group_priv"><tr>'); |
$r->print('<ul>'); |
my $rowcell = int(@{$unavailable}/2) + @{$unavailable}%2; |
for (my $i=0; $i<@{$unavailable}; $i++) { |
for (my $j=0; $j<@{$unavailable}; $j++) { |
$r->print('<li>'.&mt($$functions{$$unavailable[$i]}).'</li>'); |
if (@{$unavailable} > 3) { |
|
if ($j==$rowcell) { |
|
$r->print('</tr><tr>'); |
|
} |
|
} |
|
$r->print('<td>'.$$functions{$$unavailable[$j]}. |
|
'</td><td> </td>'); |
|
} |
} |
if ((@{$unavailable} > 3) && (@{$unavailable}%2)) { |
$r->print('</ul>'); |
$r->print('<td> </td><td> </td>'); |
|
} |
|
$r->print('</tr></table>'); |
|
} |
} |
|
|
my $quota_text=&mt('[_1] Mb',$quota); |
my $quota_text=&mt('[_1] Mb',$quota); |
my $granu_text=&mt($granularity); |
my $granu_text=&mt($granularity); |
$r->print(<<"END"); |
$r->print(<<"END"); |
Line 2064 sub pick_new_members {
|
Line 2067 sub pick_new_members {
|
&check_uncheck_buttons($r,$formname,'member',$lt{'addm'}); |
&check_uncheck_buttons($r,$formname,'member',$lt{'addm'}); |
if (@{$available} > 0 && $granularity eq 'Yes') { |
if (@{$available} > 0 && $granularity eq 'Yes') { |
$r->print('<td> |
$r->print('<td> |
<fieldset><legend><b>'.$lt{'setf'}.'</b></legend> |
<fieldset><legend>'.$lt{'setf'}.'</legend> |
<nobr> |
<span class="LC_nobreak"> |
<input type="button" value="'.&mt('check all').'" |
<input type="button" value="'.&mt('check all').'" |
onclick="javascript:checkAllTools(document.'.$formname.')" /> |
onclick="javascript:checkAllTools(document.'.$formname.')" /> |
|
|
<input type="button" value="'.&mt('uncheck all').'" |
<input type="button" value="'.&mt('uncheck all').'" |
onclick="javascript:uncheckAllTools(document.'.$formname.')" /> |
onclick="javascript:uncheckAllTools(document.'.$formname.')" /> |
</nobr> |
</span> |
</fieldset></td>'); |
</fieldset></td>'); |
} |
} |
$r->print('</tr></table> |
$r->print('</tr></table> |
Line 2094 sub pick_new_members {
|
Line 2097 sub pick_new_members {
|
if ($granularity eq 'Yes') { |
if ($granularity eq 'Yes') { |
$r->print(&Apache::loncommon::start_data_table_row('LC_data_table_dense LC_data_table_highlight').' |
$r->print(&Apache::loncommon::start_data_table_row('LC_data_table_dense LC_data_table_highlight').' |
<td colspan="6"> </td> |
<td colspan="6"> </td> |
<td align="center"><nobr><b>'.&mt('All:').'</b> '); |
<td align="center"><span class="LC_nobreak"><b>'.&mt('All:').'</b> '); |
foreach my $tool (@{$available}) { |
foreach my $tool (@{$available}) { |
$r->print('<label><input type="checkbox" name="togglefunc" '. |
$r->print('<label><input type="checkbox" name="togglefunc" '. |
'onclick="javascript:toggleTools(document.'.$formname.'.user_'.$tool.',this);"'. |
'onclick="javascript:toggleTools(document.'.$formname.'.user_'.$tool.',this);"'. |
' value="'.$tool.'">'.'<b>'.$tool.'</b></label> '); |
' value="'.$tool.'">'.'<b>'.$tool.'</b></label> '); |
} |
} |
$r->print('</nobr></td></tr>'); |
$r->print('</span></td></tr>'); |
} |
} |
} |
} |
my %Sortby = (); |
my %Sortby = (); |
Line 2134 sub pick_new_members {
|
Line 2137 sub pick_new_members {
|
'<td>'.$id.'</td>'. |
'<td>'.$id.'</td>'. |
'<td>'.$section.'</td>'); |
'<td>'.$section.'</td>'); |
if (@{$available} > 0) { |
if (@{$available} > 0) { |
$r->print('<td align="center"><nobr>'. |
$r->print('<td align="center"><span class="LC_nobreak">'. |
' '); |
' '); |
foreach my $tool (@{$available}) { |
foreach my $tool (@{$available}) { |
if ($granularity eq 'Yes') { |
if ($granularity eq 'Yes') { |
Line 2145 sub pick_new_members {
|
Line 2148 sub pick_new_members {
|
$tool.'" value="'.$user.'" />'.$tool.' '); |
$tool.'" value="'.$user.'" />'.$tool.' '); |
} |
} |
} |
} |
$r->print('</nobr></td>'); |
$r->print('</span></td>'); |
} |
} |
$r->print(&Apache::loncommon::end_data_table_row()."\n"); |
$r->print(&Apache::loncommon::end_data_table_row()."\n"); |
} |
} |
Line 2163 sub pick_new_members {
|
Line 2166 sub pick_new_members {
|
|
|
sub privilege_specificity { |
sub privilege_specificity { |
my ($r,$action,$img,$tools,$stored,$toolprivs,$fixedprivs,$available, |
my ($r,$action,$img,$tools,$stored,$toolprivs,$fixedprivs,$available, |
$formname,$gpterm,$ucgpterm) = @_; |
$formname,$gpterm,$ucgpterm,$functions) = @_; |
my %lt = &Apache::lonlocal::texthash ( |
my %lt = &Apache::lonlocal::texthash ( |
'uprv' => 'User privileges for collaborative tools', |
'uprv' => 'User privileges for collaborative tools', |
'frty' => 'For each collaborative tool you have chosen to include, '. |
'frty' => 'For each collaborative tool you have chosen to include, '. |
Line 2232 sub privilege_specificity {
|
Line 2235 sub privilege_specificity {
|
if ($totaloptionalprivs) { |
if ($totaloptionalprivs) { |
$r->print(' |
$r->print(' |
<br /> |
<br /> |
<label><nobr><input type="radio" name="specificity" value="No" '.$specific{'No'}.' /> '.$lt{'algm'}.'</nobr></label><br /> |
<label><span class="LC_nobreak"><input type="radio" name="specificity" value="No" '.$specific{'No'}.' /> '.$lt{'algm'}.'</span></label><br /> |
<label><nobr><input type="radio" name="specificity" value="Yes" '.$specific{'Yes'}.' /> '.$lt{'smgp'}.'</nobr></label><br /><br />'); |
<label><span class="LC_nobreak"><input type="radio" name="specificity" value="Yes" '.$specific{'Yes'}.' /> '.$lt{'smgp'}.'</span></label><br /><br />'); |
} else { |
} else { |
$r->print('<input type="hidden" name="specificity" value="No" />'); |
$r->print('<input type="hidden" name="specificity" value="No" />'); |
} |
} |
Line 2260 sub privilege_specificity {
|
Line 2263 sub privilege_specificity {
|
$r->print($lt{'algm'}.'<br /><br />'); |
$r->print($lt{'algm'}.'<br /><br />'); |
} |
} |
&default_privileges($r,$action,$tools,$toolprivs,$fixedprivs, |
&default_privileges($r,$action,$tools,$toolprivs,$fixedprivs, |
$available); |
$available,$functions); |
} else { |
} else { |
if ($action eq 'create') { |
if ($action eq 'create') { |
$r->print($lt{'asyo'}); |
$r->print($lt{'asyo'}); |
Line 2284 sub privilege_specificity {
|
Line 2287 sub privilege_specificity {
|
} |
} |
|
|
sub default_privileges { |
sub default_privileges { |
my ($r,$action,$tools,$toolprivs,$fixedprivs,$available) = @_; |
my ($r,$action,$tools,$toolprivs,$fixedprivs,$available,$functions) = @_; |
my %lt = &Apache::lonlocal::texthash( |
my %lt = &Apache::lonlocal::texthash( |
'addp' => 'Additional privileges', |
'addp' => 'Additional privileges', |
'fixp' => 'Fixed privileges', |
'fixp' => 'Fixed privileges', |
Line 2293 sub default_privileges {
|
Line 2296 sub default_privileges {
|
); |
); |
$r->print(&Apache::lonhtmlcommon::start_pick_box('LC_group_priv_box'). |
$r->print(&Apache::lonhtmlcommon::start_pick_box('LC_group_priv_box'). |
&Apache::lonhtmlcommon::row_title($lt{'func'},undef, |
&Apache::lonhtmlcommon::row_title($lt{'func'},undef, |
'LC_groups_functionality')); |
'LC_groups_functionality')); |
$r->print(join('</td><td class="LC_groups_functionality">',@{$tools})); |
my @tableHeader; |
|
foreach my $key (sort(keys(%{$functions}))){ |
|
push (@tableHeader,&mt($functions->{$key})); |
|
} |
|
$r->print(join('</td><td class="LC_groups_functionality">', @tableHeader)); |
$r->print(&Apache::lonhtmlcommon::row_closure(1)); |
$r->print(&Apache::lonhtmlcommon::row_closure(1)); |
my $fixed = ''; |
my $fixed = ''; |
my $dynamic = ''; |
my $dynamic = ''; |
Line 2310 sub default_privileges {
|
Line 2317 sub default_privileges {
|
$fixed .= '</td><td class="LC_groups_fixed">'; |
$fixed .= '</td><td class="LC_groups_fixed">'; |
} |
} |
$fixed .= '<input type="hidden" name="defpriv" value="'.$priv.'" />' |
$fixed .= '<input type="hidden" name="defpriv" value="'.$priv.'" />' |
.'<span class="LC_nobreak">'.$$toolprivs{$tool}{$priv}.' '; |
.'<span class="LC_nobreak">'.&mt($$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 2325 sub default_privileges {
|
Line 2332 sub default_privileges {
|
$dynamic .= '</tr> |
$dynamic .= '</tr> |
<tr>'."\n"; |
<tr>'."\n"; |
} |
} |
$dynamic .= '<td><span class="LC_nobreak"><label><input type="checkbox" name="defpriv" value="'.$priv.'" />'.$$toolprivs{$tool}{$priv}.'</label></span></td>'."\n"; |
$dynamic .= '<td><span class="LC_nobreak"><label><input type="checkbox" name="defpriv" value="'.$priv.'" />'.&mt($$toolprivs{$tool}{$priv}).'</label></span></td>'."\n"; |
} |
} |
} |
} |
if ($privcount == 0) { |
if ($privcount == 0) { |
Line 2509 sub current_membership {
|
Line 2516 sub current_membership {
|
$r->print(&check_uncheck_tools($r,$available)); |
$r->print(&check_uncheck_tools($r,$available)); |
$r->print(' |
$r->print(' |
<td> |
<td> |
<nobr> |
<span class="LC_nobreak"> |
<fieldset><legend><b>'.$lt{'curf'}.'</b></legend> |
<fieldset><legend>'.$lt{'curf'}.'</legend> |
<input type="button" value="'.&mt('check all').'" |
<input type="button" value="'.&mt('check all').'" |
onclick="javascript:checkAllTools(document.'.$formname.')" /> |
onclick="javascript:checkAllTools(document.'.$formname.')" /> |
|
|
<input type="button" value="'.&mt('uncheck all').'" |
<input type="button" value="'.&mt('uncheck all').'" |
onclick="javascript:uncheckAllTools(document.'.$formname.')" /> |
onclick="javascript:uncheckAllTools(document.'.$formname.')" /> |
</fieldset> |
</fieldset> |
</nobr> |
</span> |
</td> |
</td> |
'); |
'); |
} |
} |
Line 2552 END
|
Line 2559 END
|
if ($granularity eq 'Yes') { |
if ($granularity eq 'Yes') { |
$r->print(&Apache::loncommon::start_data_table_row('LC_data_table_dense LC_data_table_highlight').' |
$r->print(&Apache::loncommon::start_data_table_row('LC_data_table_dense LC_data_table_highlight').' |
<td colspan="7"> </td> |
<td colspan="7"> </td> |
<td colspan="'.$colspan.'" align="center"><nobr><b>'.&mt('All:'). |
<td colspan="'.$colspan.'" align="center"><span class="LC_nobreak"><b>'.&mt('All:'). |
'</b> '); |
'</b> '); |
foreach my $tool (@{$available}) { |
foreach my $tool (@{$available}) { |
$r->print('<label><input type="checkbox" name="togglefunc"'. |
$r->print('<label><input type="checkbox" name="togglefunc"'. |
' onclick="javascript:toggleTools(document.'.$formname.'.user_'.$tool.',this);"'. |
' onclick="javascript:toggleTools(document.'.$formname.'.user_'.$tool.',this);"'. |
' value="'.$tool.'" />'.'<b>'.$tool.'</b></label> '); |
' value="'.$tool.'" />'.'<b>'.$tool.'</b></label> '); |
} |
} |
$r->print('</nobr></td></tr>'); |
$r->print('</span></td></tr>'); |
} |
} |
} |
} |
my %Sortby = (); |
my %Sortby = (); |
Line 2587 END
|
Line 2594 END
|
$r->print(&Apache::loncommon::start_data_table_row('LC_data_table_dense').' |
$r->print(&Apache::loncommon::start_data_table_row('LC_data_table_dense').' |
<td>'); |
<td>'); |
if ($$current{$user}{changestate} eq 'reenable') { |
if ($$current{$user}{changestate} eq 'reenable') { |
$r->print('<nobr><label>'. |
$r->print('<span class="LC_nobreak"><label>'. |
'<input type="checkbox" name="reenable" value="'.$user.'" />'. |
'<input type="checkbox" name="reenable" value="'.$user.'" />'. |
$lt{'reen'}.'</label></nobr><br />'); |
$lt{'reen'}.'</label></span><br />'); |
} elsif ($$current{$user}{changestate} eq 'expire') { |
} elsif ($$current{$user}{changestate} eq 'expire') { |
$r->print('<nobr><label>'. |
$r->print('<span class="LC_nobreak"><label>'. |
'<input type="checkbox" name="expire" value="'.$user.'" />'. |
'<input type="checkbox" name="expire" value="'.$user.'" />'. |
$lt{'expi'}.'</label></nobr><br />'); |
$lt{'expi'}.'</label></span><br />'); |
} elsif ($$current{$user}{changestate} eq 'activate') { |
} elsif ($$current{$user}{changestate} eq 'activate') { |
$r->print('<nobr><label>'. |
$r->print('<span class="LC_nobreak"><label>'. |
'<input type="checkbox" name="activate" value="'.$user.'" />'. |
'<input type="checkbox" name="activate" value="'.$user.'" />'. |
$lt{'acti'}.'</label></nobr><br />'); |
$lt{'acti'}.'</label></span><br />'); |
} |
} |
$r->print('<nobr><label>'. |
$r->print('<span class="LC_nobreak"><label>'. |
'<input type="checkbox" name="deletion" value="'.$user.'" />'. |
'<input type="checkbox" name="deletion" value="'.$user.'" />'. |
$lt{'dele'}.'</label></nobr>'); |
$lt{'dele'}.'</label></span>'); |
if ($specificity eq 'Yes') { |
if ($specificity eq 'Yes') { |
$r->print('<br /><nobr><label>'. |
$r->print('<br /><span class="LC_nobreak"><label>'. |
'<input type="checkbox" name="changepriv" value="'.$user.'" />'.$lt{'chpr'}. |
'<input type="checkbox" name="changepriv" value="'.$user.'" />'.$lt{'chpr'}. |
'</label></nobr>'); |
'</label></span>'); |
} |
} |
$r->print(' |
$r->print(' |
</td>'. |
</td>'. |
Line 2616 END
|
Line 2623 END
|
'<td>'.$start.'</td>'. |
'<td>'.$start.'</td>'. |
'<td>'.$end.'</td>'); |
'<td>'.$end.'</td>'); |
if ($hastools) { |
if ($hastools) { |
$r->print('<td align="left"><nobr>'. |
$r->print('<td align="left"><span class="LC_nobreak">'. |
' '); |
' '); |
foreach my $tool (@{$$current{$user}{currtools}}) { |
foreach my $tool (@{$$current{$user}{currtools}}) { |
if ($granularity eq 'Yes') { |
if ($granularity eq 'Yes') { |
Line 2632 END
|
Line 2639 END
|
} |
} |
$r->print(' '); |
$r->print(' '); |
} |
} |
$r->print('</nobr></td>'); |
$r->print('</span></td>'); |
} |
} |
if ($addtools) { |
if ($addtools) { |
$r->print('<td align="left">'); |
$r->print('<td align="left">'); |
if ($granularity eq 'Yes') { |
if ($granularity eq 'Yes') { |
foreach my $tool (@{$$current{$user}{newtools}}) { |
foreach my $tool (@{$$current{$user}{newtools}}) { |
$r->print('<nobr><label><input type="checkbox" |
$r->print('<span class="LC_nobreak"><label><input type="checkbox" |
name="user_'.$tool.'" value="'. |
name="user_'.$tool.'" value="'. |
$user.'" />'.$tool. |
$user.'" />'.$tool. |
'</label></nobr> '); |
'</label></span> '); |
} |
} |
} else { |
} else { |
foreach my $tool (@{$$current{$user}{newtools}}) { |
foreach my $tool (@{$$current{$user}{newtools}}) { |
$r->print('<nobr><input type="hidden" |
$r->print('<span class="LC_nobreak"><input type="hidden" |
name="user_'. $tool.'" value="'. |
name="user_'. $tool.'" value="'. |
$user.'" />'.$tool. |
$user.'" />'.$tool. |
'</nobr> '); |
'</span> '); |
} |
} |
} |
} |
$r->print('</td>'); |
$r->print('</td>'); |
Line 2668 sub check_uncheck_buttons {
|
Line 2675 sub check_uncheck_buttons {
|
$r->print(' |
$r->print(' |
<td '.$colspan.'> |
<td '.$colspan.'> |
<fieldset> |
<fieldset> |
<legend><b>'.$title.'</b></legend> |
<legend>'.$title.'</legend> |
<nobr> |
<span class="LC_nobreak"> |
<input type="button" value="'.&mt('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="'.&mt('uncheck all').'" |
<input type="button" value="'.&mt('uncheck all').'" |
onclick="javascript:uncheckAll(document.'.$formname.'.'.$field.')" /> |
onclick="javascript:uncheckAll(document.'.$formname.'.'.$field.')" /> |
</nobr> |
</span> |
</fieldset> |
</fieldset> |
</td> |
</td> |
'); |
'); |
Line 2952 sub member_privileges_form {
|
Line 2959 sub member_privileges_form {
|
foreach my $tool (@{$tools}) { |
foreach my $tool (@{$tools}) { |
if (@{$showboxes{$tool}} > 0) { |
if (@{$showboxes{$tool}} > 0) { |
$r->print('<td valign="top">'); |
$r->print('<td valign="top">'); |
$r->print('<table class="thinborder"><tr>'. |
$r->print('<fieldset><legend>'.&mt($tool).'</legend>'); |
'<th colspan="'.$colspan.'">'. |
$r->print('<table><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 2969 sub member_privileges_form {
|
Line 2975 sub member_privileges_form {
|
$r->print('<td>'); |
$r->print('<td>'); |
} |
} |
$r->print( |
$r->print( |
'<fieldset><legend><b>'.&mt($$toolprivs{$tool}{$priv}).'</b></legend>' |
'<fieldset><legend>'.&mt($$toolprivs{$tool}{$priv}).'</legend>' |
.'<span class="LC_nobreak">' |
.'<span class="LC_nobreak">' |
.' <input type="button" value="'.&mt('check all').'"' |
.' <input type="button" value="'.&mt('check all').'"' |
.' onclick="javascript:checkAll(document.'.$formname.'.userpriv_'.$priv.')" />' |
.' onclick="javascript:checkAll(document.'.$formname.'.userpriv_'.$priv.')" />' |
Line 2989 sub member_privileges_form {
|
Line 2995 sub member_privileges_form {
|
} |
} |
} |
} |
} |
} |
$r->print('</tr></table></td><td> </td>'); |
$r->print('</tr></table></fieldset></td><td> </td>'); |
} |
} |
} |
} |
$r->print('</tr></table>'); |
$r->print('</tr></table>'); |
Line 3122 sub write_group_data {
|
Line 3128 sub write_group_data {
|
if ($quota !~ /^\d*\.?\d*$/) { |
if ($quota !~ /^\d*\.?\d*$/) { |
$quota = 0; |
$quota = 0; |
$r->print('<div class="LC_warning">' |
$r->print('<div class="LC_warning">' |
.&mt('The value you entered for the quota for the file repository in this '.$gpterm |
.&mt('The value you entered for the quota for the group portfolio in this '.$gpterm |
.' contained invalid characters, so it has been set to 0 Mb. You can change this by' |
.' contained invalid characters, so it has been set to 0 Mb. You can change this by' |
.' modifying the '.$gpterm.' settings.') |
.' modifying the '.$gpterm.' settings.') |
.'</div>'); |
.'</div>'); |
Line 3130 sub write_group_data {
|
Line 3136 sub write_group_data {
|
if ($quota > $maxposs) { |
if ($quota > $maxposs) { |
$quota = $maxposs; |
$quota = $maxposs; |
$r->print('<div class="LC_warning">' |
$r->print('<div class="LC_warning">' |
.&mt('The value you entered for the quota for the file repository in this '.$gpterm |
.&mt('The value you entered for the quota for the group portfolio in this '.$gpterm |
.' exceeded the maximum possible value, so it has been set to [_1] Mb ' |
.' exceeded the maximum possible value, so it has been set to [_1] Mb ' |
.'(the maximum possible value).',sprintf("%.2f",$maxposs)) |
.'(the maximum possible value).',sprintf("%.2f",$maxposs)) |
.'</div>'); |
.'</div>'); |
Line 3222 sub write_group_data {
|
Line 3228 sub write_group_data {
|
my $crspath = '/uploaded/'.$cdom.'/'.$cnum.'/'; |
my $crspath = '/uploaded/'.$cdom.'/'.$cnum.'/'; |
my $boardsmap = $crspath.'group_boards_'.$groupname.'.sequence'; |
my $boardsmap = $crspath.'group_boards_'.$groupname.'.sequence'; |
my $navmap = Apache::lonnavmaps::navmap->new(); |
my $navmap = Apache::lonnavmaps::navmap->new(); |
my $bbmapres = $navmap->getResourceByUrl($boardsmap); |
my ($bbmapres,$error); |
undef($navmap); |
if (defined($navmap)) { |
if (!$bbmapres) { |
$bbmapres = $navmap->getResourceByUrl($boardsmap); |
my $grpmap = $crspath.'group_folder_'.$groupname.'.sequence'; |
undef($navmap); |
my $disctitle = &mt('Discussion Boards'); |
if (!$bbmapres) { |
my $outcome = &map_updater($cdom,$cnum,'group_boards_'. |
my $grpmap = $crspath.'group_folder_'.$groupname.'.sequence'; |
$groupname.'.sequence','bbseq', |
my $disctitle = &mt('Discussion Boards'); |
$disctitle,$grpmap); |
my $outcome = &map_updater($cdom,$cnum,'group_boards_'. |
my ($furl,$ferr) = |
$groupname.'.sequence','bbseq', |
&Apache::lonuserstate::readmap($cdom.'/'.$cnum); |
$disctitle,$grpmap); |
$navmap = Apache::lonnavmaps::navmap->new(); |
my ($furl,$ferr) = |
# modify parameter |
&Apache::lonuserstate::readmap($cdom.'/'.$cnum); |
if ($outcome eq 'ok') { |
# modify parameter |
my $parm_result = &parm_setter($navmap,$cdom,$boardsmap, |
if ($outcome eq 'ok') { |
$groupname); |
$navmap = Apache::lonnavmaps::navmap->new(); |
if ($parm_result) { |
if (defined($navmap)) { |
$r->print('<div class="LC_error">' |
my $parm_result = &parm_setter($navmap,$cdom,$boardsmap, |
.&mt('An error occurred while setting parameters ' |
$groupname); |
.'for Discussion Boards folder: ' |
if ($parm_result) { |
.'[_1]',$parm_result) |
$error = &mt('An error occurred while setting parameters ' |
.'</div>'); |
.'for Discussion Boards folder: ' |
|
.'[_1]',$parm_result); |
|
} else { |
|
$r->print('<div class="LC_success">'. |
|
&mt('Discussion Boards Folder created.') |
|
.'</div>'); |
|
} |
|
undef($navmap); |
|
} else { |
|
$error = &mt('An error occurred while setting parameters '. |
|
'for Discussion Boards folder: '. |
|
'Could not retrieve course information' ); |
|
} |
} else { |
} else { |
$r->print('<div class="LC_success">' |
$r->print($outcome); |
.&mt('Discussion Boards Folder created.') |
|
.'</div>'); |
|
} |
} |
} else { |
|
$r->print($outcome); |
|
} |
} |
undef($navmap); |
} else { |
|
$error = &mt("An error occurred while retrieving the contents of the group's folder.").'<br />'. |
|
&mt('You need to re-initialize the course.'); |
|
} |
|
if ($error ne '') { |
|
$r->print('<div class="LC_error">'.$error.'</div>'); |
} |
} |
} |
} |
$r->print('<div class="LC_success">' |
$r->print('<div class="LC_success">' |
Line 3509 sub mapping_options {
|
Line 3528 sub mapping_options {
|
'adds' => "If automatic $gpterm enrollment is enabled, when a user is newly assigned a ".lc($crstype)."-wide or section-specific role, he/she will automatically be added as a member of the $gpterm, with start and end access dates defined by the default dates set for the $gpterm, unless he/she is already a $gpterm member, with access dates that permit either current or future $gpterm access.", |
'adds' => "If automatic $gpterm enrollment is enabled, when a user is newly assigned a ".lc($crstype)."-wide or section-specific role, he/she will automatically be added as a member of the $gpterm, with start and end access dates defined by the default dates set for the $gpterm, unless he/she is already a $gpterm member, with access dates that permit either current or future $gpterm access.", |
'drops' => "If automatic $gpterm disenrollment is enabled, when a user's role is expired, access to the $gpterm will be terminated unless the user continues to have other ".lc($crstype)."-wide or section-specific active or future roles which receive automatic membership in the $gpterm.", |
'drops' => "If automatic $gpterm disenrollment is enabled, when a user's role is expired, access to the $gpterm will be terminated unless the user continues to have other ".lc($crstype)."-wide or section-specific active or future roles which receive automatic membership in the $gpterm.", |
'pirs' => "Pick roles and sections for automatic $gpterm enrollment", |
'pirs' => "Pick roles and sections for automatic $gpterm enrollment", |
'curr' => 'Currently set to', |
|
'on' => 'on', |
'on' => 'on', |
'off' => 'off', |
'off' => 'off', |
'auad' => "Automatically enable $gpterm membership when roles are added?", |
'auad' => "Automatically enable $gpterm membership when roles are added?", |
Line 3534 sub automapping {
|
Line 3552 sub automapping {
|
} |
} |
$r->print(&Apache::lonhtmlcommon::topic_bar($image,$$lt{'endi'}).' |
$r->print(&Apache::lonhtmlcommon::topic_bar($image,$$lt{'endi'}).' |
<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'}.': |
<span class="LC_nobreak">'.$$lt{'auad'}.': |
<label><input type="radio" name="autoadd" value="on" />'.&mt('on').' </label><label><input type="radio" name="autoadd" value="off" checked="checked" />'.&mt('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(' ('.&mt('Currently set to [_1].','<b>'.$$lt{$add}.'</b>').')'); |
} |
} |
$r->print(' |
$r->print(' |
</nobr><br /> |
</span><br /> |
<nobr>'.$$lt{'auex'}.': |
<span class="LC_nobreak">'.$$lt{'auex'}.': |
<label><input type="radio" name="autodrop" value="on" />'.&mt('on').' </label><label><input type="radio" name="autodrop" value="off" checked="checked" />'.&mt('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(' ('.&mt('Currently set to [_1].','<b>'.$$lt{$drop}.'</b>').')'); |
} |
} |
$r->print('</nobr><br /><br />'.$$lt{'mapr'}); |
$r->print('</span><br /><br />'.$$lt{'mapr'}); |
} |
} |
|
|
sub mapping_settings { |
sub mapping_settings { |
Line 3706 sub member_privs_entries {
|
Line 3724 sub member_privs_entries {
|
if ($privcount == 3) { |
if ($privcount == 3) { |
$dynamic .= '</tr><tr>'; |
$dynamic .= '</tr><tr>'; |
} |
} |
$dynamic .='<td><nobr><label><input type="checkbox" '. |
$dynamic .='<td><span class="LC_nobreak"><label><input type="checkbox" '. |
'name="userpriv_'.$priv.'" value="'.$user.'"'; |
'name="userpriv_'.$priv.'" value="'.$user.'"'; |
if (grep/^\Q$priv\E$/,@{$defprivs}) { |
if (grep/^\Q$priv\E$/,@{$defprivs}) { |
$dynamic .= ' checked="checked" '; |
$dynamic .= ' checked="checked" '; |
} |
} |
$dynamic .= ' />'.$$toolprivs{$tool}{$priv}. |
$dynamic .= ' />'.$$toolprivs{$tool}{$priv}. |
'</label></nobr></td>'; |
'</label></span></td>'; |
} |
} |
} |
} |
$r->print('<tr><td colspan="2"><nobr>'.$fixed.'</nobr></td></tr><tr>'.$dynamic.'</tr></table></td>'); |
$r->print('<tr><td colspan="2"><span class="LC_nobreak">'.$fixed.'</span></td></tr><tr>'.$dynamic.'</tr></table></td>'); |
} else { |
} else { |
$r->print('<td valign="top"><table width="100%"><tr><th colspan="2">'.$tool.'</th></tr><tr><td> </td></tr><tr><td> </td></tr></table></td>'); |
$r->print('<td valign="top"><table width="100%"><tr><th colspan="2">'.$tool.'</th></tr><tr><td> </td></tr><tr><td> </td></tr></table></td>'); |
} |
} |
Line 3741 sub date_setting_table {
|
Line 3759 sub date_setting_table {
|
'startdate',$starttime); |
'startdate',$starttime); |
my $endform = &Apache::lonhtmlcommon::date_setter($formname, |
my $endform = &Apache::lonhtmlcommon::date_setter($formname, |
'enddate',$endtime); |
'enddate',$endtime); |
my $perpetual = |
my $perpetual = ' <span class="LC_nobreak"><label>' |
'<nobr><label><input type="checkbox" name="no_end_date" />'. |
.'<input type="checkbox" name="no_end_date" />' |
&mt('None').'</label></nobr>'; |
.&mt('No end date') |
my $table = "<table class=\"LC_descriptive_input\">\n". |
.'</label></span>'; |
'<tr><td class="LC_description">'.&mt('Start:').'</td>'. |
my $table = &Apache::lonhtmlcommon::start_pick_box() |
'<td>'.$startform.'</td>'. |
.&Apache::lonhtmlcommon::row_title(&mt('Start Date')) |
'<td> </td>'."</tr>\n". |
.$startform |
'<tr><td class="LC_description">'.&mt('End:').'</td>'. |
.&Apache::lonhtmlcommon::row_closure() |
'<td>'.$endform.'</td>'. |
.&Apache::lonhtmlcommon::row_title(&mt('End Date')) |
'<td>'.$perpetual.'</td>'."</tr>\n". |
.$endform |
"</table>\n"; |
.$perpetual |
|
.&Apache::lonhtmlcommon::row_closure(1) |
|
.&Apache::lonhtmlcommon::end_pick_box(); |
return $table; |
return $table; |
} |
} |
|
|
Line 3787 sub add_group_folder {
|
Line 3807 sub add_group_folder {
|
if ($delresult ne 'ok') { |
if ($delresult ne 'ok') { |
$warning = $delresult; |
$warning = $delresult; |
} |
} |
return $outcome; |
return $outcome.$warning; |
} |
} |
} |
} |
my $delresult = &release_folder_lock($cdom,$cnum,'group_allfolders'); |
my $delresult = &release_folder_lock($cdom,$cnum,'group_allfolders'); |
Line 3797 sub add_group_folder {
|
Line 3817 sub add_group_folder {
|
} else { |
} else { |
$outcome = '<span class="LC_error">' |
$outcome = '<span class="LC_error">' |
.&mt('Could not obtain exclusive lock to check status of the folder for all groups. No group folder added.') |
.&mt('Could not obtain exclusive lock to check status of the folder for all groups. No group folder added.') |
.'</div>'; |
.'</span>'; |
return $outcome; |
return $outcome; |
} |
} |
my $grpfolder = &mt($ucgpterm.' Folder - [_1]',$description); |
my $grpfolder = &mt($ucgpterm.' Folder - [_1]',$description); |
Line 3828 sub add_group_folder {
|
Line 3848 sub add_group_folder {
|
} |
} |
my ($furl,$ferr)= &Apache::lonuserstate::readmap($cdom.'/'.$cnum); |
my ($furl,$ferr)= &Apache::lonuserstate::readmap($cdom.'/'.$cnum); |
my $navmap = Apache::lonnavmaps::navmap->new(); |
my $navmap = Apache::lonnavmaps::navmap->new(); |
|
if (!defined($navmap)) { |
|
return $warning.'<span class="LC_error">'.&mt('Error retrieving course contents'). |
|
' '.&mt('You need to re-initialize the course.').'</span>'; |
|
} |
# modify parameters |
# modify parameters |
my $parm_result; |
my $parm_result; |
if ($action eq 'create') { |
if ($action eq 'create') { |
Line 3933 sub new_map {
|
Line 3957 sub new_map {
|
sub parm_setter { |
sub parm_setter { |
my ($navmap,$cdom,$url,$groupname) = @_; |
my ($navmap,$cdom,$url,$groupname) = @_; |
my $allresults; |
my $allresults; |
|
if (!defined($navmap)) { |
|
$allresults = '<div class="LC_warning">'. |
|
&mt('Parameters not set for [_1] because the contents of the course could not be retrieved.',$url).' '. |
|
&mt('You need to reinitialize the course.'). |
|
'</div>'; |
|
return $allresults; |
|
} |
my %hide_settings = ( |
my %hide_settings = ( |
'course' => { |
'course' => { |
'num' => 13, |
'num' => 13, |