version 1.361, 2006/05/01 21:03:35
|
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 3089 sub standard_css {
|
Line 3090 sub standard_css {
|
my $mail_other_hover = '#669999'; |
my $mail_other_hover = '#669999'; |
|
|
return <<END; |
return <<END; |
<style type="text/css"> |
|
h1, h2, h3, th { font-family: $sans } |
h1, h2, h3, th { font-family: $sans } |
a:focus { color: red; background: yellow } |
a:focus { color: red; background: yellow } |
table.thinborder { border-collapse: collapse; } |
table.thinborder { border-collapse: collapse; } |
Line 3109 table#LC_top_nav, table#LC_menubuttons,
|
Line 3109 table#LC_top_nav, table#LC_menubuttons,
|
width: 100%; |
width: 100%; |
background: $pgbg; |
background: $pgbg; |
border: 0px; |
border: 0px; |
border-spacing: 1px; |
border-spacing: 2px 1px; |
padding: 0px; |
padding: 0px; |
margin: 0px; |
margin: 0px; |
border-collapse: separate; |
border-collapse: separate; |
Line 3117 table#LC_top_nav, table#LC_menubuttons,
|
Line 3117 table#LC_top_nav, table#LC_menubuttons,
|
table#LC_title_bar { |
table#LC_title_bar { |
width: 100%; |
width: 100%; |
border: 0; |
border: 0; |
border-spacing: 3px; |
border-spacing: 0px 1px; |
|
padding: 0px 2px 0px 2px; |
background: $pgbg; |
background: $pgbg; |
font-family: $sans; |
font-family: $sans; |
|
border-collapse: collapse; |
} |
} |
table#LC_title_bar.LC_with_remote { |
table#LC_title_bar.LC_with_remote { |
width: 100%; |
width: 100%; |
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 3165 table#LC_top_nav td a, div#LC_top_nav a
|
Line 3172 table#LC_top_nav td a, div#LC_top_nav a
|
color: $font; |
color: $font; |
font-family: $sans; |
font-family: $sans; |
} |
} |
|
table#LC_top_nav td.LC_top_nav_logo { |
|
background: $tabbg; |
|
text-align: right; |
|
} |
table#LC_breadcrumbs td { |
table#LC_breadcrumbs td { |
background: $tabbg; |
background: $tabbg; |
color: $font; |
color: $font; |
Line 3260 table.LC_mail_list tr.LC_mail_other {
|
Line 3271 table.LC_mail_list tr.LC_mail_other {
|
table.LC_mail_list tr.LC_mail_other:hover { |
table.LC_mail_list tr.LC_mail_other:hover { |
background-color: $mail_other_hover; |
background-color: $mail_other_hover; |
} |
} |
</style> |
|
END |
END |
} |
} |
|
|
Line 3294 Inputs: $title - optional title for the
|
Line 3304 Inputs: $title - optional title for the
|
sub headtag { |
sub headtag { |
my ($title,$head_extra,$args) = @_; |
my ($title,$head_extra,$args) = @_; |
|
|
|
my $function = $args->{'function'} || &get_users_function(); |
|
my $domain = $args->{'domain'} || &determinedomain(); |
|
my $bgcolor = $args->{'bgcolor'} || &designparm($function.'.pgbg',$domain); |
|
my $url = join(':',$env{'user.name'},$env{'user.domain'}, |
|
$env{'environment.color.timestamp'}, |
|
$function,$domain,$bgcolor); |
|
|
|
$url = '/adm/css/'.&Apache::lonnet::escape($url).'.css'; |
|
|
my $result = |
my $result = |
'<head>'. |
'<head>'. |
&standard_css($args->{'function'},$args->{'domain'}, |
'<link rel="stylesheet" type="text/css" href="'.$url.'" />'. |
$args->{'bgcolor'}). |
|
&font_settings(). |
&font_settings(). |
&Apache::lonhtmlcommon::htmlareaheaders(); |
&Apache::lonhtmlcommon::htmlareaheaders(); |
|
|
Line 3635 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 3740 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'}; |
|
} |
|
|
if (!defined($possible_roles) || (grep/^st$/,@$possible_roles)) { |
my %sectioncount; |
|
|
|
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 3769 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; |
} |
} |
|
|
############################################### |
############################################### |
Line 3809 can be sent to &get_group_settings() to
|
Line 3841 can be sent to &get_group_settings() to
|
############################################### |
############################################### |
|
|
sub coursegroups { |
sub coursegroups { |
my ($curr_groups,$cdom,$cnum,$group) = @_; |
my ($cdom,$cnum,$group) = @_; |
my $numgroups; |
|
if (!defined($cdom) || !defined($cnum)) { |
if (!defined($cdom) || !defined($cnum)) { |
my $cid = $env{'request.course.id'}; |
my $cid = $env{'request.course.id'}; |
|
|
|
return if (!defined($cid)); |
|
|
$cdom = $env{'course.'.$cid.'.domain'}; |
$cdom = $env{'course.'.$cid.'.domain'}; |
$cnum = $env{'course.'.$cid.'.num'}; |
$cnum = $env{'course.'.$cid.'.num'}; |
} |
} |
%{$curr_groups} = &Apache::lonnet::get_coursegroups($cdom,$cnum,$group); |
my %curr_groups = &Apache::lonnet::get_coursegroups($cdom,$cnum,$group); |
my ($tmp) = keys(%{$curr_groups}); |
my ($tmp) = keys(%curr_groups); |
if ($tmp=~/^error:/) { |
if ($tmp=~/^(con_lost|no_such_host|error: [^2] )/) { |
unless ($tmp eq 'error: 2 tie(GDBM) Failed while attempting dump') { |
undef(%curr_groups); |
&logthis('Error retrieving groups: '.$tmp.' in '.$cnum.':'. |
&logthis('Error retrieving groups: '.$tmp.' in '.$cnum.':'.$cdom); |
$cdom); |
} elsif ($tmp=~/^error: 2 /) { |
} |
undef(%curr_groups); |
$numgroups = 0; |
|
} else { |
|
$numgroups = keys(%{$curr_groups}); |
|
} |
} |
return $numgroups; |
return %curr_groups; |
} |
} |
|
|
############################################### |
############################################### |