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

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 02 Jul 2004 08:14:41 -0000


albertel		Fri Jul  2 04:14:41 2004 EDT

  Modified files:              
    /loncom/homework	structuretags.pm 
  Log:
  - allow type parm to be set on a part  by part basis BUG#3121
  
  
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.258 loncom/homework/structuretags.pm:1.259
--- loncom/homework/structuretags.pm:1.258	Tue Jun 29 18:32:12 2004
+++ loncom/homework/structuretags.pm	Fri Jul  2 04:14:41 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: structuretags.pm,v 1.258 2004/06/29 22:32:12 albertel Exp $
+# $Id: structuretags.pm,v 1.259 2004/07/02 08:14:41 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1042,7 +1042,11 @@
     @Apache::inputtags::previous_version=();
     $Apache::lonhomework::problemstatus=&get_problem_status($id);
     my $hidden=&Apache::loncommon::check_if_partid_hidden($Apache::inputtags::part);
+    my $newtype=&Apache::lonnet::EXT("resource.$id.type");
+    if ($newtype) { $Apache::lonhomework::type=$newtype; }
+
     my $expression='$external::part=\''.$Apache::inputtags::part.'\';';
+    $expression.='$external::type=\''.$Apache::lonhomework::type.'\';';
     &Apache::run::run($expression,$safeeval);
 
     if ($target eq 'meta') {