- |
-$plrole |
-$area Domain: $domain |
-ENDEXTENT
- if ($_ ne 'cc') {
- if ($num_sections > 0) {
- my $currsec = &course_sections($num_sections,\%sections_count,$protectedcourse.'_'.$_);
+ foreach my $role ('st','ta','ep','in','cc') {
+ if (&Apache::lonnet::allowed('c'.$role,$thiscourse)) {
+ my $plrole=&Apache::lonnet::plaintext($role);
+ $table .= &Apache::loncommon::start_data_table_row().
+' |
+'.$plrole.' |
+'.$area.' Domain: '.$domain.' | '."\n";
+ if ($role ne 'cc') {
+ if (%sections_count) {
+ my $currsec = &course_sections(\%sections_count,$protectedcourse.'_'.$role);
$table .=
- ''.
- ''.$lt{'exs'}.' '.
+ ' | | ';
} else {
$table .= ' | ';
+ 'name="sec_'.$protectedcourse.'_'.$role.'">';
}
} else {
$table .= '  | ';
}
$table .= <
+
$lt{'ssd'} |
-
+"javascript:pjump('date_start','Start Date $plrole',document.cu.start_$protectedcourse\_$role.value,'start_$protectedcourse\_$role','cu.pres','dateset')">$lt{'ssd'} |
+
$lt{'sed'} |
+"javascript:pjump('date_end','End Date $plrole',document.cu.end_$protectedcourse\_$role.value,'end_$protectedcourse\_$role','cu.pres','dateset')">$lt{'sed'}
ENDTIMEENTRY
- $table.= " \n";
+ $table.= &Apache::loncommon::end_data_table_row();
}
}
- foreach (sort keys %customroles) {
+ foreach my $cust (sort keys %customroles) {
if (&Apache::lonnet::allowed('ccr',$thiscourse)) {
- my $plrole=$_;
+ my $plrole=$cust;
my $customrole=$protectedcourse.'_cr_cr_'.$env{'user.domain'}.
'_'.$env{'user.name'}.'_'.$plrole;
- $table .= <
- |
-$plrole |
-$area |
-END
- if ($num_sections > 0) {
- my $currsec = &course_sections($num_sections,\%sections_count,$customrole);
+ $table .= &Apache::loncommon::start_data_table_row().
+' |
+'.$plrole.' |
+'.$area.' | '."\n";
+ if (%sections_count) {
+ my $currsec = &course_sections(\%sections_count,$customrole);
$table.=
''.
''.$lt{'exs'}.' '.
@@ -1699,28 +1833,33 @@ END
"javascript:pjump('date_start','Start Date $plrole',document.cu.start_$customrole.value,'start_$customrole','cu.pres','dateset')">$lt{'ssd'} |
$lt{'sed'} |
+"javascript:pjump('date_end','End Date $plrole',document.cu.end_$customrole.value,'end_$customrole','cu.pres','dateset')">$lt{'sed'}
ENDENTRY
+ $table .= &Apache::loncommon::end_data_table_row();
}
}
}
return '' if ($table eq ''); # return nothing if there is nothing
# in the table
- my $result = <$lt{'crl'}
-$lt{'act'} | $lt{'rol'} | $lt{'ext'} |
-$lt{'grs'} | $lt{'sta'} | $lt{'end'} |
-$table
-
-ENDTABLE
+ my $result = '
+'.$lt{'crl'}.''.
+&Apache::loncommon::start_data_table().
+&Apache::loncommon::start_data_table_header_row().
+''.$lt{'act'}.' | '.$lt{'rol'}.' | '.$lt{'ext'}.' |
+'.$lt{'grs'}.' | '.$lt{'sta'}.' | '.$lt{'end'}.' | '.
+&Apache::loncommon::end_data_table_header_row().
+&Apache::loncommon::start_data_table_row().
+$table.
+&Apache::loncommon::end_data_table_row().
+&Apache::loncommon::end_data_table();
return $result;
}
sub course_sections {
- my ($num_sections,$sections_count,$role) = @_;
+ my ($sections_count,$role) = @_;
my $output = '';
my @sections = (sort {$a <=> $b} keys %{$sections_count});
- if ($num_sections == 1) {
+ if (scalar(@sections) == 1) {
$output = ' \n";
+ $otheritems .= &Apache::loncommon::end_data_table_row().
+ &Apache::loncommon::end_data_table()."\n";
return $cb_jscript.$header.$hiddenitems.$otheritems;
}
| |