[LON-CAPA-cvs] cvs: loncom /interface loncoursedata.pm
raeburn
raeburn at source.lon-capa.org
Thu Feb 28 23:58:08 EST 2013
raeburn Fri Mar 1 04:58:08 2013 EDT
Modified files:
/loncom/interface loncoursedata.pm
Log:
- Records in classlist.db file can contain an additional item (credits), if
credits are in use in the domain, and the credits earned by the particular
student are different from the course default.
Index: loncom/interface/loncoursedata.pm
diff -u loncom/interface/loncoursedata.pm:1.193 loncom/interface/loncoursedata.pm:1.194
--- loncom/interface/loncoursedata.pm:1.193 Mon Oct 3 13:27:17 2011
+++ loncom/interface/loncoursedata.pm Fri Mar 1 04:58:08 2013
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: loncoursedata.pm,v 1.193 2011/10/03 13:27:17 raeburn Exp $
+# $Id: loncoursedata.pm,v 1.194 2013/03/01 04:58:08 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2291,12 +2291,13 @@
sub CL_STATUS { return 7; }
sub CL_TYPE { return 8; }
sub CL_LOCKEDTYPE { return 9; }
-sub CL_GROUP { return 10; }
-sub CL_PERMANENTEMAIL { return 11; }
-sub CL_ROLE { return 12; }
-sub CL_EXTENT { return 13; }
-sub CL_PHOTO { return 14; }
-sub CL_THUMBNAIL { return 15; }
+sub CL_CREDITS { return 10; }
+sub CL_GROUP { return 11; }
+sub CL_PERMANENTEMAIL { return 12; }
+sub CL_ROLE { return 13; }
+sub CL_EXTENT { return 14; }
+sub CL_PHOTO { return 15; }
+sub CL_THUMBNAIL { return 16; }
sub get_classlist {
my ($cdom,$cnum) = @_;
@@ -2316,9 +2317,9 @@
}
my ($sname,$sdom) = split(/:/,$student);
my @Values = split(/:/,$info);
- my ($end,$start,$id,$section,$fullname,$type,$lockedtype);
+ my ($end,$start,$id,$section,$fullname,$type,$lockedtype,$credits);
if (@Values > 2) {
- ($end,$start,$id,$section,$fullname,$type,$lockedtype) = @Values;
+ ($end,$start,$id,$section,$fullname,$type,$lockedtype,$credits) = @Values;
} else { # We have to get the data ourselves
($end,$start) = @Values;
$section = &Apache::lonnet::getsection($sdom,$sname,$cid);
@@ -2357,11 +2358,13 @@
$status='Future';
}
$classlist{$student} =
- [$sdom,$sname,$end,$start,$id,$section,$fullname,$status,$type,$lockedtype];
+ [$sdom,$sname,$end,$start,$id,$section,$fullname,$status,$type,
+ $lockedtype,$credits];
}
if (wantarray()) {
return (\%classlist,['domain','username','end','start','id',
- 'section','fullname','status','type','lockedtype']);
+ 'section','fullname','status','type',
+ 'lockedtype','credits']);
} else {
return \%classlist;
}
@@ -3091,7 +3094,8 @@
Returns a reference to a hash which contains:
keys '$sname:$sdom'
- values [$sdom,$sname,$end,$start,$id,$section,$fullname,$status,$type,$lockedtype]
+ values [$sdom,$sname,$end,$start,$id,$section,$fullname,$status,$type,
+ $lockedtype,$credits]
The constant values CL_SDOM, CL_SNAME, CL_END, etc. can be used
as indices into the returned list to future-proof clients against
More information about the LON-CAPA-cvs
mailing list