Diff for /loncom/interface/lonprintout.pm between versions 1.478 and 1.479

version 1.478, 2006/08/14 10:52:04 version 1.479, 2006/08/14 22:20:20
Line 2272  sub printHelper { Line 2272  sub printHelper {
     if (($helper->{'VARS'}->{'construction'} ne '1') &&      if (($helper->{'VARS'}->{'construction'} ne '1') &&
   
  $helper->{VARS}->{'postdata'} &&   $helper->{VARS}->{'postdata'} &&
    ($helper->{VARS}->{'postdata'} !~ /^\/res\//) &&
  $helper->{VARS}->{'assignment'}) {   $helper->{VARS}->{'assignment'}) {
         # Allow problems from sequence          # Allow problems from sequence
         push @{$printChoices}, [&mt('Selected <b>Problems</b> in folder <b><i>[_1]</i></b>',$sequenceTitle), 'map_problems', 'CHOOSE_PROBLEMS'];          push @{$printChoices}, [&mt('Selected <b>Problems</b> in folder <b><i>[_1]</i></b>',$sequenceTitle), 'map_problems', 'CHOOSE_PROBLEMS'];
Line 2308  HELPERFRAGMENT Line 2309  HELPERFRAGMENT
     # If the user has pfo (print for otheres) allow them to print all       # If the user has pfo (print for otheres) allow them to print all 
     # problems and resources  in the entier course, optionally for selected students      # problems and resources  in the entier course, optionally for selected students
     if ($perm{'pfo'} &&       if ($perm{'pfo'} && 
         ($helper->{VARS}->{'postdata'}=~/\/res\// || $helper->{VARS}->{'postdata'}=~/\/(syllabus|smppg|aboutme|bulletinboard)$/)) {           $helper->{VARS}->{'postdata'} !~/^\/res\// && 
    $helper->{VARS}->{'postdata'}=~/\/(syllabus|smppg|aboutme|bulletinboard)$/) { 
         push @{$printChoices}, ['Selected <b>Problems</b> from <b>entire course</b>', 'all_problems', 'ALL_PROBLEMS'];          push @{$printChoices}, ['Selected <b>Problems</b> from <b>entire course</b>', 'all_problems', 'ALL_PROBLEMS'];
  push @{$printChoices}, ['Selected <b>Resources</b> from <b>entire course</b>', 'all_resources', 'ALL_RESOURCES'];   push @{$printChoices}, ['Selected <b>Resources</b> from <b>entire course</b>', 'all_resources', 'ALL_RESOURCES'];
          &Apache::lonxml::xmlparse($r, 'helper', <<ALL_PROBLEMS);           &Apache::lonxml::xmlparse($r, 'helper', <<ALL_PROBLEMS);
Line 2617  CHOOSE_STUDENTS1 Line 2618  CHOOSE_STUDENTS1
   </state>    </state>
     $resource_selector      $resource_selector
 CHOOSE_ANON2  CHOOSE_ANON2
     }  }
   
     # FIXME: That RE should come from a library somewhere.      # FIXME: That RE should come from a library somewhere.
     if ((((&Apache::lonnet::allowed('bre',$subdir) eq 'F') and ($helper->{VARS}->{'postdata'}=~/\.(problem|exam|quiz|assess|survey|form|library|page|xml|html|htm|xhtml|xhtm)/)) or defined $helper->{'VARS'}->{'construction'}) and $perm{'pav'} and $subdir ne $Apache::lonnet::perlvar{'lonDocRoot'}.'/res/') {          if ((((&Apache::lonnet::allowed('bre',$subdir) eq 'F') and 
     ($helper->{VARS}->{'postdata'}=~/\.(problem|exam|quiz|assess|survey|form|library|page|xml|html|htm|xhtml|xhtm)/)) or 
    defined $helper->{'VARS'}->{'construction'}) and $perm{'pav'} and $subdir ne $Apache::lonnet::perlvar{'lonDocRoot'}.'/res/') {    
         push @{$printChoices}, [&mt("Selected <b>Problems</b> from current subdirectory <b><i>[_1]</i></b>",$subdir), 'problems_from_directory', 'CHOOSE_FROM_SUBDIR'];          push @{$printChoices}, [&mt("Selected <b>Problems</b> from current subdirectory <b><i>[_1]</i></b>",$subdir), 'problems_from_directory', 'CHOOSE_FROM_SUBDIR'];
   
         my $f = '$filename';          my $f = '$filename';
Line 2646  CHOOSE_FROM_SUBDIR Line 2649  CHOOSE_FROM_SUBDIR
   
     # Allow the user to select any sequence in the course, feed it to      # Allow the user to select any sequence in the course, feed it to
     # another resource selector for that sequence      # another resource selector for that sequence
     if (!$helper->{VARS}->{'construction'}) {      if (!$helper->{VARS}->{'construction'} && ($helper->{VARS}->{'postdata'} !~ /^\/res\//)) {
  push @$printChoices, ["Selected <b>Resources</b> from <b>selected folder</b> in course",   push @$printChoices, ["Selected <b>Resources</b> from <b>selected folder</b> in course",
       'select_sequences', 'CHOOSE_SEQUENCE'];        'select_sequences', 'CHOOSE_SEQUENCE'];
  my $escapedSequenceName = $helper->{VARS}->{'SEQUENCE'};   my $escapedSequenceName = $helper->{VARS}->{'SEQUENCE'};
Line 2677  CHOOSE_FROM_SUBDIR Line 2680  CHOOSE_FROM_SUBDIR
     </state>      </state>
 CHOOSE_FROM_ANY_SEQUENCE  CHOOSE_FROM_ANY_SEQUENCE
 }  }
   
     # Generate the first state, to select which resources get printed.      # Generate the first state, to select which resources get printed.
     Apache::lonhelper::state->new("START", "Select Printing Options:");      Apache::lonhelper::state->new("START", "Select Printing Options:");
     $paramHash = Apache::lonhelper::getParamHash();      $paramHash = Apache::lonhelper::getParamHash();

Removed from v.1.478  
changed lines
  Added in v.1.479


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