version 1.365, 2006/05/09 14:38:09
|
version 1.368, 2006/05/10 21:50:39
|
Line 2945 ENDROLE
|
Line 2945 ENDROLE
|
return(<<ENDBODY); |
return(<<ENDBODY); |
$bodytag |
$bodytag |
<table id="LC_title_bar" class="LC_with_remote"> |
<table id="LC_title_bar" class="LC_with_remote"> |
<tr><td>$upperleft</td> |
<tr><td class="LC_title_bar_role_logo">$upperleft</td> |
<td class="LC_title_bar_domain_logo">$messages </td> |
<td class="LC_title_bar_domain_logo">$messages </td> |
</tr> |
</tr> |
<tr><td>$titleinfo $dc_info $menu</td> |
<tr><td>$titleinfo $dc_info $menu</td> |
$roleinfo |
$roleinfo |
|
</tr> |
</table> |
</table> |
ENDBODY |
ENDBODY |
} |
} |
Line 3117 table#LC_title_bar {
|
Line 3118 table#LC_title_bar {
|
width: 100%; |
width: 100%; |
border: 0; |
border: 0; |
border-spacing: 0px 1px; |
border-spacing: 0px 1px; |
|
padding: 0px 2px 0px 2px; |
background: $pgbg; |
background: $pgbg; |
font-family: $sans; |
font-family: $sans; |
border-collapse: collapse; |
border-collapse: collapse; |
Line 3145 span.LC_title_bar_title {
|
Line 3147 span.LC_title_bar_title {
|
table#LC_title_bar td.LC_title_bar_domain_logo { |
table#LC_title_bar td.LC_title_bar_domain_logo { |
background: $sidebg; |
background: $sidebg; |
text-align: right; |
text-align: right; |
|
padding: 0px; |
|
} |
|
table#LC_title_bar td.LC_title_bar_role_logo { |
|
background: $sidebg; |
|
padding: 0px; |
} |
} |
|
|
table#LC_menubuttons_mainmenu { |
table#LC_menubuttons_mainmenu { |
Line 3646 sub simple_error_page {
|
Line 3653 sub simple_error_page {
|
sub end_data_table_row { |
sub end_data_table_row { |
return '</tr>'; |
return '</tr>'; |
} |
} |
|
|
|
sub start_data_table_header_row { |
|
return '<tr class="LC_header_row">'; |
|
} |
|
|
|
sub end_data_table_header_row { |
|
return '</tr>'; |
|
} |
} |
} |
|
|
############################################### |
############################################### |
Line 3751 Returns number of sections.
|
Line 3766 Returns number of sections.
|
|
|
############################################### |
############################################### |
sub get_sections { |
sub get_sections { |
my ($cdom,$cnum,$sectioncount,$possible_roles) = @_; |
my ($cdom,$cnum,$possible_roles) = @_; |
if (!($cdom && $cnum)) { return 0; } |
if (!defined($cdom) || !defined($cnum)) { |
my $numsections = 0; |
my $cid = $env{'request.course.id'}; |
|
|
|
return if (!defined($cid)); |
|
|
|
$cdom = $env{'course.'.$cid.'.domain'}; |
|
$cnum = $env{'course.'.$cid.'.num'}; |
|
} |
|
|
|
my %sectioncount; |
|
|
if (!defined($possible_roles) || (grep/^st$/,@$possible_roles)) { |
if (!defined($possible_roles) || (grep(/^st$/,@$possible_roles))) { |
my ($classlist) = &Apache::loncoursedata::get_classlist($cdom,$cnum); |
my ($classlist) = &Apache::loncoursedata::get_classlist($cdom,$cnum); |
my $sec_index = &Apache::loncoursedata::CL_SECTION(); |
my $sec_index = &Apache::loncoursedata::CL_SECTION(); |
my $status_index = &Apache::loncoursedata::CL_STATUS(); |
my $status_index = &Apache::loncoursedata::CL_STATUS(); |
while (my ($student,$data) = each %$classlist) { |
while (my ($student,$data) = each(%$classlist)) { |
my ($section,$status) = ($data->[$sec_index], |
my ($section,$status) = ($data->[$sec_index], |
$data->[$status_index]); |
$data->[$status_index]); |
unless ($section eq '-1' || $section =~ /^\s*$/) { |
unless ($section eq '-1' || $section =~ /^\s*$/) { |
if (!defined($$sectioncount{$section})) { $numsections++; } |
$sectioncount{$section}++; |
$$sectioncount{$section}++; |
|
} |
} |
} |
} |
} |
} |
Line 3780 sub get_sections {
|
Line 3802 sub get_sections {
|
} |
} |
if ($user =~ /^$role:[^:]*:[^:]*:(\w+)/) { $section=$1; } |
if ($user =~ /^$role:[^:]*:[^:]*:(\w+)/) { $section=$1; } |
if (!defined($section) || $section eq '-1') { next; } |
if (!defined($section) || $section eq '-1') { next; } |
if (!defined($$sectioncount{$section})) { $numsections++; } |
$sectioncount{$section}++; |
$$sectioncount{$section}++; |
|
} |
} |
return $numsections; |
return %sectioncount; |
} |
} |
|
|
############################################### |
############################################### |