Diff for /loncom/interface/lonprintout.pm between versions 1.131 and 1.132

version 1.131, 2003/04/22 19:54:39 version 1.132, 2003/04/30 16:29:07
Line 1378  sub printHelper { Line 1378  sub printHelper {
         my $isProblem = '$res->is_problem();';          my $isProblem = '$res->is_problem();';
         my $isProblemOrMap = '$res->is_problem() || $res->is_map()';          my $isProblemOrMap = '$res->is_problem() || $res->is_map()';
         my $isNotMap = '!$res->is_map();';          my $isNotMap = '!$res->is_map();';
           my $symb = '$res->symb();';
         my $helperFragment = <<HELPERFRAGMENT;          my $helperFragment = <<HELPERFRAGMENT;
   <state name="CHOOSE_PROBLEMS" title="Select Problems">    <state name="CHOOSE_PROBLEMS" title="Select Problems">
     <message>Select problems to print:</message>      <message>Select problems to print:</message>
Line 1386  sub printHelper { Line 1387  sub printHelper {
       <filterfunc>return $isProblemOrMap</filterfunc>        <filterfunc>return $isProblemOrMap</filterfunc>
       <choicefunc>return $isProblem</choicefunc>        <choicefunc>return $isProblem</choicefunc>
       <mapurl>$map</mapurl>        <mapurl>$map</mapurl>
         <valuefunc>return $symb</valuefunc>
       </resource>        </resource>
     </state>      </state>
   
Line 1395  sub printHelper { Line 1397  sub printHelper {
       <nextstate>FINAL</nextstate>        <nextstate>FINAL</nextstate>
       <choicefunc>return $isNotMap;</choicefunc>        <choicefunc>return $isNotMap;</choicefunc>
       <mapurl>$map</mapurl>        <mapurl>$map</mapurl>
         <valuefunc>return $symb</valuefunc>
       </resource>        </resource>
     </state>      </state>
 HELPERFRAGMENT  HELPERFRAGMENT
Line 1405  HELPERFRAGMENT Line 1408  HELPERFRAGMENT
     # If the user is priviledged, allow them to print all       # If the user is priviledged, allow them to print all 
     # problems in the course, optionally for selected students      # problems in the course, optionally for selected students
     if (($ENV{'request.role'}=~m/^cc\./ or $ENV{'request.role'}=~m/^in\./ or $ENV{'request.role'}=~m/^ta\./) and ($helper->{VARS}->{'postdata'}=~/\/res\//)) {       if (($ENV{'request.role'}=~m/^cc\./ or $ENV{'request.role'}=~m/^in\./ or $ENV{'request.role'}=~m/^ta\./) and ($helper->{VARS}->{'postdata'}=~/\/res\//)) { 
         push @{$printChoices}, ['<b>All problems</b> in course (may take a lot of time)', 'all_problems', 'FINAL'];          push @{$printChoices}, ['<b>All problems</b> in course (may take a lot of time)', 'all_problems', 'ALL_PROBLEMS'];
         push @{$printChoices}, ["Problems from <b>$sequenceTitle</b> for selected students", 'problems_for_students', 'CHOOSE_STUDENTS'];          push @{$printChoices}, ["Problems from <b>$sequenceTitle</b> for selected students", 'problems_for_students', 'CHOOSE_STUDENTS'];
   
           my $isProblem = '$res->is_problem();';
           my $isProblemOrMap = '$res->is_problem() || $res->is_map()';
           my $symb = '$res->symb();';
         &Apache::lonxml::xmlparse($r, 'helper', <<CHOOSE_STUDENTS);          &Apache::lonxml::xmlparse($r, 'helper', <<CHOOSE_STUDENTS);
     <state name="All_PROBLEMS" title="Select Problems">
       <message>Select problems to print:</message>
       <resource variable="RESOURCES" multichoice="1">
         <nextstate>FINAL</nextstate>
         <filterfunc>return $isProblemOrMap</filterfunc>
         <choicefunc>return $isProblem</choicefunc>
         <valuefunc>return $symb</valuefunc>
         </resource>
       </state>
   
   <state name="CHOOSE_STUDENTS" title="Choose Students">    <state name="CHOOSE_STUDENTS" title="Choose Students">
     <message>Select the students you wish to print the problems for:</message>      <message>Select the students you wish to print the problems for:</message>
     <student multichoice='1' variable="STUDENTS" nextstate="FINAL" />      <student multichoice='1' variable="STUDENTS" nextstate="FINAL" />

Removed from v.1.131  
changed lines
  Added in v.1.132


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