');
@@ -182,7 +208,7 @@ ENDNUSER
my %coursedata=&Apache::lonnet::coursedescription($1.'_'.$2);
my $carea='Course: '.$coursedata{'description'};
$inccourses{$1.'_'.$2}=1;
- if (&Apache::lonnet::allowed('c'.$trole,$1.'_'.$2)) {
+ if (&Apache::lonnet::allowed('c'.$trole,$1.'/'.$2)) {
$allows=1;
}
$bgcol=$1.'_'.$2;
@@ -193,11 +219,14 @@ ENDNUSER
}
$area=$carea;
} else {
- if ($1) {
- $incdomains{$1}=1;
+ if ($area=~/^\/(\w+)\//) {
if (&Apache::lonnet::allowed('c'.$trole,$1)) {
$allows=1;
}
+ } else {
+ if (&Apache::lonnet::allowed('c'.$trole,'/')) {
+ $allows=1;
+ }
}
}
@@ -224,21 +253,70 @@ ENDNUSER
$r->print('');
}
}
- $r->print('
Add Roles
System Level
');
- $r->print('
Domain Level
');
+ $r->print('
Add Roles
');
+#
+# Co-Author
+#
+
+ if (&Apache::lonnet::allowed('cca',$ENV{'user.domain'})) {
+ my $cuname=$ENV{'user.name'};
+ my $cudom=$ENV{'user.domain'};
+ $r->print(<Construction Space
+
');
map {
my $thiscourse=$_;
+ my $protectedcourse=$_;
+ $thiscourse=~s:_:/:g;
my %coursedata=&Apache::lonnet::coursedescription($thiscourse);
my $area=$coursedata{'description'};
my $bgcol=$thiscourse;
@@ -247,23 +325,26 @@ ENDNUSER
map {
if (&Apache::lonnet::allowed('c'.$_,$thiscourse)) {
my $plrole=&Apache::lonnet::plaintext($_);
- $r->print(<print("
-
+
$plrole
$area
-
-
+
");
+ if ($_ ne 'cc') {
+ $r->print("");
+ } else { $r->print(" "); }
+ $r->print(<Set Start Date
-
+"javascript:pjump('date_start','Start Date $plrole',document.cu.start_$protectedcourse\_$_.value,'start_$protectedcourse\_$_','cu.pres','dateset')">Set Start Date
+"javascript:pjump('date_end','End Date $plrole',document.cu.end_$protectedcourse\_$_.value,'end_$protectedcourse\_$_','cu.pres','dateset')">Set End Date