Diff for /loncom/interface/lonprintout.pm between versions 1.242 and 1.244

version 1.242, 2003/09/29 20:06:20 version 1.244, 2003/09/30 17:29:26
Line 1225  sub printHelper { Line 1225  sub printHelper {
   
     # If we're in a sequence...      # If we're in a sequence...
     if (($helper->{'VARS'}->{'construction'} ne '1') &&      if (($helper->{'VARS'}->{'construction'} ne '1') &&
  $helper->{VARS}->{'postdata'} && $sequenceTitle) {   $helper->{VARS}->{'postdata'} &&
    $helper->{VARS}->{'assignment'}) {
         # Allow problems from sequence          # Allow problems from sequence
         push @{$printChoices}, ["<b>Problems</b> in $sequenceTitle", 'map_problems', 'CHOOSE_PROBLEMS'];          push @{$printChoices}, ["<b>Problems</b> in $sequenceTitle", 'map_problems', 'CHOOSE_PROBLEMS'];
         # Allow all resources from sequence          # Allow all resources from sequence
Line 1260  HELPERFRAGMENT Line 1261  HELPERFRAGMENT
     # problems in the course, optionally for selected students      # problems in the course, optionally for selected students
     if ($userPriviledged && ($helper->{VARS}->{'postdata'}=~/\/res\//)) {       if ($userPriviledged && ($helper->{VARS}->{'postdata'}=~/\/res\//)) { 
         push @{$printChoices}, ['Problems from <b>entire course</b>', 'all_problems', 'ALL_PROBLEMS'];          push @{$printChoices}, ['Problems from <b>entire course</b>', 'all_problems', 'ALL_PROBLEMS'];
  if ($sequenceTitle) {   if ($helper->{VARS}->{'assignment'}) {
     push @{$printChoices}, ["Problems from $sequenceTitle for <b>selected students</b>", 'problems_for_students', 'CHOOSE_STUDENTS'];      push @{$printChoices}, ["Problems from $sequenceTitle for <b>selected students</b>", 'problems_for_students', 'CHOOSE_STUDENTS'];
  }   }
   
Line 1325  CHOOSE_FROM_SUBDIR Line 1326  CHOOSE_FROM_SUBDIR
     if (!$helper->{VARS}->{'construction'}) {      if (!$helper->{VARS}->{'construction'}) {
  push @$printChoices, ["Resources from <b>selected sequence</b> in course",   push @$printChoices, ["Resources from <b>selected sequence</b> in course",
       'map_problems_pages', 'CHOOSE_SEQUENCE'];        'map_problems_pages', 'CHOOSE_SEQUENCE'];
    my $escapedSequenceName = $helper->{VARS}->{'SEQUENCE'};
    #Escape apostrophes and backslashes for Perl
    $escapedSequenceName =~ s/\\/\\\\/g;
    $escapedSequenceName =~ s/'/\\'/g;
  &Apache::lonxml::xmlparse($r, 'helper', <<CHOOSE_FROM_ANY_SEQUENCE);   &Apache::lonxml::xmlparse($r, 'helper', <<CHOOSE_FROM_ANY_SEQUENCE);
   <state name="CHOOSE_SEQUENCE" title="Select Sequence To Print From">    <state name="CHOOSE_SEQUENCE" title="Select Sequence To Print From">
     <message>Select the sequence to print resources from:</message>      <message>Select the sequence to print resources from:</message>
Line 1339  CHOOSE_FROM_SUBDIR Line 1344  CHOOSE_FROM_SUBDIR
     <resource variable="RESOURCES" multichoice="1" toponly='1' addstatus="1">      <resource variable="RESOURCES" multichoice="1" toponly='1' addstatus="1">
       <nextstate>PAGESIZE</nextstate>        <nextstate>PAGESIZE</nextstate>
       <filterfunc>return $isProblem</filterfunc>        <filterfunc>return $isProblem</filterfunc>
       <mapurl evaluate='1'>return $helper->{VARS}->{'SEQUENCE'};</mapurl>        <mapurl evaluate='1'>return '$escapedSequenceName';</mapurl>
       <valuefunc>return $symbFilter;</valuefunc>        <valuefunc>return $symbFilter;</valuefunc>
       </resource>        </resource>
     </state>      </state>

Removed from v.1.242  
changed lines
  Added in v.1.244


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