Diff for /loncom/interface/lonsimplepage.pm between versions 1.70 and 1.74

version 1.70, 2009/02/23 22:36:30 version 1.74, 2009/03/01 13:23:12
Line 214  sub handler { Line 214  sub handler {
     }      }
   
     if ($forcestudent or $target eq 'tex') { $allowed=0; }      if ($forcestudent or $target eq 'tex') { $allowed=0; }
      
     if ($allowed) {  
  $r->print('<p>'.&Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes',&mt('Help with filling in text boxes')) .'</p>');               
     }   
     if (($env{'form.uploaddoc.filename'} and $target ne 'tex') &&      if (($env{'form.uploaddoc.filename'} and $target ne 'tex') &&
  ($env{'form.storeupl'}) && ($allowed)) {   ($env{'form.storeupl'}) && ($allowed)) {
  if ($env{'form.uploaddoc.filename'}=~/\.(gif|jpg|png|jpeg)$/i) {   if ($env{'form.uploaddoc.filename'}=~/\.(gif|jpg|png|jpeg)$/i) {
Line 256  sub handler { Line 253  sub handler {
  &Apache::lonnet::put($db_name,\%syllabus,$dom,$crs);   &Apache::lonnet::put($db_name,\%syllabus,$dom,$crs);
     }      }
   
 # ---------------------------------------------------------------- Get syllabus  #---Print help Text
     if ((($syllabus{'uploaded.lastmodified'}) &&   if($target ne 'tex'){
          (($group ne '' && ($group_home_view || $group_edit_perm ||     if($allowed){
            $group_view_perm)) || ($group eq ''))) || ($allowed)) {   $r->print(&Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes',&mt('Help with filling in text boxes'))); 
  my $image;   }
  if ($syllabus{'uploaded.photourl'}) {  }
     &Apache::lonnet::allowuploaded('/adm/smppg',  #---Print Function
    $syllabus{'uploaded.photourl'});  
       
     $image='<img src="'.$syllabus{'uploaded.photourl'}.'"  
                             />';  
     if ($target eq 'tex') {  
  $image=&Apache::lonxml::xmlparse($r,'tex',$image);  
             }  
         }  
  if ($target ne 'tex') {   if ($target ne 'tex') {
  if($allowed || $privileged){   if($allowed || $privileged){
  &Apache::lontemplate::print_start_page_functions($r);   &Apache::lontemplate::print_start_page_functions($r);
  if($allowed){   if($allowed){
  &Apache::lontemplate::print_functions_content($r,'<a href="'.$r->uri.'?forcestudent=1">'.&mt('Show Student View').'</a>'.   &Apache::lontemplate::print_functions_content($r,'<a href="'.$r->uri.'?forcestudent=1">'.&mt('Show Student View').'</a>'.&Apache::loncommon::help_open_topic('Uploaded_Templates_PublicView'));      
           &Apache::loncommon::help_open_topic('Uploaded_Templates_PublicView'));        
  }elsif($privileged){   }elsif($privileged){
  my $edittext = &mt('Edit');   my $edittext = &mt('Edit');
         if ($group ne '') {          if ($group ne '') {
Line 295  sub handler { Line 283  sub handler {
  &Apache::lontemplate::print_end_page_functions($r);   &Apache::lontemplate::print_end_page_functions($r);
  }   }
   }    }
   
   # ---------------------------------------------------------------- Get syllabus
       if ((($syllabus{'uploaded.lastmodified'}) && 
            (($group ne '' && ($group_home_view || $group_edit_perm ||  
              $group_view_perm)) || ($group eq ''))) || ($allowed)) {
    my $image;
    if ($syllabus{'uploaded.photourl'}) {
       &Apache::lonnet::allowuploaded('/adm/smppg',
      $syllabus{'uploaded.photourl'});
       
       $image='<img src="'.$syllabus{'uploaded.photourl'}.'"
                               />';
       if ($target eq 'tex') {
    $image=&Apache::lonxml::xmlparse($r,'tex',$image);
               }
           }
   
  if ($allowed) {   if ($allowed) {
     $r->print(      $r->print(
       '<form method="post" enctype="multipart/form-data">'.        '<form method="post" enctype="multipart/form-data">'.
Line 334  sub handler { Line 339  sub handler {
  if($allowed){   if($allowed){
  $r->print('<p>');   $r->print('<p>');
  }   }
  $r->print('<div class="LC_ContentBoxSpecial">');                          $r->print('<h2>'.$message.'</h2>');
                         $r->print('<h2 class="LC_hcell">'.$message.'</h2>');  
  $r->print('<blockquote>');  
                     } else {                      } else {
                         my $safeinit;                          my $safeinit;
                         $r->print(&Apache::lonxml::xmlparse($r,'tex','<h1>'.$message.'</h1>'));                          $r->print(&Apache::lonxml::xmlparse($r,'tex','<h1>'.$message.'</h1>'));
Line 387  sub handler { Line 390  sub handler {
     $r->print('<p>'.&mt('No page information provided.').'</p>');      $r->print('<p>'.&mt('No page information provided.').'</p>');
         }          }
     }      }
       
     $r->print('</blockquote>');  
     $r->print('</div>');  
     if ($env{'form.grade_target'} ne 'tex') {      if ($env{'form.grade_target'} ne 'tex') {
  $r->print(&Apache::loncommon::end_page());   $r->print(&Apache::loncommon::end_page());
     } else {      } else {
Line 412  sub display_group_links { Line 412  sub display_group_links {
                         href => '/adm/groupboards?group='.$group.$refarg,                          href => '/adm/groupboards?group='.$group.$refarg,
                       );                        );
     %{$menu{'chat'}} = (      %{$menu{'chat'}} = (
                         text => 'Group Chat',                          text => 'Group Chat Room',
                         href => "javascript:group_chat('$group')",                          href => "javascript:group_chat('$group')",
                       );                        );
     %{$menu{'files'}} = (      %{$menu{'files'}} = (
Line 461  sub display_group_links { Line 461  sub display_group_links {
         if ($context eq 'edit') {          if ($context eq 'edit') {
             $output = &mt('No group functionality.');              $output = &mt('No group functionality.');
         } else {            } else {  
             $output = &mt('No group functionality (e.g., e-mail, discussion, chat or file upload) is currently available to you in this group: [_1].','<b>'.&unescape($groupinfo{'description'}).'</b>');              $output = &mt('No group functionality (e.g., e-mail, discussion, chat room or file upload) is currently available to you in this group: [_1].','<b>'.&unescape($groupinfo{'description'}).'</b>');
         }          }
         if ($target eq 'tex') {          if ($target eq 'tex') {
             $r->print(&Apache::lonxml::xmlparse($r,'tex',$output));              $r->print(&Apache::lonxml::xmlparse($r,'tex',$output));

Removed from v.1.70  
changed lines
  Added in v.1.74


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