Diff for /loncom/homework/structuretags.pm between versions 1.444.4.2.2.2 and 1.444.4.3

version 1.444.4.2.2.2, 2009/12/02 18:22:12 version 1.444.4.3, 2010/01/28 18:15:51
Line 236  sub page_start { Line 236  sub page_start {
     $body_args{'no_auto_mt_title'} = 1;      $body_args{'no_auto_mt_title'} = 1;
     my $page_start = &Apache::loncommon::start_page($name,$extra_head,      my $page_start = &Apache::loncommon::start_page($name,$extra_head,
     \%body_args);      \%body_args);
     unless ($env{'request.gcicontext'} eq 'buildtest') {  
         if (!defined($found{'body'})       if (!defined($found{'body'}) 
     && $env{'request.state'} ne 'construct'   && $env{'request.state'} ne 'construct'
     && ($target eq 'web' || $target eq 'webgrade')) {   && ($target eq 'web' || $target eq 'webgrade')) {
   
     my ($symb,undef,undef,undef,$publicuser)= &Apache::lonnet::whichuser();   my ($symb,undef,undef,undef,$publicuser)= &Apache::lonnet::whichuser();
     if ($symb eq '' && !$publicuser) {   if ($symb eq '' && !$publicuser) {
                 $page_start .= '<p class="LC_info">'              $page_start .= '<p class="LC_info">'
                               .&mt('Browsing resource, all submissions are temporary.')                            .&mt('Browsing resource, all submissions are temporary.')
                               .'</p>';                            .'</p>';
             }  
         }          }
     }      }
   
Line 895  sub start_problem { Line 894  sub start_problem {
  if ($env{'request.state'} ne "construct" &&    if ($env{'request.state'} ne "construct" && 
     ($symb eq '' || $Apache::lonhomework::type eq 'practice')) {      ($symb eq '' || $Apache::lonhomework::type eq 'practice')) {
     $form_tag_start.='<input type="hidden" name="rndseed" value="'.      $form_tag_start.='<input type="hidden" name="rndseed" value="'.
  $rndseed.'" />';   $rndseed.'" />'.
             unless ($env{'request.gcicontext'} eq 'buildtest') {      '<input type="submit" name="resetdata"
  $form_tag_start .= '<input type="submit" name="resetdata"  
                              value="'.&mt('New Problem Variation').'" />';                               value="'.&mt('New Problem Variation').'" />';
             }  
     if (exists($env{'form.username'})) {      if (exists($env{'form.username'})) {
  $form_tag_start.=   $form_tag_start.=
     '<input type="hidden" name="username"      '<input type="hidden" name="username"
                              value="'.$env{'form.username'}.'" />';                               value="'.$env{'form.username'}.'" />';
     }      }
             unless ($env{'request.gcicontext'} eq 'buildtest') {              if ($env{'request.role.adv'}) {
                 if ($env{'request.role.adv'}) {                  $form_tag_start.= ' <label class="LC_nobreak">'
                     $form_tag_start.= ' <label class="LC_nobreak">'                           .'<input type="checkbox" name="showallfoils"';
                              .'<input type="checkbox" name="showallfoils"';                  if (defined($env{'form.showallfoils'})) {
                     if (defined($env{'form.showallfoils'})) {                      $form_tag_start.=' checked="checked"';
                         $form_tag_start.=' checked="checked"';  
                     }  
                     $form_tag_start.= ' /> '  
                                      .&mt('Show All Foils')  
                                      .'</label>';  
                 }                  }
                   $form_tag_start.= ' /> '
                                    .&mt('Show All Foils')
                                    .'</label>';
   
     }      }
             if ($Apache::lonhomework::type eq 'practice') {              if ($Apache::lonhomework::type eq 'practice') {
                 $form_tag_start.=&practice_problem_header();                  $form_tag_start.=&practice_problem_header();
             }              }
             unless ($env{'request.gcicontext'} eq 'buildtest') {      $form_tag_start.='<hr />';
         $form_tag_start.='<hr />';  
             }  
  }   }
   
  ($status,$accessmsg,my $slot_name,my $slot) =    ($status,$accessmsg,my $slot_name,my $slot) = 
Line 1112  sub end_problem { Line 1106  sub end_problem {
  '\textit{'.$duedate_text.'} '.$toc_line;   '\textit{'.$duedate_text.'} '.$toc_line;
  } else {   } else {
     $frontmatter.= $begin_doc.$toc_line;      $frontmatter.= $begin_doc.$toc_line;
     if ($Apache::lonhomework::type eq 'exam' and $allow_print_points==1) { $frontmatter .= '\fbox{\textit{'.$weight.' pt}}';}                      if ($Apache::lonhomework::type eq 'exam' and $allow_print_points==1) {
                           $frontmatter .= '\fbox{\textit{'.$weight.' pt}}';
                       }
  }   }
     } else {      } else {
  $frontmatter .= '\vskip 1mm\textit{'.$duedate_text.'} \\\\\\\\'.$startminipage;   $frontmatter .= '\vskip 1mm\textit{'.$duedate_text.'} \\\\\\\\'.$startminipage;
Line 1120  sub end_problem { Line 1116  sub end_problem {
  } else {   } else {
     if (not $env{'request.symb'} =~ m/\.page_/) {      if (not $env{'request.symb'} =~ m/\.page_/) {
  $frontmatter .= $begin_doc.$toc_line;   $frontmatter .= $begin_doc.$toc_line;
  if (($Apache::lonhomework::type eq 'exam') and ($allow_print_points==1)) { $frontmatter .= '\fbox{\textit{'.$weight.' pt}}';}                  if (($Apache::lonhomework::type eq 'exam') and ($allow_print_points==1)) {
                       $frontmatter .= '\fbox{\textit{'.$weight.' pt}}';
                   }
     } else {      } else {
  $frontmatter .= '\vskip 1mm \\\\\\\\'.$startminipage;   $frontmatter .= '\vskip 1mm \\\\\\\\'.$startminipage;
     }      }
Line 1762  sub start_part { Line 1760  sub start_part {
     '.disableexampointprint'}) eq 'yes') {      '.disableexampointprint'}) eq 'yes') {
  $allow_print_points=0;   $allow_print_points=0;
     }      }
     if (($Apache::lonhomework::type eq 'exam') && ($allow_print_points)) { $result .= '\fbox{\textit{'.$weight.' pt}}';}                      if (($Apache::lonhomework::type eq 'exam') && ($allow_print_points)) { 
                           $result .= '\vskip 10mm\fbox{\textit{'.$weight.' pt}}';
                       }
  } elsif ($target eq 'web') {   } elsif ($target eq 'web') {
     $result.='<a name="'.&escape($Apache::inputtags::part).'" />';      $result.='<a name="'.&escape($Apache::inputtags::part).'" />';
  }   }

Removed from v.1.444.4.2.2.2  
changed lines
  Added in v.1.444.4.3


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