version 1.806, 2009/05/07 16:25:02
|
version 1.832, 2009/05/28 16:54:29
|
Line 407 sub studentbrowser_javascript {
|
Line 407 sub studentbrowser_javascript {
|
) { return ''; } |
) { return ''; } |
return (<<'ENDSTDBRW'); |
return (<<'ENDSTDBRW'); |
<script type="text/javascript" language="Javascript"> |
<script type="text/javascript" language="Javascript"> |
|
// <![CDATA[ |
var stdeditbrowser; |
var stdeditbrowser; |
function openstdbrowser(formname,uname,udom,roleflag,ignorefilter,courseadvonly) { |
function openstdbrowser(formname,uname,udom,roleflag,ignorefilter,courseadvonly) { |
var url = '/adm/pickstudent?'; |
var url = '/adm/pickstudent?'; |
Line 429 sub studentbrowser_javascript {
|
Line 430 sub studentbrowser_javascript {
|
stdeditbrowser = open(url,title,options,'1'); |
stdeditbrowser = open(url,title,options,'1'); |
stdeditbrowser.focus(); |
stdeditbrowser.focus(); |
} |
} |
|
// ]]> |
</script> |
</script> |
ENDSTDBRW |
ENDSTDBRW |
} |
} |
Line 461 sub selectstudent_link {
|
Line 463 sub selectstudent_link {
|
sub authorbrowser_javascript { |
sub authorbrowser_javascript { |
return <<"ENDAUTHORBRW"; |
return <<"ENDAUTHORBRW"; |
<script type="text/javascript" language="JavaScript"> |
<script type="text/javascript" language="JavaScript"> |
|
// <![CDATA[ |
var stdeditbrowser; |
var stdeditbrowser; |
|
|
function openauthorbrowser(formname,udom) { |
function openauthorbrowser(formname,udom) { |
Line 473 function openauthorbrowser(formname,udom
|
Line 476 function openauthorbrowser(formname,udom
|
stdeditbrowser.focus(); |
stdeditbrowser.focus(); |
} |
} |
|
|
|
// ]]> |
</script> |
</script> |
ENDAUTHORBRW |
ENDAUTHORBRW |
} |
} |
Line 482 sub coursebrowser_javascript {
|
Line 486 sub coursebrowser_javascript {
|
my $crs_or_grp_alert = &mt('Please select the type of LON-CAPA entity - Course or Group - for which you wish to add/modify a user role'); |
my $crs_or_grp_alert = &mt('Please select the type of LON-CAPA entity - Course or Group - for which you wish to add/modify a user role'); |
my $output = ' |
my $output = ' |
<script type="text/javascript" language="JavaScript"> |
<script type="text/javascript" language="JavaScript"> |
|
// <![CDATA[ |
var stdeditbrowser;'."\n"; |
var stdeditbrowser;'."\n"; |
$output .= <<"ENDSTDBRW"; |
$output .= <<"ENDSTDBRW"; |
function opencrsbrowser(formname,uname,udom,desc,extra_element,multflag,crstype) { |
function opencrsbrowser(formname,uname,udom,desc,extra_element,multflag,crstype) { |
Line 568 ENDSTDBRW
|
Line 573 ENDSTDBRW
|
$output .= &setsec_javascript($sec_element,$formname); |
$output .= &setsec_javascript($sec_element,$formname); |
} |
} |
$output .= ' |
$output .= ' |
|
// ]]> |
</script>'; |
</script>'; |
return $output; |
return $output; |
} |
} |
Line 829 sub linked_select_forms {
|
Line 835 sub linked_select_forms {
|
# output the javascript to do the changing |
# output the javascript to do the changing |
my $result = ''; |
my $result = ''; |
$result.='<script type="text/javascript" language="JavaScript">'."\n"; |
$result.='<script type="text/javascript" language="JavaScript">'."\n"; |
|
$result.="// <![CDATA[\n"; |
$result.="var select2data = new Object();\n"; |
$result.="var select2data = new Object();\n"; |
$" = '","'; |
$" = '","'; |
my $debug = ''; |
my $debug = ''; |
Line 874 function select1_changed() {
|
Line 881 function select1_changed() {
|
} |
} |
} |
} |
} |
} |
|
// ]]> |
</script> |
</script> |
END |
END |
# output the initial values for the selection lists |
# output the initial values for the selection lists |
Line 1027 sub update_help_link {
|
Line 1035 sub update_help_link {
|
my $banner_link = "/adm/helpmenu?page=banner&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 $output .= <<"ENDOUTPUT"; |
my $output .= <<"ENDOUTPUT"; |
<script type="text/javascript"> |
<script type="text/javascript"> |
|
// <![CDATA[ |
banner_link = '$banner_link'; |
banner_link = '$banner_link'; |
|
// ]]> |
</script> |
</script> |
ENDOUTPUT |
ENDOUTPUT |
return $output; |
return $output; |
Line 1394 sub resize_textarea_js {
|
Line 1404 sub resize_textarea_js {
|
my $geometry = &viewport_geometry_js(); |
my $geometry = &viewport_geometry_js(); |
return <<"RESIZE"; |
return <<"RESIZE"; |
<script type="text/javascript"> |
<script type="text/javascript"> |
|
// <![CDATA[ |
$geometry |
$geometry |
|
|
function getX(element) { |
function getX(element) { |
Line 1432 function resize_textarea(textarea_id,bot
|
Line 1443 function resize_textarea(textarea_id,bot
|
} |
} |
textarea.style.height=new_height+'px'; |
textarea.style.height=new_height+'px'; |
} |
} |
|
// ]]> |
</script> |
</script> |
RESIZE |
RESIZE |
|
|
Line 2299 sub authform_internal{
|
Line 2311 sub authform_internal{
|
$result = &mt |
$result = &mt |
('[_1] Internally authenticated (with initial password [_2])', |
('[_1] Internally authenticated (with initial password [_2])', |
'<label>'.$authtype,'</label>'.$autharg); |
'<label>'.$authtype,'</label>'.$autharg); |
$result.="<label><input type=\"checkbox\" name=\"visible\" onClick='if (this.checked) { this.form.intarg.type=\"text\" } else { this.form.intarg.type=\"password\" }' />".&mt('Visible input').'</label>'; |
$result.="<label><input type=\"checkbox\" name=\"visible\" onclick='if (this.checked) { this.form.intarg.type=\"text\" } else { this.form.intarg.type=\"password\" }' />".&mt('Visible input').'</label>'; |
return $result; |
return $result; |
} |
} |
|
|
Line 4144 Returns: value of designparamter $which
|
Line 4156 Returns: value of designparamter $which
|
############################################## |
############################################## |
sub designparm { |
sub designparm { |
my ($which,$domain)=@_; |
my ($which,$domain)=@_; |
if ($env{'browser.blackwhite'} eq 'on') { |
|
if ($which=~/\.(font|alink|vlink|link|textcol)$/) { |
|
return '#000000'; |
|
} |
|
if ($which=~/\.(pgbg|sidebg|bgcol)$/) { |
|
return '#FFFFFF'; |
|
} |
|
if ($which=~/\.tabbg$/) { |
|
return '#CCCCCC'; |
|
} |
|
} |
|
if (exists($env{'environment.color.'.$which})) { |
if (exists($env{'environment.color.'.$which})) { |
return $env{'environment.color.'.$which}; |
return $env{'environment.color.'.$which}; |
} |
} |
$domain=&determinedomain($domain); |
$domain=&determinedomain($domain); |
my %domdesign = &get_domainconf($domain); |
my %domdesign = &get_domainconf($domain); |
my $output; |
my $output; |
if ($domdesign{$domain.'.'.$which} ne '') { |
if ($domdesign{$domain.'.'.$which} ne '') { |
$output = $domdesign{$domain.'.'.$which}; |
$output = $domdesign{$domain.'.'.$which}; |
} else { |
} else { |
$output = $defaultdesign{$which}; |
$output = $defaultdesign{$which}; |
} |
} |
if (($which =~ /^(student|coordinator|author|admin)\.img$/) || |
if (($which =~ /^(student|coordinator|author|admin)\.img$/) || |
($which =~ /login\.(img|logo|domlogo|login)/)) { |
($which =~ /login\.(img|logo|domlogo|login)/)) { |
if ($output =~ m{^/(adm|res)/}) { |
if ($output =~ m{^/(adm|res)/}) { |
if ($output =~ m{^/res/}) { |
if ($output =~ m{^/res/}) { |
my $local_name = &Apache::lonnet::filelocation('',$output); |
my $local_name = &Apache::lonnet::filelocation('',$output); |
&Apache::lonnet::repcopy($local_name); |
&Apache::lonnet::repcopy($local_name); |
} |
} |
$output = &lonhttpdurl($output); |
$output = &lonhttpdurl($output); |
} |
} |
} |
} |
return $output; |
return $output; |
} |
} |
|
|
|
############################################## |
|
=pod |
|
|
|
=item * &authorspace() |
|
|
|
Inputs: ./. |
|
|
|
Returns: Path to the Construction Space of the current user's |
|
accessed author space |
|
The author space will be that of the current user |
|
when accessing the own author space |
|
and that of the co-author/assistent co-author |
|
when accessing the co-author's/assistent co-author's |
|
space |
|
|
|
=cut |
|
|
|
sub authorspace { |
|
my $caname = ''; |
|
if ($env{'request.role'} =~ /^ca|^aa/) { |
|
(undef,$caname) = |
|
($env{'request.role'}=~/($match_domain)\/($match_username)$/); |
|
} else { |
|
$caname = $env{'user.name'}; |
|
} |
|
return '/priv/'.$caname.'/'; |
|
} |
|
|
|
############################################## |
|
=pod |
|
|
|
=item * &head_subbox() |
|
|
|
Inputs: $content (contains HTML code with page functions, etc.) |
|
|
|
Returns: HTML div with $content |
|
To be included in page header |
|
|
|
=cut |
|
|
|
sub head_subbox { |
|
my ($content)=@_; |
|
my $output = |
|
'<div id="LC_head_subbox2">' #FIXME: solve conflicts with lonhtmlcommon:breadcrumbs LC_head_subbox |
|
.$content |
|
.'</div>' |
|
} |
|
|
|
############################################## |
|
=pod |
|
|
|
=item * &CSTR_pageheader() |
|
|
|
Inputs: ./. |
|
|
|
Returns: HTML div with CSTR path and recent box |
|
To be included on Construction Space pages |
|
|
|
=cut |
|
|
|
sub CSTR_pageheader { |
|
# this is for resources; directories have customtitle, and crumbs |
|
# and select recent are created in lonpubdir.pm |
|
my ($uname,$thisdisfn)= |
|
($env{'request.filename'} =~ m|^/home/([^/]+)/public_html/(.*)|); |
|
my $formaction='/priv/'.$uname.'/'.$thisdisfn; |
|
$formaction=~s/\/+/\//g; |
|
|
|
my $parentpath = ''; |
|
my $lastitem = ''; |
|
if ($thisdisfn =~ m-(.+/)([^/]*)$-) { |
|
$parentpath = $1; |
|
$lastitem = $2; |
|
} else { |
|
$lastitem = $thisdisfn; |
|
} |
|
return |
|
'<div>' |
|
.&Apache::loncommon::help_open_menu('','',3,'Authoring') #FIXME: Broken? Where is it? |
|
.'<b>'.&mt('Construction Space:').'</b> ' |
|
.'<form name="dirs" method="post" action="'.$formaction |
|
.'" target="_top"><tt><b>' #FIXME lonpubdir: target="_parent" |
|
.&Apache::lonhtmlcommon::crumbs($uname.'/'.$parentpath,'_top','/priv','','+1',1)."$lastitem</b></tt><br />" |
|
#FIXME lonpubdir: &Apache::lonhtmlcommon::crumbs($uname.$thisdisfn.'/','_top','/priv','','+1',1)."</b></tt><br />" |
|
.&Apache::lonhtmlcommon::select_recent('construct','recent','this.form.action=this.form.recent.value;this.form.submit()') |
|
.'</form>' |
|
.&Apache::lonmenu::constspaceform() |
|
.'</div>'; |
|
} |
|
|
############################################### |
############################################### |
############################################### |
############################################### |
|
|
Line 4211 Inputs:
|
Line 4302 Inputs:
|
=item * $forcereg, if page should register as content page (relevant for |
=item * $forcereg, if page should register as content page (relevant for |
text interface only) |
text interface only) |
|
|
=item * $customtitle, alternate text to use instead of $title |
=item * $no_nav_bar, if true, keep the 'what is this' info but remove the |
in the title box that appears, this text |
navigational links |
is not auto translated like the $title is |
|
|
|
=item * $notopbar, if true, keep the 'what is this' info but remove the |
|
navigational links |
|
|
|
=item * $bgcolor, used to override the bgcolor on a webpage to a specific value |
=item * $bgcolor, used to override the bgcolor on a webpage to a specific value |
|
|
=item * $notitle, if true keep the nav controls, but remove the title bar |
|
|
|
=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 |
|
|
Line 4241 other decorations will be returned.
|
Line 4326 other decorations will be returned.
|
=cut |
=cut |
|
|
sub bodytag { |
sub bodytag { |
my ($title,$function,$addentries,$bodyonly,$domain,$forcereg,$customtitle, |
my ($title,$function,$addentries,$bodyonly,$domain,$forcereg, |
$notopbar,$bgcolor,$notitle,$no_inline_link,$args)=@_; |
$no_nav_bar,$bgcolor,$no_inline_link,$args)=@_; |
|
|
if (!$args->{'no_auto_mt_title'}) { $title = &mt($title); } |
if (!$args->{'no_auto_mt_title'}) { $title = &mt($title); } |
|
|
Line 4312 $realm
|
Line 4397 $realm
|
ENDROLE |
ENDROLE |
|
|
my $titleinfo = '<h1>'.$title.'</h1>'; |
my $titleinfo = '<h1>'.$title.'</h1>'; |
if ($customtitle) { |
|
$titleinfo = $customtitle; |
|
} |
|
# |
# |
# Extra info if you are the DC |
# Extra info if you are the DC |
my $dc_info = ''; |
my $dc_info = ''; |
Line 4333 ENDROLE
|
Line 4415 ENDROLE
|
$forcereg=1; |
$forcereg=1; |
} |
} |
|
|
if (!$customtitle && $env{'request.state'} eq 'construct') { |
if ($env{'request.state'} eq 'construct') { |
# this is for resources; directories have customtitle, and crumbs |
$titleinfo = &CSTR_pageheader(); #FIXME: Will be removed once all scripts have their own calls |
# and select recent are created in lonpubdir.pm |
} |
my ($uname,$thisdisfn)= |
|
($env{'request.filename'} =~ m|^/home/([^/]+)/public_html/(.*)|); |
my $titletable = '<table id="LC_title_bar">' |
my $formaction='/priv/'.$uname.'/'.$thisdisfn; |
."<tr><td> $titleinfo $dc_info</td>".$roleinfo |
$formaction=~s/\/+/\//g; |
.'</tr></table>'; |
|
|
my $parentpath = ''; |
if ($no_nav_bar) { |
my $lastitem = ''; |
|
if ($thisdisfn =~ m-(.+/)([^/]*)$-) { |
|
$parentpath = $1; |
|
$lastitem = $2; |
|
} else { |
|
$lastitem = $thisdisfn; |
|
} |
|
$titleinfo = |
|
&Apache::loncommon::help_open_menu('','',3,'Authoring') |
|
.'<b>'.&mt('Construction Space').'</b>: ' |
|
.'<form name="dirs" method="post" action="'.$formaction |
|
.'" target="_top"><tt><b>' |
|
.&Apache::lonhtmlcommon::crumbs($uname.'/'.$parentpath,'_top','/priv','','+1',1)."<span class=\"LC_fontsize_big\">$lastitem</span></b></tt><br />" |
|
.&Apache::lonhtmlcommon::select_recent('construct','recent','this.form.action=this.form.recent.value;this.form.submit()') |
|
.'</form>' |
|
.&Apache::lonmenu::constspaceform(); |
|
} |
|
|
|
my $titletable; |
|
if (!$notitle) { |
|
$titletable = |
|
'<table id="LC_title_bar">'. |
|
"<tr><td> $titleinfo $dc_info</td>".$roleinfo. |
|
'</tr></table>'; |
|
} |
|
if ($notopbar) { |
|
$bodytag .= $titletable; |
$bodytag .= $titletable; |
} else { |
} else { |
|
$bodytag .= qq|<div id="LC_nav_bar">$name ($role)<br /> |
|
<em>$realm</em> $dc_info</div>|; |
if ($env{'request.state'} eq 'construct') { |
if ($env{'request.state'} eq 'construct') { |
$bodytag .= &Apache::lonmenu::menubuttons($forcereg,$forcereg, |
$bodytag .= &Apache::lonmenu::menubuttons($forcereg,$forcereg, |
$titletable); |
$titletable); |
Line 4395 ENDROLE
|
Line 4453 ENDROLE
|
my $menu= ($no_inline_link?'' |
my $menu= ($no_inline_link?'' |
:'<br /><a href="/adm/remote?action=collapse">'.&mt('Switch to Inline Menu Mode').'</a>'); |
:'<br /><a href="/adm/remote?action=collapse">'.&mt('Switch to Inline Menu Mode').'</a>'); |
# |
# |
if ($notitle) { |
|
return $bodytag; |
|
} |
|
return(<<ENDBODY); |
return(<<ENDBODY); |
$bodytag |
$bodytag |
<table id="LC_title_bar" class="LC_with_remote"> |
<table id="LC_title_bar" class="LC_with_remote"> |
Line 4450 sub make_attr_string {
|
Line 4505 sub make_attr_string {
|
$attr_ref->{'style'}=$style.'; font-size: x-large;'; |
$attr_ref->{'style'}=$style.'; font-size: x-large;'; |
} |
} |
|
|
if ($env{'browser.blackwhite'} eq 'on') { |
|
delete($attr_ref->{'font'}); |
|
delete($attr_ref->{'link'}); |
|
delete($attr_ref->{'alink'}); |
|
delete($attr_ref->{'vlink'}); |
|
delete($attr_ref->{'bgcolor'}); |
|
delete($attr_ref->{'background'}); |
|
} |
|
|
|
my $attr_string; |
my $attr_string; |
foreach my $attr (keys(%$attr_ref)) { |
foreach my $attr (keys(%$attr_ref)) { |
$attr_string .= " $attr=\"".$attr_ref->{$attr}.'" '; |
$attr_string .= " $attr=\"".$attr_ref->{$attr}.'" '; |
Line 4575 a:focus {
|
Line 4621 a:focus {
|
background: yellow |
background: yellow |
} |
} |
|
|
table.thinborder, |
|
table.thinborder tr th { |
|
border-style: solid; |
|
border-width: 1px; |
|
border-color: $lg_border_color; |
|
background: $tabbg; |
|
} |
|
|
|
table.thinborder tr td { |
|
border-style: solid; |
|
border-width: 1px; |
|
border-color: $lg_border_color; |
|
} |
|
|
|
form, .inline { |
form, .inline { |
display: inline; |
display: inline; |
} |
} |
Line 4646 div.LC_confirm_box .LC_success img {
|
Line 4678 div.LC_confirm_box .LC_success img {
|
vertical-align: middle; |
vertical-align: middle; |
} |
} |
|
|
.LC_unknown { |
|
color: yellow; |
|
} |
|
|
|
.LC_icon { |
.LC_icon { |
border: none; |
border: none; |
vertical-align: middle; |
vertical-align: middle; |
} |
} |
|
|
.LC_indexer_icon { |
|
border: none; |
|
height: 22px; |
|
} |
|
|
|
.LC_docs_spacer { |
.LC_docs_spacer { |
width: 25px; |
width: 25px; |
height: 1px; |
height: 1px; |
Line 4678 div.LC_confirm_box .LC_success img {
|
Line 4701 div.LC_confirm_box .LC_success img {
|
|
|
.LC_disc_action_links_bar { |
.LC_disc_action_links_bar { |
background: $tabbg; |
background: $tabbg; |
font-family: $sans; |
|
border: none; |
border: none; |
margin: 4px; |
margin: 4px; |
} |
} |
Line 4721 table#LC_nav_location {
|
Line 4743 table#LC_nav_location {
|
table#LC_title_bar a { |
table#LC_title_bar a { |
color: $fontmenu; |
color: $fontmenu; |
} |
} |
|
|
|
table#LC_title_bar { |
|
clear: both; |
|
/*display: none;*/ |
|
} |
|
|
table#LC_title_bar, |
table#LC_title_bar, |
table.LC_breadcrumbs, |
table.LC_breadcrumbs, |
Line 4731 table#LC_title_bar.LC_with_remote {
|
Line 4758 table#LC_title_bar.LC_with_remote {
|
border-width: $border; |
border-width: $border; |
background: $pgbg; |
background: $pgbg; |
color: $fontmenu; |
color: $fontmenu; |
font-family: $sans; |
|
border-collapse: collapse; |
border-collapse: collapse; |
padding: 0; |
padding: 0; |
|
margin: 0; |
} |
} |
|
|
table.LC_docs_path { |
table.LC_docs_path { |
width: 100%; |
width: 100%; |
border: 0; |
border: 0; |
background: $pgbg; |
background: $pgbg; |
font-family: $sans; |
|
border-collapse: collapse; |
border-collapse: collapse; |
padding: 0; |
padding: 0; |
} |
} |
Line 4752 table#LC_title_bar td {
|
Line 4778 table#LC_title_bar td {
|
table#LC_title_bar .LC_title_bar_who { |
table#LC_title_bar .LC_title_bar_who { |
background: $tabbg; |
background: $tabbg; |
color: $fontmenu; |
color: $fontmenu; |
font: small $sans; |
font: small; |
text-align: right; |
text-align: right; |
margin: 0; |
margin: 0; |
} |
} |
|
|
table#LC_title_bar .LC_title_bar_name { |
table#LC_title_bar div.LC_title_bar_name { |
margin: 0; |
margin: 0; |
} |
} |
|
|
table#LC_title_bar .LC_title_bar_role { |
table#LC_title_bar div.LC_title_bar_role { |
margin: 0; |
margin: 0; |
} |
} |
|
|
table#LC_title_bar .LC_title_bar_realm { |
table#LC_title_bar div.LC_title_bar_realm { |
margin: 0; |
margin: 0; |
} |
} |
|
|
span.LC_metadata { |
|
font-family: $sans; |
|
} |
|
|
|
table#LC_menubuttons img{ |
table#LC_menubuttons img{ |
border: none; |
border: none; |
} |
} |
Line 4788 table#LC_top_nav td {
|
Line 4810 table#LC_top_nav td {
|
table#LC_top_nav td a, |
table#LC_top_nav td a, |
div#LC_top_nav a { |
div#LC_top_nav a { |
color: $font; |
color: $font; |
font-family: $sans; |
|
} |
} |
|
|
table#LC_top_nav td.LC_top_nav_logo { |
table#LC_top_nav td.LC_top_nav_logo { |
Line 4817 table.LC_breadcrumbs td,
|
Line 4838 table.LC_breadcrumbs td,
|
table.LC_docs_path td { |
table.LC_docs_path td { |
background: $tabbg; |
background: $tabbg; |
color: $fontmenu; |
color: $fontmenu; |
font-family: $sans; |
|
font-size: smaller; |
font-size: smaller; |
} |
} |
|
|
Line 4825 table.LC_breadcrumbs td.LC_breadcrumbs_c
|
Line 4845 table.LC_breadcrumbs td.LC_breadcrumbs_c
|
table.LC_docs_path td.LC_docs_path_component { |
table.LC_docs_path td.LC_docs_path_component { |
background: $tabbg; |
background: $tabbg; |
color: $fontmenu; |
color: $fontmenu; |
font-family: $sans; |
|
font-size: larger; |
font-size: larger; |
text-align: right; |
text-align: right; |
} |
} |
Line 4842 table#LC_mainmenu td.LC_mainmenu_column
|
Line 4861 table#LC_mainmenu td.LC_mainmenu_column
|
font-size: 70%; |
font-size: 70%; |
} |
} |
|
|
|
#LC_head_subbox { |
|
clear:both; |
|
background: $sidebg; |
|
border-bottom: 1px solid $lg_border_color; |
|
height: 32px; |
|
line-height: 32px; |
|
margin: 0; |
|
padding: 0; |
|
} |
|
|
|
#LC_head_subbox2 { /* FIXME: replace by LC_head_subbox once lonhtmlcommon::breadcrumbs has been fixed */ |
|
clear:both; |
|
background: #F8F8F8; /* $sidebg; */ |
|
border-bottom: 1px solid $lg_border_color; |
|
margin: 0 0 10px 0; |
|
padding: 5px; |
|
} |
|
|
.LC_fontsize_medium { |
.LC_fontsize_medium { |
font-size: 85%; |
font-size: 85%; |
} |
} |
Line 4852 table#LC_mainmenu td.LC_mainmenu_column
|
Line 4889 table#LC_mainmenu td.LC_mainmenu_column
|
|
|
.LC_menubuttons_inline_text { |
.LC_menubuttons_inline_text { |
color: $font; |
color: $font; |
font-family: $sans; |
|
font-size: 90%; |
font-size: 90%; |
padding-left:3px; |
padding-left:3px; |
} |
} |
Line 4864 table#LC_mainmenu td.LC_mainmenu_column
|
Line 4900 table#LC_mainmenu td.LC_mainmenu_column
|
.LC_menubuttons_category { |
.LC_menubuttons_category { |
color: $font; |
color: $font; |
background: $pgbg; |
background: $pgbg; |
font-family: $sans; |
|
font-size: larger; |
font-size: larger; |
font-weight: bold; |
font-weight: bold; |
} |
} |
Line 4874 td.LC_menubuttons_text {
|
Line 4909 td.LC_menubuttons_text {
|
} |
} |
|
|
.LC_current_location { |
.LC_current_location { |
font-family: $sans; |
|
background: $tabbg; |
background: $tabbg; |
} |
} |
|
|
.LC_new_mail { |
.LC_new_mail { |
font-family: $sans; |
|
background: $tabbg; |
background: $tabbg; |
font-weight: bold; |
font-weight: bold; |
} |
} |
|
|
.LC_dropadd_labeltext { |
|
font-family: $sans; |
|
text-align: right; |
|
} |
|
|
|
.LC_preferences_labeltext { |
|
font-family: $sans; |
|
text-align: right; |
|
} |
|
|
|
.LC_roleslog_note { |
.LC_roleslog_note { |
font-size: small; |
font-size: small; |
} |
} |
Line 4902 td.LC_menubuttons_text {
|
Line 4925 td.LC_menubuttons_text {
|
font-weight: bold; |
font-weight: bold; |
} |
} |
|
|
table.LC_aboutme_port { |
|
border: none; |
|
border-collapse: collapse; |
|
border-spacing: 0; |
|
} |
|
|
|
table.LC_data_table, |
table.LC_data_table, |
table.LC_mail_list { |
table.LC_mail_list { |
border: 1px solid #000000; |
border: 1px solid #000000; |
Line 4951 table.LC_data_table tr.LC_info_row > td
|
Line 4968 table.LC_data_table tr.LC_info_row > td
|
} |
} |
|
|
table.LC_data_table tr.LC_odd_row > td, |
table.LC_data_table tr.LC_odd_row > td, |
table.LC_pick_box tr > td.LC_odd_row, |
table.LC_pick_box tr > td.LC_odd_row { |
table.LC_aboutme_port tr td { |
|
background-color: $data_table_light; |
background-color: $data_table_light; |
padding: 2px; |
padding: 2px; |
} |
} |
|
|
table.LC_data_table tr.LC_even_row > td, |
table.LC_data_table tr.LC_even_row > td, |
table.LC_pick_box tr > td.LC_even_row, |
table.LC_pick_box tr > td.LC_even_row { |
table.LC_aboutme_port tr.LC_even_row td { |
|
background-color: $data_table_dark; |
background-color: $data_table_dark; |
padding: 2px; |
padding: 2px; |
} |
} |
Line 5157 span.LC_current_location {
|
Line 5172 span.LC_current_location {
|
|
|
span.LC_parm_menu_item { |
span.LC_parm_menu_item { |
font-size: larger; |
font-size: larger; |
font-family: $sans; |
|
} |
} |
|
|
span.LC_parm_scope_all { |
span.LC_parm_scope_all { |
Line 5400 table.LC_notify_front_page td {
|
Line 5414 table.LC_notify_front_page td {
|
} |
} |
|
|
.LC_topic_bar { |
.LC_topic_bar { |
font-family: $sans; |
|
font-weight: bold; |
font-weight: bold; |
width: 100%; |
width: 100%; |
background: $tabbg; |
background: $tabbg; |
Line 5429 table.LC_status_selector td {
|
Line 5442 table.LC_status_selector td {
|
|
|
div.LC_feedback_link { |
div.LC_feedback_link { |
clear: both; |
clear: both; |
background: white; |
background: $sidebg; |
width: 100%; |
width: 100%; |
|
padding-bottom: 10px; |
|
border: 1px $tabbg solid; |
|
} |
|
|
|
div.LC_feedback_link a{ |
|
text-decoration: none; |
} |
} |
|
|
span.LC_feedback_link { |
span.LC_feedback_link { |
background: $feedback_link_bg; |
//background: $feedback_link_bg; |
font-size: larger; |
font-size: larger; |
} |
} |
|
|
span.LC_message_link { |
span.LC_message_link { |
background: $feedback_link_bg; |
//background: $feedback_link_bg; |
font-size: larger; |
font-size: larger; |
position: absolute; |
position: absolute; |
right: 1em; |
right: 1em; |
Line 5457 table.LC_prior_tries td {
|
Line 5476 table.LC_prior_tries td {
|
|
|
.LC_answer_correct { |
.LC_answer_correct { |
background: lightgreen; |
background: lightgreen; |
font-family: $sans; |
|
color: darkgreen; |
color: darkgreen; |
padding: 6px; |
padding: 6px; |
} |
} |
|
|
.LC_answer_charged_try { |
.LC_answer_charged_try { |
background: #FFAAAA; |
background: #FFAAAA; |
font-family: $sans; |
|
color: darkred; |
color: darkred; |
padding: 6px; |
padding: 6px; |
} |
} |
Line 5473 table.LC_prior_tries td {
|
Line 5490 table.LC_prior_tries td {
|
.LC_answer_no_grade, |
.LC_answer_no_grade, |
.LC_answer_late { |
.LC_answer_late { |
background: lightyellow; |
background: lightyellow; |
font-family: $sans; |
|
color: black; |
color: black; |
padding: 6px; |
padding: 6px; |
} |
} |
|
|
.LC_answer_previous { |
.LC_answer_previous { |
background: lightblue; |
background: lightblue; |
font-family: $sans; |
|
color: darkblue; |
color: darkblue; |
padding: 6px; |
padding: 6px; |
} |
} |
|
|
.LC_answer_no_message { |
.LC_answer_no_message { |
background: #FFFFFF; |
background: #FFFFFF; |
font-family: $sans; |
|
color: black; |
color: black; |
padding: 6px; |
padding: 6px; |
} |
} |
|
|
.LC_answer_unknown { |
.LC_answer_unknown { |
background: orange; |
background: orange; |
font-family: $sans; |
|
color: black; |
color: black; |
padding: 6px; |
padding: 6px; |
} |
} |
Line 5732 div.LC_edit_problem_editxml_header div {
|
Line 5745 div.LC_edit_problem_editxml_header div {
|
margin-top: 5px; |
margin-top: 5px; |
} |
} |
|
|
div.LC_edit_problem_header_edit_row { |
|
background: $tabbg; |
|
padding: 3px; |
|
margin-bottom: 5px; |
|
} |
|
|
|
div.LC_edit_problem_header_title { |
div.LC_edit_problem_header_title { |
font-weight: bold; |
font-weight: bold; |
font-size: larger; |
font-size: larger; |
Line 5793 table#LC_mainmenu td.LC_mainmenu_col_fie
|
Line 5800 table#LC_mainmenu td.LC_mainmenu_col_fie
|
.LC_mainmenu_fieldset_category { |
.LC_mainmenu_fieldset_category { |
color: $font; |
color: $font; |
background: $pgbg; |
background: $pgbg; |
font-family: $sans; |
|
font-size: small; |
font-size: small; |
font-weight: bold; |
font-weight: bold; |
} |
} |
Line 5821 ul.LC_TabContent li:hover a {
|
Line 5827 ul.LC_TabContent li:hover a {
|
} |
} |
|
|
h1 { |
h1 { |
padding:5px 10px 5px 20px; |
padding: 0; |
line-height:130%; |
line-height:130%; |
} |
} |
|
|
Line 5874 dl,ul,div,fieldset {
|
Line 5880 dl,ul,div,fieldset {
|
/* overflow: hidden; */ |
/* overflow: hidden; */ |
} |
} |
|
|
|
#LC_nav_bar { |
|
float: left; |
|
margin: 0; |
|
} |
|
|
|
#LC_nav_bar em{ |
|
font-weight: bold; |
|
font-style: normal; |
|
} |
|
|
|
ol.LC_smallMenu { |
|
float: right; |
|
} |
|
|
ol.LC_smallMenu, ol#LC_PathBreadcrumbs { |
ol.LC_smallMenu, ol#LC_PathBreadcrumbs { |
margin: 0; |
margin: 0; |
} |
} |
Line 5894 ol.LC_smallMenu a {
|
Line 5914 ol.LC_smallMenu a {
|
text-decoration: none; |
text-decoration: none; |
} |
} |
|
|
ol#LC_TabMainMenuContent, |
ul#LC_TabMainMenuContent { |
|
clear: both; |
|
color: $fontmenu; |
|
background: $tabbg; |
|
list-style: none; |
|
padding: 0; |
|
margin: 0; |
|
float:left; |
|
width: 100%; |
|
} |
|
|
|
ul#LC_TabMainMenuContent li { |
|
float: left; |
|
font-weight: bold; |
|
line-height: 1.8em; |
|
padding: 0 0.8em; |
|
border-right: 1px solid black; |
|
display: inline; |
|
vertical-align: middle; |
|
} |
|
|
ul.LC_TabContent , |
ul.LC_TabContent , |
ul.LC_TabContentBigger { |
ul.LC_TabContentBigger { |
display:block; |
display:block; |
Line 5903 ul.LC_TabContentBigger {
|
Line 5943 ul.LC_TabContentBigger {
|
padding: 0; |
padding: 0; |
} |
} |
|
|
ol#LC_TabMainMenuContent li, |
|
ul.LC_TabContent li, |
ul.LC_TabContent li, |
ul.LC_TabContentBigger li { |
ul.LC_TabContentBigger li { |
display: inline; |
display: inline; |
Line 5913 ul.LC_TabContentBigger li {
|
Line 5952 ul.LC_TabContentBigger li {
|
white-space:nowrap; |
white-space:nowrap; |
} |
} |
|
|
ol#LC_TabMainMenuContent li { |
ul#LC_TabMainMenuContent li a { |
vertical-align: bottom; |
color: $fontmenu; |
border-bottom: solid 1px RGB(175, 175, 175); |
|
padding: 5px 10px 5px 10px; |
|
margin-right:5px; |
|
margin-bottom:3px; |
|
font-weight: bold; |
|
background: url(/adm/lonIcons/lightGreyBG.png) repeat-x left top; |
|
} |
|
|
|
ol#LC_TabMainMenuContent li a { |
|
color: RGB(47, 47, 47); |
|
text-decoration: none; |
text-decoration: none; |
} |
} |
|
|
Line 5975 ul.LC_TabContentBigger li a {
|
Line 6004 ul.LC_TabContentBigger li a {
|
|
|
ol#LC_MenuBreadcrumbs, |
ol#LC_MenuBreadcrumbs, |
ol#LC_PathBreadcrumbs, |
ol#LC_PathBreadcrumbs, |
ul.LC_CourseBreadcrumbs { |
ul#LC_CourseBreadcrumbs { |
border-top: solid 1px RGB(255, 255, 255); |
|
height: 20px; |
|
line-height: 20px; |
|
vertical-align: bottom; |
|
margin: 0 0 30px 0; |
|
padding-left: 10px; |
padding-left: 10px; |
|
margin: 0; |
list-style-position: inside; |
list-style-position: inside; |
background: url(/adm/lonIcons/lightGreyBG.png) repeat-x left top; |
|
} |
} |
|
|
ol#LC_MenuBreadcrumbs li, |
ol#LC_MenuBreadcrumbs li, |
ol#LC_PathBreadcrumbs li, |
ol#LC_PathBreadcrumbs li, |
ul.LC_CourseBreadcrumbs li { |
ul#LC_CourseBreadcrumbs li { |
/* |
|
background: url(/adm/lonIcons/arrow_white.png) no-repeat left center; |
|
*/ |
|
display: inline; |
display: inline; |
padding: 0 0 0 10px; |
padding: 0 0 0 10px; |
/* vertical-align: bottom; */ |
|
overflow:hidden; |
overflow:hidden; |
} |
} |
|
|
ol#LC_MenuBreadcrumbs li a, ul.LC_CourseBreadcrumbs li a { |
ol#LC_MenuBreadcrumbs li a, |
|
ul#LC_CourseBreadcrumbs li a { |
text-decoration: none; |
text-decoration: none; |
font-size:90%; |
font-size:90%; |
} |
} |
Line 6474 $args - additional optional args support
|
Line 6495 $args - additional optional args support
|
|
|
only_body -> is true will set &bodytag() onlybodytag |
only_body -> is true will set &bodytag() onlybodytag |
arg on |
arg on |
no_nav_bar -> is true will set &bodytag() notopbar arg on |
no_nav_bar -> is true will set &bodytag() no_nav_bar arg on |
add_entries -> additional attributes to add to the <body> |
add_entries -> additional attributes to add to the <body> |
domain -> force to color decorate a page for a |
domain -> force to color decorate a page for a |
specific domain |
specific domain |
Line 6488 $args - additional optional args support
|
Line 6509 $args - additional optional args support
|
a html attribute |
a html attribute |
force_register -> if is true will turn on the &bodytag() |
force_register -> if is true will turn on the &bodytag() |
$forcereg arg |
$forcereg arg |
body_title -> alternate text to use instead of $title |
|
in the title box that appears, this text |
|
is not auto translated like the $title is |
|
frameset -> if true will start with a <frameset> |
frameset -> if true will start with a <frameset> |
rather than <body> |
rather than <body> |
no_title -> if true the title bar won't be shown |
|
skip_phases -> hash ref of |
skip_phases -> hash ref of |
head -> skip the <html><head> generation |
head -> skip the <html><head> generation |
body -> skip all <body> generation |
body -> skip all <body> generation |
Line 6535 sub start_page {
|
Line 6552 sub start_page {
|
my $attr_string = &make_attr_string($args->{'force_register'}, |
my $attr_string = &make_attr_string($args->{'force_register'}, |
$args->{'add_entries'}); |
$args->{'add_entries'}); |
$result .= "\n<frameset $attr_string>\n"; |
$result .= "\n<frameset $attr_string>\n"; |
} else { |
} else { |
$result .= |
$result .= |
&bodytag($title, |
&bodytag($title, |
$args->{'function'}, $args->{'add_entries'}, |
$args->{'function'}, $args->{'add_entries'}, |
$args->{'only_body'}, $args->{'domain'}, |
$args->{'only_body'}, $args->{'domain'}, |
$args->{'force_register'}, $args->{'body_title'}, |
$args->{'force_register'}, $args->{'no_nav_bar'}, |
$args->{'no_nav_bar'}, $args->{'bgcolor'}, |
$args->{'bgcolor'}, $args->{'no_inline_link'}, |
$args->{'no_title'}, $args->{'no_inline_link'}, |
$args); |
$args); |
} |
} |
|
} |
} |
|
|
if ($args->{'js_ready'}) { |
if ($args->{'js_ready'}) { |
Line 6554 sub start_page {
|
Line 6570 sub start_page {
|
$result = &html_encode($result); |
$result = &html_encode($result); |
} |
} |
|
|
#Breadcrumbs |
# Preparation for new and consistent functionlist at top of screen |
|
# if ($args->{'functionlist'}) { |
|
# $result .= &build_functionlist(); |
|
#} |
|
|
|
# Don't add anything more if only_body wanted |
|
return $result if $args->{'only_body'}; |
|
|
|
#Breadcrumbs |
if (exists($args->{'bread_crumbs'}) or exists($args->{'bread_crumbs_component'})) { |
if (exists($args->{'bread_crumbs'}) or exists($args->{'bread_crumbs_component'})) { |
&Apache::lonhtmlcommon::clear_breadcrumbs(); |
&Apache::lonhtmlcommon::clear_breadcrumbs(); |
#if any br links exists, add them to the breadcrumbs |
#if any br links exists, add them to the breadcrumbs |
Line 6798 Returns either 'student','coordinator','
|
Line 6822 Returns either 'student','coordinator','
|
|
|
############################################### |
############################################### |
sub get_users_function { |
sub get_users_function { |
my $function = 'student'; |
my $function = 'norole'; |
|
if ($env{'request.role'}=~/^(st)/) { |
|
$function='student'; |
|
} |
if ($env{'request.role'}=~/^(cc|in|ta|ep)/) { |
if ($env{'request.role'}=~/^(cc|in|ta|ep)/) { |
$function='coordinator'; |
$function='coordinator'; |
} |
} |
if ($env{'request.role'}=~/^(su|dc|ad|li)/) { |
if ($env{'request.role'}=~/^(su|dc|ad|li)/) { |
$function='admin'; |
$function='admin'; |
} |
} |
if (($env{'request.role'}=~/^(au|ca)/) || |
if (($env{'request.role'}=~/^(au|ca|aa)/) || |
($ENV{'REQUEST_URI'}=~/^(\/priv|\~)/)) { |
($ENV{'REQUEST_URI'}=~/^(\/priv|\~)/)) { |
$function='author'; |
$function='author'; |
} |
} |
Line 6816 sub get_users_function {
|
Line 6843 sub get_users_function {
|
|
|
=pod |
=pod |
|
|
|
=item * &show_course() |
|
|
|
Used by lonmenu.pm and lonroles.pm to determine whether to use the word |
|
'Courses' or 'Roles' in inline navigation and on screen displaying user's roles. |
|
|
|
Inputs: |
|
None |
|
|
|
Outputs: |
|
Scalar: 1 if 'Course' to be used, 0 otherwise. |
|
|
|
=cut |
|
|
|
############################################### |
|
sub show_course { |
|
my $course = !$env{'user.adv'}; |
|
if (!$env{'user.adv'}) { |
|
foreach my $env (keys(%env)) { |
|
next if ($env !~ m/^user\.priv\./); |
|
if ($env !~ m/^user\.priv\.(?:st|cm)/) { |
|
$course = 0; |
|
last; |
|
} |
|
} |
|
} |
|
return $course; |
|
} |
|
|
|
############################################### |
|
|
|
=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 |
Line 7559 ENDSCRIPT
|
Line 7618 ENDSCRIPT
|
|
|
my $output = <<"END_BLOCK"; |
my $output = <<"END_BLOCK"; |
<script type="text/javascript"> |
<script type="text/javascript"> |
|
// <![CDATA[ |
function validateEntry(callingForm) { |
function validateEntry(callingForm) { |
|
|
var checkok = 1; |
var checkok = 1; |
Line 7627 function validateEntry(callingForm) {
|
Line 7687 function validateEntry(callingForm) {
|
|
|
$newuserscript |
$newuserscript |
|
|
|
// ]]> |
</script> |
</script> |
|
|
$new_user_create |
$new_user_create |
Line 10234 sub escape_url {
|
Line 10295 sub escape_url {
|
return join('/',@urlslices).'/'.$lastitem; |
return join('/',@urlslices).'/'.$lastitem; |
} |
} |
|
|
# -------------------------------------------------------- Initliaze user login |
sub compare_arrays { |
|
my ($arrayref1,$arrayref2) = @_; |
|
my (@difference,%count); |
|
@difference = (); |
|
%count = (); |
|
if ((ref($arrayref1) eq 'ARRAY') && (ref($arrayref2) eq 'ARRAY')) { |
|
foreach my $element (@{$arrayref1}, @{$arrayref2}) { $count{$element}++; } |
|
foreach my $element (keys(%count)) { |
|
if ($count{$element} == 1) { |
|
push(@difference,$element); |
|
} |
|
} |
|
} |
|
return @difference; |
|
} |
|
|
|
# -------------------------------------------------------- Initialize user login |
sub init_user_environment { |
sub init_user_environment { |
my ($r, $username, $domain, $authhost, $form, $args) = @_; |
my ($r, $username, $domain, $authhost, $form, $args) = @_; |
my $lonids=$Apache::lonnet::perlvar{'lonIDsDir'}; |
my $lonids=$Apache::lonnet::perlvar{'lonIDsDir'}; |
Line 10288 sub init_user_environment {
|
Line 10365 sub init_user_environment {
|
my ($httpbrowser,$clientbrowser,$clientversion,$clientmathml, |
my ($httpbrowser,$clientbrowser,$clientversion,$clientmathml, |
$clientunicode,$clientos) = &decode_user_agent($r); |
$clientunicode,$clientos) = &decode_user_agent($r); |
|
|
# -------------------------------------- Any accessibility options to remember? |
|
if (($form->{'interface'}) && ($form->{'remember'} eq 'true')) { |
|
foreach my $option ('imagesuppress','appletsuppress', |
|
'embedsuppress','fontenhance','blackwhite') { |
|
if ($form->{$option} eq 'true') { |
|
&Apache::lonnet::put('environment',{$option => 'on'}, |
|
$domain,$username); |
|
} else { |
|
&Apache::lonnet::del('environment',[$option], |
|
$domain,$username); |
|
} |
|
} |
|
} |
|
# ------------------------------------------------------------- Get environment |
# ------------------------------------------------------------- Get environment |
|
|
my %userenv = &Apache::lonnet::dump('environment',$domain,$username); |
my %userenv = &Apache::lonnet::dump('environment',$domain,$username); |
Line 10318 sub init_user_environment {
|
Line 10382 sub init_user_environment {
|
if ($userenv{'texengine'} eq 'ttm') { $clientmathml=1; } |
if ($userenv{'texengine'} eq 'ttm') { $clientmathml=1; } |
|
|
# --------------- Do not trust query string to be put directly into environment |
# --------------- Do not trust query string to be put directly into environment |
foreach my $option ('imagesuppress','appletsuppress', |
foreach my $option ('interface','localpath','localres') { |
'embedsuppress','fontenhance','blackwhite', |
$form->{$option}=~s/[\n\r\=]//gs; |
'interface','localpath','localres') { |
|
$form->{$option}=~s/[\n\r\=]//gs; |
|
} |
} |
# --------------------------------------------------------- Write first profile |
# --------------------------------------------------------- Write first profile |
|
|
Line 10355 sub init_user_environment {
|
Line 10417 sub init_user_environment {
|
$form->{'interface'}=~s/\W//gs; |
$form->{'interface'}=~s/\W//gs; |
$initial_env{"browser.interface"} = $form->{'interface'}; |
$initial_env{"browser.interface"} = $form->{'interface'}; |
$env{'browser.interface'}=$form->{'interface'}; |
$env{'browser.interface'}=$form->{'interface'}; |
foreach my $option ('imagesuppress','appletsuppress', |
|
'embedsuppress','fontenhance','blackwhite') { |
|
if (($form->{$option} eq 'true') || |
|
($userenv{$option} eq 'on')) { |
|
$initial_env{"browser.$option"} = "on"; |
|
} |
|
} |
|
} |
} |
|
|
foreach my $tool ('aboutme','blog','portfolio') { |
foreach my $tool ('aboutme','blog','portfolio') { |