Diff for /loncom/interface/lonsimplepage.pm between versions 1.67 and 1.69

version 1.67, 2009/02/19 17:32:39 version 1.69, 2009/02/20 17:45:40
Line 272  sub handler { Line 272  sub handler {
             }              }
         }          }
  if ($target ne 'tex') {   if ($target ne 'tex') {
  &Apache::lontemplate::print_start_page_functions($r);   if($allowed || $privileged){
  if($allowed){   &Apache::lontemplate::print_start_page_functions($r);
  &Apache::lontemplate::print_functions_content($r,'<a href="'.$r->uri.'?forcestudent=1">'.&mt('Show Student View').'</a>'.   if($allowed){
    &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 '') {
             $edittext = &mt('Edit Group Homepage');              $edittext = &mt('Edit Group Homepage');
         }          }
  &Apache::lontemplate::print_functions_content($r,'<a href="'.$r->uri.'?forceedit=edit'.$refarg.'"><font size="+1">'.$edittext.'</font></a>');   &Apache::lontemplate::print_functions_content($r,'<a href="'.$r->uri.'?forceedit=edit'.$refarg.'">'.$edittext.'</a>');
         if ($group ne '') {          if ($group ne '') {
             if ($group_edit_perm) {              if ($group_edit_perm) {
                 &Apache::lontemplate::print_functions_content($r,'&nbsp;&nbsp;&nbsp;<font size="+1">'.                  &Apache::lontemplate::print_functions_content($r,'&nbsp;&nbsp;&nbsp;'.
                 '<a href="/adm/coursegroups?action=modify&amp;refpage=grouplist'.                  '<a href="/adm/coursegroups?action=modify&amp;refpage=grouplist'.
                 '&amp;state=pick_task&amp;groupname='.$group.'">'.                  '&amp;state=pick_task&amp;groupname='.$group.'">'.
                 &mt('Edit Group Settings').'</a></font>');                  &mt('Edit Group Settings').'</a>');
             }              }
       }            }    
    }
    &Apache::lontemplate::print_end_page_functions($r);
  }   }
  &Apache::lontemplate::print_end_page_functions($r);  
   }    }
  if ($allowed) {   if ($allowed) {
     $r->print(      $r->print(
Line 305  sub handler { Line 307  sub handler {
       '<form method="post"><input type="submit" name="delupl" value="'.&mt('Delete Photo').'" />' );        '<form method="post"><input type="submit" name="delupl" value="'.&mt('Delete Photo').'" />' );
  }   }
  if($allowed){   if($allowed){
                 $r->print($image.'<div class="clear">&nbsp;</div>');                 $r->print($image.'<div class="clear">&nbsp;</div>');
        }         }
   
  foreach my $field (sort(keys(%syllabusfields))) {   foreach my $field (sort(keys(%syllabusfields))) {
Line 332  sub handler { Line 334  sub handler {
  if($allowed){   if($allowed){
  $r->print('<p>');   $r->print('<p>');
  }   }
                         $r->print('<h1>'.$message.'</h1>');                          $r->print('<h2>'.$message.'</h2>');
                     } 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>'));
                     }                      }
                     if ($allowed) {                      if ($allowed) {
                         if ($env{'form.grade_target'} ne 'tex') {                          if ($env{'form.grade_target'} ne 'tex') {                         
                             $r->print('<br /><h3>'.&mt('Title').'</h3>');      &Apache::lontemplate::print_template($r, &mt('Title'), $message, $allowed, 'LC_ContentBoxSpecial'); 
     &Apache::lontemplate::print_editbox_template($r,$syllabus{$field},$field);      &Apache::lontemplate::print_editbox_template($r,$syllabus{$field},$field);
     $r->print('</p>');      $r->print('</p>');
                         } else {                          } else {
                             my $safeinit;                              my $safeinit;
                             $r->print(&Apache::lonxml::xmlparse($r,'tex',$syllabus{$field},$safeinit));                              $r->print(&Apache::lonxml::xmlparse($r,'tex',$syllabus{$field},$safeinit));
                         }                          }
                     }                      } 
       if(!$allowed) {$r->print($image); } 
                 } else {                  } else {
     if ($target ne 'tex') {      if ($target ne 'tex') {
  if($allowed){   if($allowed){
Line 370  sub handler { Line 373  sub handler {
  }   }
     }      }
  }   }
   
  if(!$allowed){  
  $r->print($image);  
  }  
  if ($allowed && ($env{'form.grade_target'} ne 'tex')) {   if ($allowed && ($env{'form.grade_target'} ne 'tex')) {
     $r->print(&Apache::lonhtmlcommon::htmlareaselectactive      $r->print(&Apache::lonhtmlcommon::htmlareaselectactive
       ('bbb_content').'</form>');        ('bbb_content').'</form>');

Removed from v.1.67  
changed lines
  Added in v.1.69


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