version 1.7, 2001/03/17 15:06:57
|
version 1.8, 2001/03/17 15:42:24
|
Line 229 ENDNUSER
|
Line 229 ENDNUSER
|
} |
} |
} |
} |
$r->print('<hr><h3>Add Roles</h3><h4>System Level</h4>'); |
$r->print('<hr><h3>Add Roles</h3><h4>System Level</h4>'); |
$r->print('<h4>Domain Level</h4>'); |
# |
|
# Domain level |
|
# |
|
$r->print('<h4>Domain Level</h4>'. |
|
'<table border=2><tr><th>Activate</th><th>Role</th><th>Extent</th>'. |
|
'<th>Start</th><th>End</th></tr>'); |
map { |
map { |
my $thisdomain=$_; |
my $thisdomain=$_; |
map { |
map { |
if (&Apache::lonnet::allowed('c'.$_,$thisdomain)) { |
if (&Apache::lonnet::allowed('c'.$_,$thisdomain)) { |
$r->print($_.' - '.$thisdomain.'<br>'); |
my $plrole=&Apache::lonnet::plaintext($_); |
|
$r->print(<<ENDDROW); |
|
<tr> |
|
<td><input type=checkbox name="act_$thisdomain\_$_"></td> |
|
<td>$plrole</td> |
|
<td>$thisdomain</td> |
|
<td><input type=hidden name="start_$thisdomain\_$_" value=''> |
|
<a href= |
|
"javascript:pjump('date_start','Start Date $plrole',document.cu.start_$thisdomain\_$_.value,'start_$thisdomain\_$_','cu.pres','dateset')">Set Start Date</a></td> |
|
<td><input type=hidden name="end_$thisdomain\_$_" value=''> |
|
<a href= |
|
"javascript:pjump('date_end','End Date $plrole',document.cu.end_$thisdomain\_$_.value,'end_$thisdomain\_$_','cu.pres','dateset')">Set End Date</a></td> |
|
</tr> |
|
ENDDROW |
} |
} |
} ('dc','cc','li','dg','au'); |
} ('dc','cc','li','dg','au'); |
} sort keys %incdomains; |
} sort keys %incdomains; |
|
$r->print('</table>'); |
|
# |
|
# Course level |
|
# |
$r->print('<h4>Course Level</h4>'. |
$r->print('<h4>Course Level</h4>'. |
'<table border=2><tr><th>Activate</th><th>Role</th><th>Extent</th>'. |
'<table border=2><tr><th>Activate</th><th>Role</th><th>Extent</th>'. |
'<th>Group/Section</th><th>Start</th><th>End</th></tr>'); |
'<th>Group/Section</th><th>Start</th><th>End</th></tr>'); |
Line 343 ENDTHREEHEAD
|
Line 365 ENDTHREEHEAD
|
$r->print('Assigning: '.$3.' in '.$url.': '. |
$r->print('Assigning: '.$3.' in '.$url.': '. |
&Apache::lonnet::assignrole($ENV{'form.cdomain'},$ENV{'form.cuname'}, |
&Apache::lonnet::assignrole($ENV{'form.cdomain'},$ENV{'form.cuname'}, |
$url,$3,$end,$start).'<br>'); |
$url,$3,$end,$start).'<br>'); |
} |
} elsif (($_=~/^form\.act\_([^\_]+)\_([^\_]+)$/) && ($ENV{$_})) { |
|
my $url='/'.$1.'/'; |
|
my $start=$now; |
|
if ($ENV{'form.start_'.$1.'_'.$2}) { |
|
$start=$ENV{'form.start_'.$1.'_'.$2}; |
|
} |
|
my $end=0; |
|
if ($ENV{'form.end_'.$1.'_'.$2}) { |
|
$end=$ENV{'form.end_'.$1.'_'.$2}; |
|
} |
|
$r->print('Assigning: '.$2.' in '.$url.': '. |
|
&Apache::lonnet::assignrole($ENV{'form.cdomain'},$ENV{'form.cuname'}, |
|
$url,$2,$end,$start).'<br>'); |
|
} |
} keys %ENV; |
} keys %ENV; |
$r->print('</body></html>'); |
$r->print('</body></html>'); |
} |
} |