[LON-CAPA-cvs] cvs: loncom /xml lonxml.pm

raeburn lon-capa-cvs@mail.lon-capa.org
Wed, 15 Jun 2005 13:06:43 -0000


raeburn		Wed Jun 15 09:06:43 2005 EDT

  Modified files:              
    /loncom/xml	lonxml.pm 
  Log:
  Change so students can view embedded images in HTML pages uploaded via DOCS.
  
  
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.375 loncom/xml/lonxml.pm:1.376
--- loncom/xml/lonxml.pm:1.375	Wed Jun  8 22:12:26 2005
+++ loncom/xml/lonxml.pm	Wed Jun 15 09:06:41 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.375 2005/06/09 02:12:26 albertel Exp $
+# $Id: lonxml.pm,v 1.376 2005/06/15 13:06:41 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1065,7 +1065,12 @@
 
 sub writeallows {
     unless ($#extlinks>=0) { return; }
-    my $thisurl='/res/'.&Apache::lonnet::declutter(shift);
+    my $thisurl = &Apache::lonnet::declutter(shift);
+    if ($thisurl =~ /^uploaded/) {
+        $thisurl = '/'.$thisurl;
+    } else {
+        $thisurl='/res/'.$thisurl;
+    }
     if ($env{'httpref.'.$thisurl}) {
 	$thisurl=$env{'httpref.'.$thisurl};
     }