[LON-CAPA-cvs] cvs: loncom(version_1_0_1) /homework response.pm structuretags.pm

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 06 Oct 2003 21:57:54 -0000


albertel		Mon Oct  6 17:57:54 2003 EDT

  Modified files:              (Branch: version_1_0_1)
    /loncom/homework	structuretags.pm response.pm 
  Log:
  - new metadata info <partorder></partorder> contains a , seperted list of parts in order.
  
  
  
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.200.2.2 loncom/homework/structuretags.pm:1.200.2.3
--- loncom/homework/structuretags.pm:1.200.2.2	Fri Oct  3 11:27:56 2003
+++ loncom/homework/structuretags.pm	Mon Oct  6 17:57:53 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.200.2.2 2003/10/03 15:27:56 albertel Exp $
+# $Id: structuretags.pm,v 1.200.2.3 2003/10/06 21:57:53 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -543,6 +543,7 @@
 	    @Apache::inputtags::response=();
 	    $result=&Apache::response::mandatory_part_meta;
 	}
+	$result.=&Apache::response::meta_part_order;
     } elsif ($target eq 'edit') {
 	&Apache::lonxml::debug("in end_problem with $target, edit");
 	$result = &problem_edit_footer();
Index: loncom/homework/response.pm
diff -u loncom/homework/response.pm:1.85 loncom/homework/response.pm:1.86
--- loncom/homework/response.pm:1.85	Mon Sep 22 16:49:01 2003
+++ loncom/homework/response.pm	Mon Oct  6 17:57:54 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # various response type definitons response definition
 #
-# $Id: response.pm,v 1.85 2003/09/22 20:49:01 albertel Exp $
+# $Id: response.pm,v 1.86 2003/10/06 21:57:54 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -178,6 +178,16 @@
 # Note: responseid-specific data 'submission' and 'awarddetail'
 # not available to spreadsheet -> skip here
 #
+}
+
+sub meta_part_order {
+    if (@Apache::inputtags::partlist) {
+	my @parts=@Apache::inputtags::partlist;
+	shift(@parts);
+	return '<partorder>'.join(',',@parts).'</partorder>';
+    } else {
+	return '<partorder>0</partorder>';
+    }
 }
 
 sub check_for_previous {