version 1.398, 2006/06/26 22:06:19
|
version 1.408, 2006/06/29 18:43:33
|
Line 707 sub helpLatexCheatsheet {
|
Line 707 sub helpLatexCheatsheet {
|
} |
} |
|
|
sub help_open_menu { |
sub help_open_menu { |
my ($color,$topic,$component_help,$function,$faq,$bug,$stayOnPage,$width,$height,$text) = @_; |
my ($topic,$component_help,$faq,$bug,$stayOnPage,$width,$height,$text) = @_; |
$text = "" if (not defined $text); |
$text = "" if (not defined $text); |
$stayOnPage = 0 if (not defined $stayOnPage); |
$stayOnPage = 0 if (not defined $stayOnPage); |
if ($env{'browser.interface'} eq 'textual' || |
if ($env{'browser.interface'} eq 'textual' || |
Line 721 sub help_open_menu {
|
Line 721 sub help_open_menu {
|
my $origurl = $ENV{'REQUEST_URI'}; |
my $origurl = $ENV{'REQUEST_URI'}; |
$origurl=~s|^/~|/priv/|; |
$origurl=~s|^/~|/priv/|; |
my $timestamp = time; |
my $timestamp = time; |
foreach my $datum (\$color,\$function,\$topic,\$component_help,\$faq, |
foreach my $datum (\$topic,\$component_help,\$faq,\$bug,\$origurl) { |
\$bug,\$origurl) { |
|
$$datum = &escape($$datum); |
$$datum = &escape($$datum); |
} |
} |
if (!$stayOnPage) { |
if (!$stayOnPage) { |
Line 730 sub help_open_menu {
|
Line 729 sub help_open_menu {
|
} else { |
} else { |
$link = "javascript:helpMenu('display')"; |
$link = "javascript:helpMenu('display')"; |
} |
} |
my $banner_link = "/adm/helpmenu?page=banner&function=$function&topic=$topic&component_help=$component_help&faq=$faq&bug=$bug&origurl=$origurl&stamp=$timestamp&stayonpage=$stayOnPage"; |
my $banner_link = "/adm/helpmenu?page=banner&topic=$topic&component_help=$component_help&faq=$faq&bug=$bug&origurl=$origurl&stamp=$timestamp&stayonpage=$stayOnPage"; |
my $details_link = "/adm/helpmenu?page=body&function=$function&topic=$topic&component_help=$component_help&faq=$faq&bug=$bug&origurl=$origurl&stamp=$timestamp"; |
my $details_link = "/adm/helpmenu?page=body&topic=$topic&component_help=$component_help&faq=$faq&bug=$bug&origurl=$origurl&stamp=$timestamp"; |
my $template; |
my $template; |
if ($text ne "") { |
if ($text ne "") { |
$template .= |
$template .= |
Line 2726 Returns: value of designparamter $which
|
Line 2725 Returns: value of designparamter $which
|
=cut |
=cut |
|
|
|
|
sub designparm { |
|
my ($which,$domain)=@_; |
|
my $result = &designparm_real(@_); |
|
&Apache::lonnet::logthis(" $which $domain reulted in $result"); |
|
return $result; |
|
} |
|
|
|
|
|
############################################## |
############################################## |
sub designparm_real { |
sub designparm { |
my ($which,$domain)=@_; |
my ($which,$domain)=@_; |
if ($env{'browser.blackwhite'} eq 'on') { |
if ($env{'browser.blackwhite'} eq 'on') { |
if ($which=~/\.(font|alink|vlink|link)$/) { |
if ($which=~/\.(font|alink|vlink|link)$/) { |
Line 2805 Inputs:
|
Line 2796 Inputs:
|
=item * $no_inline_link, if true and in remote mode, don't show the |
=item * $no_inline_link, if true and in remote mode, don't show the |
'Switch To Inline Menu' link |
'Switch To Inline Menu' link |
|
|
|
|
=back |
=back |
|
|
Returns: A uniform header for LON-CAPA web pages. |
Returns: A uniform header for LON-CAPA web pages. |
Line 2935 ENDROLE
|
Line 2925 ENDROLE
|
$lastitem = $thisdisfn; |
$lastitem = $thisdisfn; |
} |
} |
$titleinfo = |
$titleinfo = |
&Apache::loncommon::help_open_menu('','','','',3,'Authoring'). |
&Apache::loncommon::help_open_menu('','',3,'Authoring'). |
'<b>Construction Space</b>: '. |
'<b>Construction Space</b>: '. |
'<form name="dirs" method="post" action="'.$formaction |
'<form name="dirs" method="post" action="'.$formaction |
.'" target="_top"><tt><b>' |
.'" target="_top"><tt><b>' |
Line 3156 table#LC_top_nav, table#LC_menubuttons {
|
Line 3146 table#LC_top_nav, table#LC_menubuttons {
|
width: 100%; |
width: 100%; |
background: $pgbg; |
background: $pgbg; |
border: 2px; |
border: 2px; |
border-collapse: seperate; |
border-collapse: separate; |
|
padding: 0px; |
} |
} |
|
|
table#LC_title_bar, table#LC_breadcrumbs, table#LC_nav_location, |
table#LC_title_bar, table#LC_breadcrumbs, table#LC_nav_location, |
Line 3169 table#LC_title_bar.LC_with_remote {
|
Line 3160 table#LC_title_bar.LC_with_remote {
|
background: $pgbg; |
background: $pgbg; |
font-family: $sans; |
font-family: $sans; |
border-collapse: collapse; |
border-collapse: collapse; |
|
padding: 0px; |
} |
} |
|
|
table#LC_title_bar td { |
table#LC_title_bar td { |
Line 3208 table#LC_menubuttons img, table#LC_menub
|
Line 3200 table#LC_menubuttons img, table#LC_menub
|
table#LC_top_nav td { |
table#LC_top_nav td { |
background: $tabbg; |
background: $tabbg; |
border: 0px; |
border: 0px; |
|
font-size: small; |
} |
} |
table#LC_top_nav td a, div#LC_top_nav a { |
table#LC_top_nav td a, div#LC_top_nav a { |
color: $font; |
color: $font; |
Line 3216 table#LC_top_nav td a, div#LC_top_nav a
|
Line 3209 table#LC_top_nav td a, div#LC_top_nav a
|
table#LC_top_nav td.LC_top_nav_logo { |
table#LC_top_nav td.LC_top_nav_logo { |
background: $tabbg; |
background: $tabbg; |
text-align: right; |
text-align: right; |
|
white-space: nowrap; |
|
font-weight: bold; |
|
} |
|
table#LC_top_nav td.LC_top_nav_logo img { |
|
margin-left: 0.2em; |
|
vertical-align: bottom; |
} |
} |
table#LC_breadcrumbs td { |
table#LC_breadcrumbs td { |
background: $tabbg; |
background: $tabbg; |
Line 3258 td.LC_menubuttons_img {
|
Line 3257 td.LC_menubuttons_img {
|
|
|
table.LC_data_table, table.LC_mail_list { |
table.LC_data_table, table.LC_mail_list { |
border: 1px solid #000000; |
border: 1px solid #000000; |
border-collapse: seperate; |
border-collapse: separate; |
} |
} |
table.LC_data_table tr th, table.LC_calendar tr th, table.LC_mail_list tr th { |
table.LC_data_table tr th, table.LC_calendar tr th, table.LC_mail_list tr th { |
font-weight: bold; |
font-weight: bold; |
Line 3442 table#LC_helpmenu_links {
|
Line 3441 table#LC_helpmenu_links {
|
table#LC_helpmenu_links tr td { |
table#LC_helpmenu_links tr td { |
padding: 1px; |
padding: 1px; |
background: $tabbg; |
background: $tabbg; |
|
text-align: center; |
|
font-weight: bold; |
} |
} |
|
|
table#LC_helpmenu_links a:link, table#LC_helpmenu_links a:visited, |
table#LC_helpmenu_links a:link, table#LC_helpmenu_links a:visited, |
Line 3611 Returns a uniform complete <head>..</hea
|
Line 3612 Returns a uniform complete <head>..</hea
|
|
|
Inputs: $title - optional title for the page |
Inputs: $title - optional title for the page |
$head_extra - optional extra HTML to put inside the <head> |
$head_extra - optional extra HTML to put inside the <head> |
|
|
=back |
=back |
|
|
=cut |
=cut |
Line 3724 Inputs: $args - additional optio
|
Line 3726 Inputs: $args - additional optio
|
a html attribute |
a html attribute |
frameset -> if true will start with a <frameset> |
frameset -> if true will start with a <frameset> |
rather than <body> |
rather than <body> |
=back |
|
|
|
=cut |
=cut |
|
|
Line 3849 sub simple_error_page {
|
Line 3850 sub simple_error_page {
|
|
|
=pod |
=pod |
|
|
=over 4 |
=item * &get_users_function() |
|
|
=item get_users_function |
|
|
|
Used by &bodytag to determine the current users primary role. |
Used by &bodytag to determine the current users primary role. |
Returns either 'student','coordinator','admin', or 'author'. |
Returns either 'student','coordinator','admin', or 'author'. |
Line 3878 sub get_users_function {
|
Line 3877 sub get_users_function {
|
|
|
=pod |
=pod |
|
|
=item check_user_status |
=item * &check_user_status |
|
|
Determines current status of supplied role for a |
Determines current status of supplied role for a |
specific user. Roles can be active, previous or future. |
specific user. Roles can be active, previous or future. |
Line 3932 sub check_user_status {
|
Line 3931 sub check_user_status {
|
|
|
=pod |
=pod |
|
|
=item get_sections |
=item * &get_sections() |
|
|
Determines all the sections for a course including |
Determines all the sections for a course including |
sections with students and sections containing other roles. |
sections with students and sections containing other roles. |
Line 3993 sub get_sections {
|
Line 3992 sub get_sections {
|
############################################### |
############################################### |
|
|
=pod |
=pod |
|
|
=item get_course_users |
=item * &get_course_users() |
|
|
Retrieves usernames:domains for users in the specified course |
Retrieves usernames:domains for users in the specified course |
with specific role(s), and access status. |
with specific role(s), and access status. |
|
|
Line 4018 Entries for end, start, section and stat
|
Line 4017 Entries for end, start, section and stat
|
of the possibility of multiple values for non-student roles. |
of the possibility of multiple values for non-student roles. |
|
|
=cut |
=cut |
|
|
############################################### |
############################################### |
|
|
sub get_course_users { |
sub get_course_users { |
my ($cdom,$cnum,$types,$roles,$sections,$users,$userdata) = @_; |
my ($cdom,$cnum,$types,$roles,$sections,$users,$userdata) = @_; |
my %idx = (); |
my %idx = (); |
Line 5180 sub course_type {
|
Line 5179 sub course_type {
|
if (!defined($cid)) { |
if (!defined($cid)) { |
$cid = $env{'request.course.id'}; |
$cid = $env{'request.course.id'}; |
} |
} |
if (defined($env{'course.'.$cid.'type'})) { |
if (defined($env{'course.'.$cid.'.type'})) { |
return $env{'course.'.$cid.'type'}; |
return $env{'course.'.$cid.'.type'}; |
} else { |
} else { |
return 'Course'; |
return 'Course'; |
} |
} |
} |
} |
|
|
|
sub group_term { |
|
my $crstype = &course_type(); |
|
my %names = ( |
|
'Course' => 'group', |
|
'Group' => 'team', |
|
); |
|
return $names{$crstype}; |
|
} |
|
|
sub icon { |
sub icon { |
my ($file)=@_; |
my ($file)=@_; |
my $curfext = (split(/\./,$file))[-1]; |
my $curfext = (split(/\./,$file))[-1]; |