[LON-CAPA-cvs] cvs: loncom /interface loncoursedata.pm
matthew
lon-capa-cvs@mail.lon-capa.org
Wed, 18 Feb 2004 19:15:48 -0000
matthew Wed Feb 18 14:15:48 2004 EDT
Modified files:
/loncom/interface loncoursedata.pm
Log:
Modified &get_response_data_by_student to return the 'awarded' value.
Index: loncom/interface/loncoursedata.pm
diff -u loncom/interface/loncoursedata.pm:1.118 loncom/interface/loncoursedata.pm:1.119
--- loncom/interface/loncoursedata.pm:1.118 Wed Feb 18 12:33:35 2004
+++ loncom/interface/loncoursedata.pm Wed Feb 18 14:15:48 2004
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: loncoursedata.pm,v 1.118 2004/02/18 17:33:35 matthew Exp $
+# $Id: loncoursedata.pm,v 1.119 2004/02/18 19:15:48 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2120,6 +2120,7 @@
sub RDs_submission { return 2; }
sub RDs_timestamp { return 1; }
sub RDs_tries { return 0; }
+sub RDs_awarded { return 4; }
sub get_response_data_by_student {
my ($student,$symb,$response,$courseid) = @_;
@@ -2137,7 +2138,7 @@
my $dbh = &Apache::lonmysql::get_dbh();
return undef if (! defined($dbh));
my $request = 'SELECT '.
- 'c.tries, b.timestamp, a.submission, a.awarddetail '.
+ 'c.tries, b.timestamp, a.submission, a.awarddetail, e.awarded '.
'FROM '.$fulldump_response_table.' AS a '.
'LEFT JOIN '.$fulldump_timestamp_table.' AS b '.
'ON a.symb_id=b.symb_id AND a.student_id=b.student_id AND '.
@@ -2147,6 +2148,9 @@
'a.part_id=c.part_id AND a.transaction = c.transaction '.
'LEFT JOIN '.$student_table.' AS d '.
'ON a.student_id=d.student_id '.
+ 'LEFT JOIN '.$performance_table.' AS e '.
+ 'ON a.symb_id=e.symb_id AND a.part_id=e.part_id AND '.
+ 'a.student_id=e.student_id AND c.tries=e.tries '.
'WHERE '.
'a.symb_id='.$symb_id.' AND a.response_id='.$response_id.
' AND a.student_id='.$student_id.' ORDER BY b.timestamp';