Diff for /loncom/interface/lonaboutme.pm between versions 1.138 and 1.142

version 1.138, 2009/06/11 16:48:33 version 1.142, 2010/01/30 18:02:27
Line 168  sub handler { Line 168  sub handler {
   
     if ($is_course) {      if ($is_course) {
         if ($target ne 'tex') {          if ($target ne 'tex') {
             my $brcrum = [{href=>"/adm/navmaps",text=>"Navigate Course Contents"},              my $brcrum = [{href=>"/adm/navmaps",text=>"Course Contents"},
               {href=>"/adm/aboutme",text=>"Course Information"}];                {href=>"/adm/aboutme",text=>"Course Information"}];
             my $start_page =              my $start_page =
                 &Apache::loncommon::start_page(                  &Apache::loncommon::start_page(
Line 207  sub handler { Line 207  sub handler {
   
     if ($target ne 'tex') {      if ($target ne 'tex') {
         my $rss_link = &Apache::lonrss::rss_link($cnum,$cdom);          my $rss_link = &Apache::lonrss::rss_link($cnum,$cdom);
         my $args = {'function' => $forcestudent,          my $args = {'function' => undef,
                     'domain'   => $cdom,                      'domain'   => $cdom,
                     'force_register' => $forceregister};  # if this page is part of course content it looses the menu line when switching from Edit Mode to Public Mode. To avoid
   #this, I take take the value of the environment Variable $env{form.register}
   #                    'force_register' => $forceregister};
                       'force_register' => $env{'form.register'}};
   
         if ($env{'form.popup'}) {          if ($env{'form.popup'}) {
             $args->{'no_nav_bar'} = 1;              $args->{'no_nav_bar'} = 1;
    #Don't show breadcrumbs twice, when this page is part of course content and you call it  
    } elsif ($env{'form.register'}) {
    #do nothing
         } else { # Don't show breadcrumbs in popup window          } else { # Don't show breadcrumbs in popup window
             $args->{'bread_crumbs'} = [{href=>"/adm/$cdom/$cnum/aboutme",text=>"Personal Information Page"}];              $args->{'bread_crumbs'} = [{href=>"/adm/$cdom/$cnum/aboutme",text=>"Personal Information Page"}];
         }          }
Line 353  sub handler { Line 360  sub handler {
             &Apache::lonnet::resizeImage(&Apache::lonnet::filelocation('',$syllabus{'uploaded.photourl'}));              &Apache::lonnet::resizeImage(&Apache::lonnet::filelocation('',$syllabus{'uploaded.photourl'}));
            #---End Resize---             #---End Resize---
   
             $image=qq{<img name="userPhoto" src="$syllabus{'uploaded.photourl'} " class="LC_AboutMe_Image" />};              $image=qq|<img name="userPhoto" src="$syllabus{'uploaded.photourl'} " class="LC_AboutMe_Image" alt="Photo of the user" />|;
   
             if ($target eq 'tex') {              if ($target eq 'tex') {
                 $image=&Apache::lonxml::xmlparse($r,'tex',$image);                  $image=&Apache::lonxml::xmlparse($r,'tex',$image);
Line 363  sub handler { Line 370  sub handler {
   
         if ($allowed) {          if ($allowed) {
             $r->print(              $r->print(
                 '<form method="post" enctype="multipart/form-data">'.                  '<form name="UploadPhoto" method="post" enctype="multipart/form-data" action="">'.
                 '<h3>'.&mt('Upload a Photo').'</h3>'.                  '<h3>'.&mt('Upload a Photo').'</h3>'.
                 '<input type="file" name="uploaddoc" size="50" />'.                  '<input type="file" name="uploaddoc" size="50" />'.
                 '<input type="submit" name="storeupl" value="'.&mt('Upload').'" />'.                  '<input type="submit" name="storeupl" value="'.&mt('Upload').'" />'.
                 '<input type="hidden" name="popup" value="'.$env{'form.popup'}.'" />'.                  '<input type="hidden" name="popup" value="'.$env{'form.popup'}.'" />'.
                 '</form>');                  '</form>');
             if ($syllabus{'uploaded.photourl'}) {              if ($syllabus{'uploaded.photourl'}) {
                 $r->print('<form method="post"><input type="submit" name="delupl" value="'.&mt('Delete Photo').'" /> </form>')                  $r->print('<form name="delPhoto" method="post" action="" ><input type="submit" name="delupl" value="'.&mt('Delete Photo').'" /> </form>')
             }              }
             $r->print('<p>');              $r->print('<p></p>');
         }          }
   
         if($allowed) {          if($allowed) {
             $r->print('<form method="post">');              $r->print('<form name="lonaboutmeFields" method="post" action="" >');
         }          }
   
         if ($target ne 'tex') { #print Image          if ($target ne 'tex') { #print Image
Line 419  sub handler { Line 426  sub handler {
             &Apache::lontemplate::print_start_template($r,&mt('User Notes, Records of Face-To-Face Discussions, and Critical Messages in Course'),'LC_Box');              &Apache::lontemplate::print_start_template($r,&mt('User Notes, Records of Face-To-Face Discussions, and Critical Messages in Course'),'LC_Box');
             $r->print('<span class="LC_info">');              $r->print('<span class="LC_info">');
             $r->print(&mt('Shared by course faculty and staff').&Apache::loncommon::help_open_topic("Course_Face_To_Face_Records,Course_Critical_Message"));              $r->print(&mt('Shared by course faculty and staff').&Apache::loncommon::help_open_topic("Course_Face_To_Face_Records,Course_Critical_Message"));
             $r->print('</span> <p>');              $r->print('</span>');
             &Apache::lonmsgdisplay::disfacetoface($r,$cnum,$cdom);              &Apache::lonmsgdisplay::disfacetoface($r,$cnum,$cdom);
             $r->print('</p>');  
             &Apache::lontemplate::print_end_template($r);              &Apache::lontemplate::print_end_template($r);
   
         } else {          } else {
             $r->print('\\\\\textbf{'.&mt('User Notes, Records of Face-To-Face Discussions, and Critical Messages in Course').'}\\\\'.&mt('Shared by course faculty and staff').'\\\\\\\\');              $r->print('\\\\\textbf{'.&mt('User Notes, Records of Face-To-Face Discussions, and Critical Messages in Course').'}\\\\'.&mt('Shared by course faculty and staff').'\\\\\\\\');
             &Apache::lonmsgdisplay::disfacetoface($r,$cnum,$cdom);              &Apache::lonmsgdisplay::disfacetoface($r,$cnum,$cdom, 'tex');
         }          }
     }      }
     if ($target ne 'tex') {      if ($target ne 'tex') {
Line 825  sub aboutme_access { Line 831  sub aboutme_access {
     my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};      my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};
     my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};      my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};
     if (($cdom eq '') || ($cnum eq '')) {      if (($cdom eq '') || ($cnum eq '')) {
         my %coursehash = &coursedescription($env{'request.course.id'});          my %coursehash = &Apache::lonnet::coursedescription($env{'request.course.id'});
         $cdom = $coursehash{'domain'};          $cdom = $coursehash{'domain'};
         $cnum = $coursehash{'cnum'};          $cnum = $coursehash{'cnum'};
     }      }

Removed from v.1.138  
changed lines
  Added in v.1.142


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