version 1.94, 2009/02/25 16:39:54
|
version 1.98, 2009/05/07 16:09:55
|
Line 78 sub handler {
|
Line 78 sub handler {
|
email => 'Send Messages', |
email => 'Send Messages', |
discussion => 'Discussion Boards', |
discussion => 'Discussion Boards', |
chat => 'Chat Room', |
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 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 1612 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 1646 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>' |
&mt($$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">' |
&mt($$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 1703 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 3132 sub write_group_data {
|
Line 3145 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 3140 sub write_group_data {
|
Line 3153 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 3763 sub date_setting_table {
|
Line 3776 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>' |
'<span class="LC_nobreak"><label><input type="checkbox" name="no_end_date" />'. |
.'<input type="checkbox" name="no_end_date" />' |
&mt('None').'</label></span>'; |
.&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; |
} |
} |
|
|