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

www lon-capa-cvs@mail.lon-capa.org
Fri, 03 Jun 2005 14:25:51 -0000


www		Fri Jun  3 10:25:51 2005 EDT

  Modified files:              
    /loncom/interface	lonparmset.pm 
  Log:
  parmlev 'brief' does not exist
  
  
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.202 loncom/interface/lonparmset.pm:1.203
--- loncom/interface/lonparmset.pm:1.202	Thu Jun  2 18:03:18 2005
+++ loncom/interface/lonparmset.pm	Fri Jun  3 10:25:49 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.202 2005/06/02 22:03:18 www Exp $
+# $Id: lonparmset.pm,v 1.203 2005/06/03 14:25:49 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -217,6 +217,10 @@
     }
 }
 
+sub resetsymbcache {
+    $symbsid='';
+}
+
 sub symbcache {
     my $id=shift;
     if ($symbsid ne $env{'request.course.id'}) {
@@ -576,7 +580,7 @@
     }
     my $parm=$$display{$which};
 
-    if ($parmlev eq 'full' || $parmlev eq 'brief') {
+    if ($parmlev eq 'full') {
         $r->print('<td bgcolor='.$defbgtwo.' align="center">'
                   .$$part{$which}.'</td>');
     } else {    
@@ -611,40 +615,28 @@
 
         &print_td($r,11,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
 
-        if ($parmlev eq 'brief') {
-
-           &print_td($r,7,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
-
-           if ($csec) {
-               &print_td($r,4,$defbgtwo,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
-           }
-           if ($uname) {
-               &print_td($r,1,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
-           }
-        } else {
-
-           &print_td($r,10,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
-           &print_td($r,9,'#FFDDDD',$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
-           &print_td($r,8,'#FFDDDD',$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
-           &print_td($r,7,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
+	&print_td($r,10,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
+	&print_td($r,9,'#FFDDDD',$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
+	&print_td($r,8,'#FFDDDD',$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
+	&print_td($r,7,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
+	
+	if ($csec) {
+	    &print_td($r,6,$defbgtwo,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
+	    &print_td($r,5,$defbgtwo,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
+	    &print_td($r,4,$defbgtwo,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
+	}
+	if ($uname) {
+	    &print_td($r,3,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
+	    &print_td($r,2,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
+	    &print_td($r,1,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
+	}
 
-           if ($csec) {
-               &print_td($r,6,$defbgtwo,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
-               &print_td($r,5,$defbgtwo,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
-               &print_td($r,4,$defbgtwo,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
-           }
-           if ($uname) {
-               &print_td($r,3,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
-               &print_td($r,2,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
-               &print_td($r,1,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
-           }
-        } # end of $brief if/else
     } # end of $parmlev if/else
 
     $r->print('<td bgcolor=#CCCCFF align="center">'.
                   &valout($outpar[$result],$typeoutpar[$result]).'</td>');
 
-    if ($parmlev eq 'full' || $parmlev eq 'brief') {
+    if ($parmlev eq 'full') {
         my $sessionval=&Apache::lonnet::EXT('resource.'.$$part{$which}.
                                         '.'.$$name{$which},$$symbp{$rid});
 
@@ -1156,7 +1148,7 @@
         my $csuname=$env{'user.name'};
         my $csudom=$env{'user.domain'};
 
-        if ($parmlev eq 'full' || $parmlev eq 'brief') {
+        if ($parmlev eq 'full') {
            my $coursespan=$csec?8:5;
            $r->print('<p><table border=2>');
            $r->print('<tr><td colspan=5></td>');
@@ -1302,7 +1294,7 @@
             } # end foreach ids
 # -------------------------------------------------- End entry for one resource
             $r->print('</table>');
-        } # end of  brief/full
+        } # end of  full
 #--------------------------------------------------- Entry for parm level map
         if ($parmlev eq 'map') {
             my $defbgone = '"E0E099"';
@@ -2173,6 +2165,7 @@
 					    text=>"Parameter Manager",
 					    faq=>9,
 					    bug=>'Instructor Interface'});
+
 # ----------------------------------------------------- Needs to be in a course
     my $parm_permission =
 	(&Apache::lonnet::allowed('opa',$env{'request.course.id'}) ||
@@ -2184,6 +2177,11 @@
         &Apache::loncommon::content_type($r,'text/html');
         $r->send_http_header;
 
+
+        # id numbers can change on re-ordering of folders
+
+        &resetsymbcache();
+
         #
         # Main switch on form.action and form.state, as appropriate
         #