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

bowersj2 lon-capa-cvs@mail.lon-capa.org
Fri, 28 Feb 2003 23:19:02 -0000


bowersj2		Fri Feb 28 18:19:02 2003 EDT

  Modified files:              
    /loncom/interface	loncoursedata.pm 
  Log:
  Corrects documentation for get_classlist, and adds constants that can
  be used to future-proof clients against later changes to the order.
  
  
  
Index: loncom/interface/loncoursedata.pm
diff -u loncom/interface/loncoursedata.pm:1.53 loncom/interface/loncoursedata.pm:1.54
--- loncom/interface/loncoursedata.pm:1.53	Fri Feb 28 15:41:27 2003
+++ loncom/interface/loncoursedata.pm	Fri Feb 28 18:19:01 2003
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: loncoursedata.pm,v 1.53 2003/02/28 20:41:27 matthew Exp $
+# $Id: loncoursedata.pm,v 1.54 2003/02/28 23:19:01 bowersj2 Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1687,12 +1687,25 @@
 
 Returns a reference to a hash which contains:
  keys    '$sname:$sdom'
- values  [$end,$start,$id,$section,$fullname]
+ values  [$sdom,$sname,$end,$start,$id,$section,$fullname,$status]
+
+The constant values CL_SDOM, CL_SNAME, CL_END, etc. can be used
+as indices into the returned list to future-proof clients against
+changes in the list order.
 
 =cut
 
 ################################################
 ################################################
+
+sub CL_SDOM     { return 0; }
+sub CL_SNAME    { return 1; }
+sub CL_END      { return 2; }
+sub CL_START    { return 3; }
+sub CL_ID       { return 4; }
+sub CL_SECTION  { return 5; }
+sub CL_FULLNAME { return 6; }
+sub CL_STATUS   { return 7; }
 
 sub get_classlist {
     my ($cid,$cdom,$cnum) = @_;