Diff for /loncom/interface/lonmenu.pm between versions 1.204 and 1.207

version 1.204, 2006/08/14 09:28:56 version 1.207, 2006/12/06 11:34:37
Line 44  use Apache::lonhtmlcommon(); Line 44  use Apache::lonhtmlcommon();
 use Apache::loncommon();  use Apache::loncommon();
 use Apache::lonenc();  use Apache::lonenc();
 use Apache::lonlocal;  use Apache::lonlocal;
 use lib '/home/httpd/lib/perl/';  use LONCAPA qw(:DEFAULT :match);
 use LONCAPA;  
   
 use vars qw(@desklines $readdesk);  use vars qw(@desklines $readdesk);
   
Line 408  sub innerregister { Line 407  sub innerregister {
                 my $desc = "Enter my resource construction space";                  my $desc = "Enter my resource construction space";
                 # Set defaults for co-authors                  # Set defaults for co-authors
                 if ($env{'request.role'} =~ /^ca/) {                   if ($env{'request.role'} =~ /^ca/) { 
                     ($cadom,$caname)=($env{'request.role'}=~/(\w+)\/(\w+)$/);                      ($cadom,$caname)=($env{'request.role'}=~/($match_domain)\/($match_username)$/);
                     ($top,$bottom) = ('co con-','struct');                      ($top,$bottom) = ('co con-','struct');
                     $action = "go('/priv/".$caname."');";                      $action = "go('/priv/".$caname."');";
                     $desc = "Enter construction space as co-author";                      $desc = "Enter construction space as co-author";
Line 430  sub innerregister { Line 429  sub innerregister {
             my $cfudom='';              my $cfudom='';
             if ($env{'request.filename'}) {              if ($env{'request.filename'}) {
                 my $file=&Apache::lonnet::declutter($env{'request.filename'});                  my $file=&Apache::lonnet::declutter($env{'request.filename'});
                 $file=~s/^(\w+)\/(\w+)/\/priv\/$2/;                  $file=~s/^($match_domain)\/($match_username)/\/priv\/$2/;
                 # Check that the user has permission to edit this resource                  # Check that the user has permission to edit this resource
                 ($cfuname,$cfudom)=&Apache::loncacc::constructaccess($file,$1);                  ($cfuname,$cfudom)=&Apache::loncacc::constructaccess($file,$1);
                 if (defined($cfudom)) {                  if (defined($cfudom)) {
Line 989  sub rawconfig { Line 988  sub rawconfig {
                     my $caname=$env{'user.name'};                      my $caname=$env{'user.name'};
                     if ($prt eq 'rca') {                      if ($prt eq 'rca') {
        ($cadom,$caname)=         ($cadom,$caname)=
                                ($env{'request.role'}=~/(\w+)\/(\w+)$/);                                 ($env{'request.role'}=~/($match_domain)\/($match_username)$/);
                     }                                             }                       
                     $act =~ s/\$caname/$caname/g;                      $act =~ s/\$caname/$caname/g;
                     my $home = &Apache::lonnet::homeserver($caname,$cadom);                      my $home = &Apache::lonnet::homeserver($caname,$cadom);
Line 1077  sub utilityfunctions { Line 1076  sub utilityfunctions {
  'add_entries' => {   'add_entries' => {
     'onload' => 'javascript:document.goannotate.submit();'}});      'onload' => 'javascript:document.goannotate.submit();'}});
   
       my $end_page_annotate = 
           &Apache::loncommon::end_page({'js_ready' => 1});
   
     my $start_page_bookmark =       my $start_page_bookmark = 
         &Apache::loncommon::start_page('Bookmarks',undef,          &Apache::loncommon::start_page('Bookmarks',undef,
        {'only_body' => 1,         {'only_body' => 1,
  'js_ready'  => 1,   'js_ready'  => 1,
  'bgcolor'   => '#BBBBBB',});   'bgcolor'   => '#BBBBBB',});
   
     my $end_page =       my $end_page_bookmark = 
         &Apache::loncommon::end_page({'js_ready' => 1});          &Apache::loncommon::end_page({'js_ready' => 1});
   
 return (<<ENDUTILITY)  return (<<ENDUTILITY)
Line 1203  function annotate() { Line 1205  function annotate() {
   +"action='/adm/annotations'>"    +"action='/adm/annotations'>"
   +"<input type='hidden' name='urlnew' value='"+currentURL+"' />"    +"<input type='hidden' name='urlnew' value='"+currentURL+"' />"
   +"<\\/form>"    +"<\\/form>"
   +'$end_page');    +'$end_page_annotate');
    annotator.document.close();     annotator.document.close();
 }  }
   
Line 1225  function set_bookmark() { Line 1227  function set_bookmark() {
    +"value='Save' /> <input type='button' value='Close (no save)' "     +"value='Save' /> <input type='button' value='Close (no save)' "
    +"onclick='javascript:window.close();' /><\\/center><\\/td>"     +"onclick='javascript:window.close();' /><\\/center><\\/td>"
    +"<\\/tr><\\/table><\\/form><\\/center>"     +"<\\/tr><\\/table><\\/form><\\/center>"
    +'$end_page' );     +'$end_page_bookmark' );
    bmquery.document.close();     bmquery.document.close();
 }  }
   

Removed from v.1.204  
changed lines
  Added in v.1.207


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>