version 1.80, 2008/10/22 17:39:05
|
version 1.86, 2008/12/16 23:45:29
|
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 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 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 1668 END
|
Line 1674 END
|
<td class="LC_description">'.&mt('Granularity:').'</td> |
<td class="LC_description">'.&mt('Granularity:').'</td> |
<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].' |
&mt($$stored{'granularity'})).')'); |
,'"'.&mt($$stored{'granularity'}).'"').')'); |
} |
} |
$r->print(' |
$r->print(' |
</td> |
</td> |
Line 2065 sub pick_new_members {
|
Line 2071 sub pick_new_members {
|
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><b>'.$lt{'setf'}.'</b></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 2100 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 2140 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 2151 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 2232 sub privilege_specificity {
|
Line 2238 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 2509 sub current_membership {
|
Line 2515 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><b>'.$lt{'curf'}.'</b></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.')" /> |
Line 2517 sub current_membership {
|
Line 2523 sub current_membership {
|
<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 2558 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 2593 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 2622 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 2638 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 2669 sub check_uncheck_buttons {
|
Line 2675 sub check_uncheck_buttons {
|
<td '.$colspan.'> |
<td '.$colspan.'> |
<fieldset> |
<fieldset> |
<legend><b>'.$title.'</b></legend> |
<legend><b>'.$title.'</b></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 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 3742 sub date_setting_table {
|
Line 3760 sub date_setting_table {
|
my $endform = &Apache::lonhtmlcommon::date_setter($formname, |
my $endform = &Apache::lonhtmlcommon::date_setter($formname, |
'enddate',$endtime); |
'enddate',$endtime); |
my $perpetual = |
my $perpetual = |
'<nobr><label><input type="checkbox" name="no_end_date" />'. |
'<span class="LC_nobreak"><label><input type="checkbox" name="no_end_date" />'. |
&mt('None').'</label></nobr>'; |
&mt('None').'</label></span>'; |
my $table = "<table class=\"LC_descriptive_input\">\n". |
my $table = "<table class=\"LC_descriptive_input\">\n". |
'<tr><td class="LC_description">'.&mt('Start:').'</td>'. |
'<tr><td class="LC_description">'.&mt('Start:').'</td>'. |
'<td>'.$startform.'</td>'. |
'<td>'.$startform.'</td>'. |
Line 3787 sub add_group_folder {
|
Line 3805 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 3815 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 3846 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 3955 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>'; |
|
} |
my %hide_settings = ( |
my %hide_settings = ( |
'course' => { |
'course' => { |
'num' => 13, |
'num' => 13, |