Diff for /loncom/interface/lonprintout.pm between versions 1.227 and 1.238

version 1.227, 2003/09/05 18:43:43 version 1.238, 2003/09/25 18:16:04
Line 531  sub details_for_menu { Line 531  sub details_for_menu {
   
     my $name_of_resourse = $hash{'title_'.$hash{'ids_'.$ENV{'form.postdata'}}};      my $name_of_resourse = $hash{'title_'.$hash{'ids_'.$ENV{'form.postdata'}}};
     my $symbolic = &Apache::lonnet::symbread($ENV{'form.postdata'});      my $symbolic = &Apache::lonnet::symbread($ENV{'form.postdata'});
     my ($map,$id,$resource)=split(/___/,$symbolic);      my ($map,$id,$resource)=&Apache::lonnet::decode_symb($symbolic);
     $map=&Apache::lonnet::clutter($map);      $map=&Apache::lonnet::clutter($map);
     my $name_of_sequence;      my $name_of_sequence;
     $name_of_sequence = $hash{'title_'.$hash{'ids_'.$map}};      $name_of_sequence = $hash{'title_'.$hash{'ids_'.$map}};
Line 703  ENDPART Line 703  ENDPART
             #printing content of sequence from the construction space              #printing content of sequence from the construction space
     my $flag_latex_header_remove = 'NO';       my $flag_latex_header_remove = 'NO'; 
     my $rndseed=time;      my $rndseed=time;
       if ($helper->{'VARS'}->{'curseed'}) {
    $rndseed=$helper->{'VARS'}->{'curseed'};
       }
     $currentURL=~s|\/~([^\/]+)\/|\/home\/$1\/public_html\/|;      $currentURL=~s|\/~([^\/]+)\/|\/home\/$1\/public_html\/|;
     my $errtext=&Apache::lonratedt::mapread($currentURL);      my $errtext=&Apache::lonratedt::mapread($currentURL);
     for (my $member=0;$member<=$#Apache::lonratedt::order;$member++) {      for (my $member=0;$member<=$#Apache::lonratedt::order;$member++) {
Line 712  ENDPART Line 715  ENDPART
     my %form;      my %form;
     $form{'grade_target'}='tex';      $form{'grade_target'}='tex';
     $form{'textwidth'}=$LaTeXwidth;      $form{'textwidth'}=$LaTeXwidth;
       $form{'problem_split'}=$parmhash{'problem_stream_switch'};
       $form{'latex_type'}=$helper->{'VARS'}->{'LATEX_TYPE'};
     $form{'rndseed'}=$rndseed;      $form{'rndseed'}=$rndseed;
     my $texversion=&Apache::lonnet::ssi($urlp,%form);      my $texversion=&Apache::lonnet::ssi($urlp,%form);
     if($helper->{'VARS'}->{'ANSWER_TYPE'} eq 'no') {      if($helper->{'VARS'}->{'ANSWER_TYPE'} eq 'no') {
  my %form;   my %form;
  $form{'grade_target'}='answer';   $form{'grade_target'}='answer';
  $form{'answer_output_mode'}='tex';   $form{'answer_output_mode'}='tex';
  $form{'latex_type'}=$helper->{'VARS'}->{'LATEX_TYPE'};  
  $form{'rndseed'}=$rndseed;   $form{'rndseed'}=$rndseed;
                           if ($urlp=~/\/res\//) {$ENV{'request.state'}='published';}
    ####my $answer=' SSSSSS '.$ENV{'request.state'}.' FFFFFFF ';
  my $answer=&Apache::lonnet::ssi($urlp,%form);   my $answer=&Apache::lonnet::ssi($urlp,%form);
  $texversion=~s/(\\keephidden{ENDOFPROBLEM})/$answer$1/;   $texversion=~s/(\\keephidden{ENDOFPROBLEM})/$answer$1/;
     }      }
Line 731  ENDPART Line 737  ENDPART
     if ($helper->{'VARS'}->{'TABLE_INDEX'} eq 'yes') {      if ($helper->{'VARS'}->{'TABLE_INDEX'} eq 'yes') {
  $texversion=&IndexCreation($texversion,$urlp);   $texversion=&IndexCreation($texversion,$urlp);
     }      }
     if ($helper->{'VARS'}->{'CONSTR_RESOURSE_URL'} eq 'yes') {      if ($helper->{'VARS'}->{'CONSTR_RESOURSE_URpL'} eq 'yes') {
  $texversion=~s/(\\addcontentsline\{toc\}\{subsection\}\{[^\}]*\})/$1 URL: \\verb|$urlp| \\strut\\\\\\strut /;   $texversion=~s/(\\addcontentsline\{toc\}\{subsection\}\{[^\}]*\})/$1 URL: \\verb|$urlp| \\strut\\\\\\strut /;
     }      }
     $result.=$texversion;      $result.=$texversion;
     $flag_latex_header_remove = 'YES';      $flag_latex_header_remove = 'YES';
  } elsif ($urlp=~/\.(sequence|page)$/) {   } elsif ($urlp=~/\.(sequence|page)$/) {
     $result.='\strut\\newline\\noindent\\makebox[\\textwidth/$number_of_columns][b]{\\hrulefill}\\newline\\noindent This is sequence/page '.$urlp.'\strut\\newline\\noindent\\makebox[\\textwidth/$number_of_columns][b]{\\hrulefill}\\newline\\noindent ';      $result.='\strut\newline\noindent Sequence/page '.$urlp.'\strut\newline\noindent\makebox[\textwidth/$number_of_columns][b]{\hrulefill}\newline\noindent ';
  }     }  
     }      }
     if ($helper->{VARS}->{'construction'} eq '1') {$result=~s/(\\typeout)/ RANDOM SEED IS $rndseed $1/;}      if ($helper->{VARS}->{'construction'} eq '1') {$result=~s/(\\begin{document})/$1 \\fbox\{RANDOM SEED IS $rndseed\} /;}
     $result .= '\end{document}';         $result .= '\end{document}';   
  } else {   } else {
   $result.='\documentclass[letterpaper]{article}\usepackage{calc}\begin{document}Printout of this type of document is currently not supported: ';    $result.='\documentclass[letterpaper]{article}\usepackage{calc}\begin{document}Printout of this type of document is currently not supported: ';
Line 769  ENDPART Line 775  ENDPART
  &Apache::lonnet::delenv('form.counter');   &Apache::lonnet::delenv('form.counter');
  &Apache::lonxml::init_counter();   &Apache::lonxml::init_counter();
  for (my $i=0;$i<=$#master_seq;$i++) {   for (my $i=0;$i<=$#master_seq;$i++) {
     $master_seq[$i]=~/___\d+___(.*)$/;      my (undef,undef,$urlp)=&Apache::lonnet::decode_symb($master_seq[$i]);
     my $urlp='/res/'.$1;      $urlp=&Apache::lonnet::clutter($urlp);
     if ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'map_problems') {      if ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'map_problems') {
  $selectionmade = 2;   $selectionmade = 2;
     } elsif ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'map_problems_pages') {      } elsif ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'map_problems_pages') {
Line 779  ENDPART Line 785  ENDPART
  $selectionmade = 4;   $selectionmade = 4;
     }      }
     $form{'symb'}=$master_seq[$i];      $form{'symb'}=$master_seq[$i];
     $master_seq[$i]=~/(.*)___\d*___/;      my ($sequence)=&Apache::lonnet::decode_symb($master_seq[$i]);
     my $assignment=&Apache::lonxml::latex_special_symbols(&Apache::lonnet::gettitle($1),'header'); #tittle of the assignment which contains this problem      my $assignment=&Apache::lonxml::latex_special_symbols(&Apache::lonnet::gettitle($sequence),'header'); #tittle of the assignment which contains this problem
     #&Apache::lonnet::logthis("Trying to get $urlp with symb $master_seq[$i]");      #&Apache::lonnet::logthis("Trying to get $urlp with symb $master_seq[$i]");
     my $texversion=&Apache::lonnet::ssi($urlp,%form);      my $texversion=&Apache::lonnet::ssi($urlp,%form);
     if ($urlp=~/\.page$/) {      if ($urlp=~/\.page$/) {
Line 840  ENDPART Line 846  ENDPART
     &Apache::lonxml::init_counter();      &Apache::lonxml::init_counter();
     foreach my $curresline (@master_seq)  {      foreach my $curresline (@master_seq)  {
  if ($curresline=~ m/\.(problem|exam|quiz|assess|survey|form|library)$/) {   if ($curresline=~ m/\.(problem|exam|quiz|assess|survey|form|library)$/) {
     my ($map,$id,$res_url) = split(/___/,$curresline);      my ($map,$id,$res_url) = &Apache::lonnet::decode_symb($curresline);
     if (&Apache::lonnet::allowed('bre',$res_url)) {      if (&Apache::lonnet::allowed('bre',$res_url)) {
  my $rendered = &Apache::loncommon::get_student_view($curresline,$username,$userdomain,   my $rendered = &Apache::loncommon::get_student_view($curresline,$username,$userdomain,
                                                                         $ENV{'request.course.id'},'tex');                                                                          $ENV{'request.course.id'},'tex');
Line 1029  sub addMessage { Line 1035  sub addMessage {
     Apache::lonhelper::message->new();      Apache::lonhelper::message->new();
 }  }
   
   use Data::Dumper;
   
 sub printHelper {  sub printHelper {
     my $r = shift;      my $r = shift;
   
Line 1074  sub printHelper { Line 1082  sub printHelper {
     # very first screen.      # very first screen.
     # Detect whether we're coming from construction space      # Detect whether we're coming from construction space
     if ($ENV{'form.postdata'}=~/^(?:http:\/\/[^\/]+\/|\/|)\~([^\/]+)\/(.*)$/) {      if ($ENV{'form.postdata'}=~/^(?:http:\/\/[^\/]+\/|\/|)\~([^\/]+)\/(.*)$/) {
         $helper->{VARS}->{'filename'} = "/home/$1/public_html/$2";          $helper->{VARS}->{'filename'} = "~$1/$2";
         $helper->{VARS}->{'construction'} = 1;          $helper->{VARS}->{'construction'} = 1;
     } else {      } else {
         if ($ENV{'form.postdata'}) {          if ($ENV{'form.postdata'}) {
Line 1112  sub printHelper { Line 1120  sub printHelper {
         $subdir = substr($helper->{VARS}->{'filename'},          $subdir = substr($helper->{VARS}->{'filename'},
                          0, rindex($helper->{VARS}->{'filename'}, '/') + 1);                           0, rindex($helper->{VARS}->{'filename'}, '/') + 1);
     } else {      } else {
         ($map, $id, $url) = split(/___/, $symb);          ($map, $id, $url) = &Apache::lonnet::decode_symb($symb);
         $helper->{VARS}->{'postdata'} = Apache::lonnet::clutter($url);          $helper->{VARS}->{'postdata'} = Apache::lonnet::clutter($url);
   
         if (!$resourceTitle) { # if the resource doesn't have a title, use the filename          if (!$resourceTitle) { # if the resource doesn't have a title, use the filename
             my $url = $helper->{VARS}->{'postdata'};              my $postdata = $helper->{VARS}->{'postdata'};
             $resourceTitle = substr($url, rindex($url, '/') + 1);              $resourceTitle = substr($postdata, rindex($postdata, '/') + 1);
         }          }
         $subdir = &Apache::lonnet::filelocation("", $url);          $subdir = &Apache::lonnet::filelocation("", $url);
     }      }
Line 1126  sub printHelper { Line 1134  sub printHelper {
     }      }
   
     my $userCanSeeHidden = Apache::lonnavmaps::advancedUser();      my $userCanSeeHidden = Apache::lonnavmaps::advancedUser();
       my $userPriviledged = ($ENV{'request.role'}=~m/^cc\./ or
      $ENV{'request.role'}=~m/^in\./ or
      $ENV{'request.role'}=~m/^ta\./);
   
     Apache::lonhelper::registerHelperTags();      Apache::lonhelper::registerHelperTags();
   
Line 1137  sub printHelper { Line 1148  sub printHelper {
     # "Remove all duplicate slashes."      # "Remove all duplicate slashes."
     $subdir =~ s|/+|/|g;      $subdir =~ s|/+|/|g;
   
       # If it's a ~ directory, convert back to /home/user/public_html
       $subdir =~ s/^~(\w+)\//\/home\/$1\/public_html\//;
   
     # What can be printed is a very dynamic decision based on      # What can be printed is a very dynamic decision based on
     # lots of factors. So we need to dynamically build this list.      # lots of factors. So we need to dynamically build this list.
     # To prevent security leaks, states are only added to the wizard      # To prevent security leaks, states are only added to the wizard
Line 1151  sub printHelper { Line 1165  sub printHelper {
     my $printChoices = [];      my $printChoices = [];
     my $paramHash;      my $paramHash;
   
     if ($resourceTitle) {      if ($resourceTitle && $helper->{VARS}->{'postdata'}) {
         push @{$printChoices}, ["<b>$resourceTitle</b> (prints what you just saw on the screen)", 'current_document', 'PAGESIZE'];          push @{$printChoices}, ["<b>$resourceTitle</b> (what you just saw on the screen)", 'current_document', 'PAGESIZE'];
     }      }
   
 #    $r->print($helper->{VARS}->{'postdata'});  #    $r->print($helper->{VARS}->{'postdata'});
   
       # Useful filter strings
       my $isProblem = '$res->is_problem()';
       $isProblem .= ' && !$res->randomout()' if !$userCanSeeHidden;
       my $isProblemOrMap = '$res->is_problem() || $res->is_map()';
       my $isNotMap = '!$res->is_map()';
       $isNotMap .= ' && !$res->randomout()' if !$userCanSeeHidden;
       my $isMap = '$res->is_map()';
       my $symbFilter = '$res->symb()';
       my $urlValue = '$res->src()';
   
       $helper->declareVar('SEQUENCE');
   
       # Useful for debugging: Dump the help vars
       #$r->print(Dumper($helper->{VARS}));
       #$r->print($map);
   
     # 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) {
         # Allow problems from sequence          # Allow problems from sequence
         push @{$printChoices}, ["Problem(s) from <b>$sequenceTitle</b>", '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
         push @{$printChoices}, ["Everything (problem(s), page(s), html/xml file(s)) from <b>$sequenceTitle</b>", 'map_problems_pages', 'CHOOSE_PROBLEMS_HTML'];          push @{$printChoices}, ["<b>Resources</b> in $sequenceTitle", 'map_problems_pages', 'CHOOSE_PROBLEMS_HTML'];
   
         my $isProblem = '$res->is_problem()';  
  $isProblem .= ' && !$res->randomout()' if !$userCanSeeHidden;  
         my $isProblemOrMap = '$res->is_problem() || $res->is_map()';  
         my $isNotMap = '!$res->is_map()';  
  $isNotMap .= ' && !$res->randomout()' if !$userCanSeeHidden;  
         my $symb = '$res->symb()';  
         my $helperFragment = <<HELPERFRAGMENT;          my $helperFragment = <<HELPERFRAGMENT;
   <state name="CHOOSE_PROBLEMS" title="Select Problem(s) to print">    <state name="CHOOSE_PROBLEMS" title="Select Problem(s) to print">
     <message>(mark them then click "next" button) <br /></message>      <message>(mark them then click "next" button) <br /></message>
     <resource variable="RESOURCES" multichoice="1" toponly='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>$map</mapurl>        <mapurl>$map</mapurl>
       <valuefunc>return $symb;</valuefunc>        <valuefunc>return $symbFilter;</valuefunc>
       </resource>        </resource>
     </state>      </state>
   
   <state name="CHOOSE_PROBLEMS_HTML" title="Select Resource(s) to print">    <state name="CHOOSE_PROBLEMS_HTML" title="Select Resource(s) to print">
     <message>(mark them then click "next" button) <br /></message>      <message>(mark them then click "next" button) <br /></message>
     <resource variable="RESOURCES" multichoice="1" toponly='1'>      <resource variable="RESOURCES" multichoice="1" toponly='1' addstatus="1">
       <nextstate>PAGESIZE</nextstate>        <nextstate>PAGESIZE</nextstate>
       <filterfunc>return $isNotMap;</filterfunc>        <filterfunc>return $isNotMap;</filterfunc>
       <mapurl>$map</mapurl>        <mapurl>$map</mapurl>
       <valuefunc>return $symb;</valuefunc>        <valuefunc>return $symbFilter;</valuefunc>
       </resource>        </resource>
     </state>      </state>
 HELPERFRAGMENT  HELPERFRAGMENT
Line 1197  HELPERFRAGMENT Line 1222  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 ($userPriviledged && ($helper->{VARS}->{'postdata'}=~/\/res\//)) { 
         push @{$printChoices}, ['<b>Problems</b> in this course', 'all_problems', 'ALL_PROBLEMS'];          push @{$printChoices}, ['Problems from <b>entire course</b>', 'all_problems', 'ALL_PROBLEMS'];
         push @{$printChoices}, ["Problems from <b>$sequenceTitle</b> for selected students", 'problems_for_students', 'CHOOSE_STUDENTS'];   if ($sequenceTitle) {
       push @{$printChoices}, ["Problems from $sequenceTitle for <b>selected students</b>", 'problems_for_students', 'CHOOSE_STUDENTS'];
         my $isProblem = '$res->is_problem()';   }
  $isProblem .= ' && !$res->randomout()' if !$userCanSeeHidden;  
         my $isProblemOrMap = '($res->is_problem() || $res->is_map())';  
  $isProblemOrMap .= ' && !$res->randomout()' if !$userCanSeeHidden;  
         my $symb = '$res->symb()';  
         &Apache::lonxml::xmlparse($r, 'helper', <<CHOOSE_STUDENTS);          &Apache::lonxml::xmlparse($r, 'helper', <<CHOOSE_STUDENTS);
   <state name="ALL_PROBLEMS" title="Select Problem(s) to print">    <state name="ALL_PROBLEMS" title="Select Problem(s) to print">
     <message>(mark them then click "next" button) <br /></message>      <message>(mark them then click "next" button) <br /></message>
     <resource variable="RESOURCES" multichoice="1" suppressEmptySequences='1'>      <resource variable="RESOURCES" multichoice="1"
    suppressEmptySequences='1' addstatus="1">
       <nextstate>PAGESIZE</nextstate>        <nextstate>PAGESIZE</nextstate>
       <filterfunc>return $isProblemOrMap;</filterfunc>        <filterfunc>return $isProblemOrMap;</filterfunc>
       <choicefunc>return $isProblem;</choicefunc>        <choicefunc>return $isProblem;</choicefunc>
       <valuefunc>return $symb;</valuefunc>        <valuefunc>return $symbFilter;</valuefunc>
       </resource>        </resource>
     </state>      </state>
   
   <state name="CHOOSE_STUDENTS" title="Select Students and Resources">    <state name="CHOOSE_STUDENTS" title="Select Students and Resources">
     <student multichoice='1' variable="STUDENTS" nextstate="PAGESIZE" />      <student multichoice='1' variable="STUDENTS" nextstate="PAGESIZE" />
     <message><br /><big><i><b>Select resources for the assignment</b></i></big><br /></message>      <message><br /><big><i><b>Select resources for the assignment</b></i></big><br /></message>
     <resource variable="RESOURCES" multichoice="1">      <resource variable="RESOURCES" multichoice="1" addstatus="1">
       <filterfunc>return $isProblem</filterfunc>        <filterfunc>return $isProblem</filterfunc>
       <mapurl>$map</mapurl>        <mapurl>$map</mapurl>
       <valuefunc>return $symb</valuefunc>        <valuefunc>return $symbFilter</valuefunc>
       </resource>        </resource>
     <message><br /><big><i><b>How should the results be printed?</b></i></big><br /></message>      <message><br /><big><i><b>How should the results be printed?</b></i></big><br /></message>
     <choices variable="EMPTY_PAGES">      <choices variable="EMPTY_PAGES">
Line 1237  CHOOSE_STUDENTS Line 1260  CHOOSE_STUDENTS
     }      }
   
     # 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 $ENV{'request.role.adv'}) {          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 $ENV{'request.role.adv'} and $subdir ne '/home/httpd/html/res/') {    
         push @{$printChoices}, ["Problems from current subdirectory <b>$subdir</b>", 'problems_from_directory', 'CHOOSE_FROM_SUBDIR'];          push @{$printChoices}, ["Problems from current subdirectory <b>$subdir</b>", 'problems_from_directory', 'CHOOSE_FROM_SUBDIR'];
           
         my $f = '$filename';          my $f = '$filename';
         my $xmlfrag = <<CHOOSE_FROM_SUBDIR;          my $xmlfrag = <<CHOOSE_FROM_SUBDIR;
   <state name="CHOOSE_FROM_SUBDIR" title="Select File(s) from <b><small>$subdir</small></b> to print">    <state name="CHOOSE_FROM_SUBDIR" title="Select File(s) from <b><small>$subdir</small></b> to print">
Line 1249  CHOOSE_STUDENTS Line 1272  CHOOSE_STUDENTS
       <filechoice>return '$subdir';</filechoice>        <filechoice>return '$subdir';</filechoice>
 CHOOSE_FROM_SUBDIR  CHOOSE_FROM_SUBDIR
                   
           # this is broken up because I really want interpolation above,
           # and I really DON'T want it below
         $xmlfrag .= <<'CHOOSE_FROM_SUBDIR';          $xmlfrag .= <<'CHOOSE_FROM_SUBDIR';
       <filefilter>return Apache::lonhelper::files::not_old_version($filename) &&        <filefilter>return Apache::lonhelper::files::not_old_version($filename) &&
   $filename =~ m/\.(problem|exam|quiz|assess|survey|form|library)$/;    $filename =~ m/\.(problem|exam|quiz|assess|survey|form|library)$/;
Line 1259  CHOOSE_FROM_SUBDIR Line 1284  CHOOSE_FROM_SUBDIR
         &Apache::lonxml::xmlparse($r, 'helper', $xmlfrag);          &Apache::lonxml::xmlparse($r, 'helper', $xmlfrag);
     }      }
   
       # Allow the user to select any sequence in the course, feed it to
       # another resource selector for that sequence
       push @$printChoices, ["Resources from <b>selected sequence</b> in course",
                             'map_problems_pages', 'CHOOSE_SEQUENCE'];
       &Apache::lonxml::xmlparse($r, 'helper', <<CHOOSE_FROM_ANY_SEQUENCE);
     <state name="CHOOSE_SEQUENCE" title="Select Sequence To Print From">
       <message>Select the sequence to print resources from:</message>
       <resource variable="SEQUENCE">
         <nextstate>CHOOSE_FROM_ANY_SEQUENCE</nextstate>
         <filterfunc>return \$res->is_sequence;</filterfunc>
         <valuefunc>return $urlValue;</valuefunc>
         </resource>
       </state>
     <state name="CHOOSE_FROM_ANY_SEQUENCE" title="Select Resources To Print">
       <message>(mark desired resources then click "next" button) <br /></message>
       <resource variable="RESOURCES" multichoice="1" toponly='1' addstatus="1">
         <nextstate>PAGESIZE</nextstate>
         <filterfunc>return $isProblem</filterfunc>
         <mapurl evaluate='1'>return $helper->{VARS}->{'SEQUENCE'};</mapurl>
         <valuefunc>return $symbFilter;</valuefunc>
         </resource>
       </state>
   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();
Line 1280  CHOOSE_FROM_SUBDIR Line 1329  CHOOSE_FROM_SUBDIR
  $paramHash->{'variable'} = 'ANSWER_TYPE';      $paramHash->{'variable'} = 'ANSWER_TYPE';   
  $helper->declareVar('ANSWER_TYPE');            $helper->declareVar('ANSWER_TYPE');         
         $paramHash->{CHOICES} = [          $paramHash->{CHOICES} = [
                                    ['Yes', 'yes'],                                     ['No', 'yes'],
                                    ['No', 'no'] ];                                     ['Yes', 'no'] ];
         Apache::lonhelper::dropdown->new();          Apache::lonhelper::dropdown->new();
  addMessage("</td></tr>");   addMessage("</td></tr>");
  $startedTable = 1;   $startedTable = 1;

Removed from v.1.227  
changed lines
  Added in v.1.238


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