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

www lon-capa-cvs@mail.lon-capa.org
Mon, 13 Nov 2006 22:32:56 -0000


www		Mon Nov 13 17:32:56 2006 EDT

  Modified files:              
    /loncom/interface	londocs.pm 
  Log:
  Bug #4186: DOCS log
  
  
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.251 loncom/interface/londocs.pm:1.252
--- loncom/interface/londocs.pm:1.251	Mon Nov 13 12:20:29 2006
+++ loncom/interface/londocs.pm	Mon Nov 13 17:32:56 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.251 2006/11/13 17:20:29 www Exp $
+# $Id: londocs.pm,v 1.252 2006/11/13 22:32:56 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1027,7 +1027,6 @@
         my ($plain)=@_;
         my %storehash=('folder' => $plain);
         if ($parmidx) {
-           $storehash{'parameter_idx'}=$parmidx;
            $storehash{'parameter_res'}=$oldresources[$parmidx];
            foreach my $parm (keys %parmaction) {
               $storehash{'parameter_action_'.$parm}=$parmaction{$parm};
@@ -1045,10 +1044,8 @@
               $changedflag=1;
            }
            if ($LONCAPA::map::order[$idx] ne $oldorder[$idx]) {
-              $storehash{'before_order_'.$idx}=$oldorder[$idx];
-              $storehash{'after_order_'.$idx}=$LONCAPA::map::order[$idx];
-              $storehash{'before_order_res_'.$idx}=$oldresources[$idx];
-              $storehash{'after_order_res_'.$idx}=$LONCAPA::map::resources[$idx];
+              $storehash{'before_order_res_'.$idx}=$oldresources[$oldorder[$idx]];
+              $storehash{'after_order_res_'.$idx}=$LONCAPA::map::resources[$LONCAPA::map::order[$idx]];
               $changedflag=1;
            }
         }
@@ -1125,9 +1122,16 @@
 	    my $oldname=(split(/\:/,$docslog{$id}{'logentry'}{'before_resources_'.$idx}))[0];
 	    my $newname=(split(/\:/,$docslog{$id}{'logentry'}{'after_resources_'.$idx}))[0];
 	    if ($oldname ne $newname) {
-		$r->print(&LONCAPA::map::qtunescape($oldname));
+		$r->print(&LONCAPA::map::qtescape($oldname));
 	    }
 	}
+	$r->print('<ul>');
+	for (my $idx=0;$idx<=$docslog{$id}{'logentry'}{'maxidx'};$idx++) {
+            if ($docslog{$id}{'logentry'}{'before_order_res_'.$idx}) {
+		$r->print('<li>'.&LONCAPA::map::qtescape((split(/\:/,$docslog{$id}{'logentry'}{'before_order_res_'.$idx}))[0]).'</li>');
+	    }
+	}
+	$r->print('</ul>');
 # After
         $r->print('</td><td>');
 
@@ -1135,9 +1139,26 @@
 	    my $oldname=(split(/\:/,$docslog{$id}{'logentry'}{'before_resources_'.$idx}))[0];
 	    my $newname=(split(/\:/,$docslog{$id}{'logentry'}{'after_resources_'.$idx}))[0];
 	    if ($oldname ne $newname) {
-		$r->print(&LONCAPA::map::qtunescape($newname));
+		$r->print(&LONCAPA::map::qtescape($newname));
 	    }
 	}        
+	$r->print('<ul>');
+	for (my $idx=0;$idx<=$docslog{$id}{'logentry'}{'maxidx'};$idx++) {
+            if ($docslog{$id}{'logentry'}{'after_order_res_'.$idx}) {
+		$r->print('<li>'.&LONCAPA::map::qtescape((split(/\:/,$docslog{$id}{'logentry'}{'after_order_res_'.$idx}))[0]).'</li>');
+	    }
+	}
+	$r->print('</ul>');
+	if ($docslog{$id}{'logentry'}{'parameter_res'}) {
+	    $r->print(&LONCAPA::map::qtescape((split(/\:/,$docslog{$id}{'logentry'}{'parameter_res'}))[0]).':<ul>');
+	    foreach my $parameter ('randompick','hiddenresource','encrypturl]') {
+		if ($docslog{$id}{'logentry'}{'parameter_action_'.$parameter}) {
+		    $r->print('<li>'.$parameter.' '.$docslog{$id}{'logentry'}{'parameter_action_'.$parameter}.' '.
+			      $docslog{$id}{'logentry'}{'parameter_value_'.$parameter}.'</li>');
+		}
+	    }
+	    $r->print('</ul>');
+	}
 # End
         $r->print('</td>'.&Apache::loncommon::end_data_table_row());
         $shown++;