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

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 17 Sep 2003 17:32:56 -0000


albertel		Wed Sep 17 13:32:56 2003 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
    /loncom/interface/spreadsheet	assesscalc.pm 
  Log:
  - decode_symb
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.235 loncom/interface/lonprintout.pm:1.236
--- loncom/interface/lonprintout.pm:1.235	Tue Sep 16 16:03:12 2003
+++ loncom/interface/lonprintout.pm	Wed Sep 17 13:32:56 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.235 2003/09/16 20:03:12 bowersj2 Exp $
+# $Id: lonprintout.pm,v 1.236 2003/09/17 17:32:56 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -775,8 +775,8 @@
 	&Apache::lonnet::delenv('form.counter');
 	&Apache::lonxml::init_counter();
 	for (my $i=0;$i<=$#master_seq;$i++) {
-	    $master_seq[$i]=~/___\d+___(.*)$/;
-	    my $urlp='/res/'.$1;
+	    my (undef,undef,$urlp)=&Apache::lonnet::decode_symb($master_seq[$i]);
+	    $urlp=&Apache::lonnet::declutter($urlp);
 	    if ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'map_problems') {
 		$selectionmade = 2;
 	    } elsif ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'map_problems_pages') {
@@ -785,8 +785,8 @@
 		$selectionmade = 4;
 	    }
 	    $form{'symb'}=$master_seq[$i];
-	    $master_seq[$i]=~/(.*)___\d*___/;
-	    my $assignment=&Apache::lonxml::latex_special_symbols(&Apache::lonnet::gettitle($1),'header'); #tittle of the assignment which contains this problem
+	    my ($sequence)=&Apache::lonnet::decode_symb($master_seq[$i]);
+	    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]");
 	    my $texversion=&Apache::lonnet::ssi($urlp,%form);
 	    if ($urlp=~/\.page$/) {
Index: loncom/interface/spreadsheet/assesscalc.pm
diff -u loncom/interface/spreadsheet/assesscalc.pm:1.22 loncom/interface/spreadsheet/assesscalc.pm:1.23
--- loncom/interface/spreadsheet/assesscalc.pm:1.22	Fri Sep 12 15:00:54 2003
+++ loncom/interface/spreadsheet/assesscalc.pm	Wed Sep 17 13:32:56 2003
@@ -1,5 +1,5 @@
 #
-# $Id: assesscalc.pm,v 1.22 2003/09/12 19:00:54 matthew Exp $
+# $Id: assesscalc.pm,v 1.23 2003/09/17 17:32:56 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -563,7 +563,7 @@
     my @Mandatory_parameters = @_;
     my %parameters_and_names;
     #
-    my ($symap,$syid,$srcf)=split(/___/,$self->{'symb'});
+    my ($symap,$syid,$srcf) = &Apache::lonnet::decode_symb($self->{'symb'});
     my @Metadata = split(/\,/,&Apache::lonnet::metadata($srcf,'keys'));
     foreach my $parm (@Mandatory_parameters,@Metadata) {
         next if ($parm !~ /^(resource\.|stores|parameter)_/);