--- loncom/interface/loncommon.pm 2009/05/28 12:39:23 1.830 +++ loncom/interface/loncommon.pm 2009/05/28 16:54:29 1.832 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.830 2009/05/28 12:39:23 bisitz Exp $ +# $Id: loncommon.pm,v 1.832 2009/05/28 16:54:29 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -4183,6 +4183,34 @@ sub designparm { ############################################## =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.) @@ -4274,10 +4302,6 @@ Inputs: =item * $forcereg, if page should register as content page (relevant for text interface only) -=item * $customtitle, alternate text to use instead of $title - in the title box that appears, this text - is not auto translated like the $title is - =item * $no_nav_bar, if true, keep the 'what is this' info but remove the navigational links @@ -4302,7 +4326,7 @@ other decorations will be returned. =cut sub bodytag { - my ($title,$function,$addentries,$bodyonly,$domain,$forcereg,$customtitle, + my ($title,$function,$addentries,$bodyonly,$domain,$forcereg, $no_nav_bar,$bgcolor,$no_inline_link,$args)=@_; if (!$args->{'no_auto_mt_title'}) { $title = &mt($title); } @@ -4373,9 +4397,6 @@ $realm  ENDROLE my $titleinfo = '

'.$title.'

'; - if ($customtitle) { - $titleinfo = $customtitle; - } # # Extra info if you are the DC my $dc_info = ''; @@ -4394,7 +4415,7 @@ ENDROLE $forcereg=1; } - if (!$customtitle && $env{'request.state'} eq 'construct') { + if ($env{'request.state'} eq 'construct') { $titleinfo = &CSTR_pageheader(); #FIXME: Will be removed once all scripts have their own calls } @@ -6488,9 +6509,6 @@ $args - additional optional args support a html attribute force_register -> if is true will turn on the &bodytag() $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 rather than skip_phases -> hash ref of @@ -6534,16 +6552,15 @@ sub start_page { my $attr_string = &make_attr_string($args->{'force_register'}, $args->{'add_entries'}); $result .= "\n\n"; - } else { - $result .= - &bodytag($title, - $args->{'function'}, $args->{'add_entries'}, - $args->{'only_body'}, $args->{'domain'}, - $args->{'force_register'}, $args->{'body_title'}, - $args->{'no_nav_bar'}, $args->{'bgcolor'}, - $args->{'no_inline_link'}, - $args); - } + } else { + $result .= + &bodytag($title, + $args->{'function'}, $args->{'add_entries'}, + $args->{'only_body'}, $args->{'domain'}, + $args->{'force_register'}, $args->{'no_nav_bar'}, + $args->{'bgcolor'}, $args->{'no_inline_link'}, + $args); + } } if ($args->{'js_ready'}) {