[LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm

sakharuk lon-capa-cvs@mail.lon-capa.org
Wed, 18 Sep 2002 19:41:06 -0000


sakharuk		Wed Sep 18 15:41:06 2002 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
  Log:
  Corrected other printing options. The printing of all problems in the course needs some additional work - I'm doing this.
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.68 loncom/interface/lonprintout.pm:1.69
--- loncom/interface/lonprintout.pm:1.68	Wed Sep 18 14:47:04 2002
+++ loncom/interface/lonprintout.pm	Wed Sep 18 15:41:06 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.68 2002/09/18 18:47:04 sakharuk Exp $
+# $Id: lonprintout.pm,v 1.69 2002/09/18 19:41:06 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -392,7 +392,7 @@
 		my %moreenv;
 		$moreenv{'form.grade_target'}='tex';
 		&Apache::lonnet::appenv(%moreenv);
-		my $texversion=&Apache::lonnet::ssi($urlp);
+		my $texversion=&Apache::lonnet::ssi($urlp,('symb'=>$symb));
 		&Apache::lonnet::delenv('form.grade_target');
 		$result .= $texversion;    
 	    }
@@ -405,7 +405,7 @@
 	my @file_seq = &coming_from_hash($main_seq); 
         #-- produce an output string
 	for (my $i=0;$i<=$#file_seq;$i++) {
-            my $urlp = $file_seq[$i];
+            my ($urlp,$symb) = split /&&/, $file_seq[$i];
 	    $urlp=~s/\/home\/httpd\/html//;	    
             if ($urlp=~m/\.(problem|exam|quiz|assess|survey|form|library)/) {
 		my %moreenv;
@@ -437,11 +437,11 @@
 	    my ($usersection,$username,$userdomain) = split /:/,$person;
 	    my $fullname = &Apache::grades::get_fullname($username,$userdomain);
             #goes through all resources, checks if they are available for current student, and produces output 
-	    foreach my $curres (@master_seq)  {
+	    foreach my $curresline (@master_seq)  {
+		my ($curres,$symb) = split /&&/, $curresline;
 		$curres =~ s/^"//;
 		$curres =~ s/"$//;
                 if ($curres=~/\w+/) {
-		    my $symb = &Apache::lonnet::symbread($curres);
 		    my ($map,$id,$res_url) = split(/___/,$symb);
 		    if (&Apache::lonnet::allowed('bre',$res_url)) {
 			my $rendered = &Apache::loncommon::get_student_view($symb,$username,$userdomain,
@@ -610,30 +610,6 @@
     }
     return @resourcelist;
 }
-#sub coming_from_hash {
-#
-#    my $mainsequence = shift;
-#    my @resourcelist = ();
-#    my $mapid = $hash{'map_pc_'.$mainsequence};
-#    my $mapstart = $hash{'map_start_'.$mainsequence};
-#    my $mapfinish = $hash{'map_finish_'.$mainsequence};
-#    my $current_resource = $mapstart;
-#    while ($current_resource ne $mapfinish) {
-#	if (not $hash{'src_'.$current_resource}=~/\.sequence$/) {
-#	    push @resourcelist,$hash{'src_'.$current_resource};
-#	} else {
-#	    push @resourcelist,&coming_from_hash($hash{'src_'.$current_resource});
-#	}
-#	$current_resource = $hash{'goesto_'.$hash{'to_'.$current_resource}};
-#    }
-#    #needs if final resource in the map (type="finish") contains something
-#    if (not $hash{'src_'.$current_resource}=~/\.sequence$/) {
-#	push @resourcelist,$hash{'src_'.$current_resource};
-#    } else {
-#	push @resourcelist,&coming_from_hash($hash{'src_'.$current_resource});
-#    }
-#    return @resourcelist;
-#}
 
 
 sub character_chart {