[LON-CAPA-cvs] cvs: loncom / loncapa_apache.conf /homework structuretags.pm /publisher lonpubdir.pm
www
lon-capa-cvs@mail.lon-capa.org
Thu, 17 Jul 2003 13:50:44 -0000
www Thu Jul 17 09:50:44 2003 EDT
Modified files:
/loncom loncapa_apache.conf
/loncom/homework structuretags.pm
/loncom/publisher lonpubdir.pm
Log:
Bug #1728: style files can be editied in CSTR space
Index: loncom/loncapa_apache.conf
diff -u loncom/loncapa_apache.conf:1.55 loncom/loncapa_apache.conf:1.56
--- loncom/loncapa_apache.conf:1.55 Mon Jul 7 03:32:16 2003
+++ loncom/loncapa_apache.conf Thu Jul 17 09:50:44 2003
@@ -1,7 +1,7 @@
##
## loncapa_apache.conf -- Apache HTTP LON-CAPA configuration file
##
-## $Id: loncapa_apache.conf,v 1.55 2003/07/07 07:32:16 www Exp $
+## $Id: loncapa_apache.conf,v 1.56 2003/07/17 13:50:44 www Exp $
##
#
@@ -211,6 +211,11 @@
<LocationMatch "^/(res|\~).*\.(problem|exam|quiz|assess|survey|form|library)$">
SetHandler perl-script
PerlHandler Apache::lonhomework
+</LocationMatch>
+
+<LocationMatch "^/\~.*\.sty$">
+SetHandler perl-script
+PerlHandler Apache::lonxml
</LocationMatch>
<LocationMatch "^/adm/wrapper/">
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.196 loncom/homework/structuretags.pm:1.197
--- loncom/homework/structuretags.pm:1.196 Wed Jul 16 15:36:02 2003
+++ loncom/homework/structuretags.pm Thu Jul 17 09:50:44 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: structuretags.pm,v 1.196 2003/07/16 19:36:02 www Exp $
+# $Id: structuretags.pm,v 1.197 2003/07/17 13:50:44 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -39,7 +39,7 @@
BEGIN {
&Apache::lonxml::register('Apache::structuretags',('block','languageblock','instructorcomment','while','randomlist','problem','library','web','tex','part','preduedate','postanswerdate','solved','notsolved','startouttext','endouttext',
-'simpleeditbutton'));
+'simpleeditbutton','definetag'));
}
sub start_web {
@@ -594,6 +594,30 @@
$result.='</form></body>'.&Apache::lonxml::xmlend();
}
return $result;
+}
+
+sub start_definetag {
+ my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
+
+ my $result;
+
+ my $name = $token->[2]->{'name'};
+ my $skip=&Apache::lonxml::get_all_text("/definetag",$parser);
+ if ($name=~/^\//) {
+ $result=
+ '<br /><table bgcolor="#FFBBBB"><tr><th>END <tt>'.$name.'</tt></th></tr>';
+ } else {
+ $result=
+ '<br /><table bgcolor="#BBFFBB"><tr><th>BEGIN <tt>'.$name.'</tt></th></tr>';
+ }
+ $skip=~s/\</\<\;/gs;
+ $skip=~s/\>/\>\;/gs;
+ $result.='<tr><td><pre>'.$skip.'</pre></td></tr></table>';
+ return $result;
+}
+
+sub end_definetag {
+ return '';
}
sub start_block {
Index: loncom/publisher/lonpubdir.pm
diff -u loncom/publisher/lonpubdir.pm:1.35 loncom/publisher/lonpubdir.pm:1.36
--- loncom/publisher/lonpubdir.pm:1.35 Sat Jul 5 06:07:12 2003
+++ loncom/publisher/lonpubdir.pm Thu Jul 17 09:50:44 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Construction Space Directory Lister
#
-# $Id: lonpubdir.pm,v 1.35 2003/07/05 10:07:12 www Exp $
+# $Id: lonpubdir.pm,v 1.36 2003/07/17 13:50:44 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -311,7 +311,7 @@
$thisdisfn.'/'.$filename.'" target=cat>Retrieve</a>';
}
my $editlink='';
- if ($filename=~/\.(xml|html|htm|xhtml|xhtm)$/) {
+ if ($filename=~/\.(xml|html|htm|xhtml|xhtm|sty)$/) {
$editlink=' (<a href="'.$linkdir.'/'.$filename.'?forceedit=1" target="_top">Edit</a>)';
}
if ($filename=~/\.(problem|exam|quiz|assess|survey|form|library)$/) {