[LON-CAPA-cvs] cvs: loncom /interface lonfeedback.pm
www
www at source.lon-capa.org
Wed Jan 4 13:23:38 EST 2012
www Wed Jan 4 18:23:38 2012 EDT
Modified files:
/loncom/interface lonfeedback.pm
Log:
Routine to get discussion records for a user
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.317 loncom/interface/lonfeedback.pm:1.318
--- loncom/interface/lonfeedback.pm:1.317 Wed Jan 4 00:42:20 2012
+++ loncom/interface/lonfeedback.pm Wed Jan 4 18:23:38 2012
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Feedback
#
-# $Id: lonfeedback.pm,v 1.317 2012/01/04 00:42:20 www Exp $
+# $Id: lonfeedback.pm,v 1.318 2012/01/04 18:23:38 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2787,7 +2787,10 @@
}
}
-
+# Records of number of postings, etc, are kept under the "symb" called "_feedback"
+# There are two entries within the framework of a course:
+# - the URLs for which feedback was provided
+# - the total number of contributions
my %record=&Apache::lonnet::restore('_feedback');
my ($temp)=keys(%record);
unless ($temp=~/^error\:/) {
@@ -2802,6 +2805,17 @@
return ($status,$sendsomething);
}
+# Routine to get the complete discussion records
+
+sub getdiscrecords {
+ my ($uname,$udom,$course)=@_;
+ unless ($uname) { $uname=$env{'user.name'}; }
+ unless ($udom) { $udom=$env{'user.domain'}; }
+ unless ($course) { $course=$env{'request.course.id'}; }
+ my %record=&Apache::lonnet::restore('_feedback',$course,$udom,$uname);
+ return %record;
+}
+
sub adddiscuss {
my ($symb,$email,$anon,$attachmenturl,$subject,$group)=@_;
my $status='';
More information about the LON-CAPA-cvs
mailing list