[LON-CAPA-cvs] cvs: loncom /homework grades.pm

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


albertel		Wed Sep 17 13:43:34 2003 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  - decode_symb
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.136 loncom/homework/grades.pm:1.137
--- loncom/homework/grades.pm:1.136	Tue Sep  9 14:46:28 2003
+++ loncom/homework/grades.pm	Wed Sep 17 13:43:34 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.136 2003/09/09 18:46:28 www Exp $
+# $Id: grades.pm,v 1.137 2003/09/17 17:43:34 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2733,7 +2733,9 @@
     $result.='<form action="/adm/grades" method="post" name="displayPage">'."\n";
     $result.='&nbsp;<b>Problems from:</b> <select name="selectpage">'."\n";
     my ($titles,$symbx) = &getSymbMap($request);
-    my ($curpage,$type,$mapId) = ($symb =~ /(.*?\.(page|sequence))___(\d+)___/); 
+    my ($curpage) =&Apache::lonnet::decode_symb($symb); 
+#    my ($curpage,$mapId) =&Apache::lonnet::decode_symb($symb); 
+#    my $type=($curpage =~ /\.(page|sequence)/);
     my $ctr=0;
     foreach (@$titles) {
 	my ($minder,$showtitle) = ($_ =~ /(\d+)\.(.*)/);
@@ -3135,7 +3137,7 @@
     my ($request,$symb)=@_;
     my $result='<select name="selectpage">'."\n";
     my ($titles,$symbx) = &getSymbMap($request);
-    my ($curpage,$type,$mapId) = ($symb =~ /(.*?\.(page|sequence))___(\d+)___/); 
+    my ($curpage)=&Apache::lonnet::decode_symb($symb); 
     my $ctr=0;
     foreach (@$titles) {
 	my ($minder,$showtitle) = ($_ =~ /(\d+)\.(.*)/);
@@ -3620,7 +3622,7 @@
 		my ($tsymb,$tuname,$tudom,$tcrsid)=
 		    &Apache::lonnet::checkin($token);
 		if ($tsymb) {
-		    my ($map,$id,$url)=split(/\_\_\_/,$tsymb);
+		    my ($map,$id,$url)=&Apache::lonnet::decode_symb($tsymb);
 		    if (&Apache::lonnet::allowed('mgr',$tcrsid)) {
 			$request->print(&Apache::lonnet::ssi_body('/res/'.$url,
 					  ('grade_username' => $tuname,