--- loncom/interface/loncoursedata.pm 2004/02/18 17:33:35 1.118 +++ loncom/interface/loncoursedata.pm 2004/02/18 19:15:48 1.119 @@ -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_awarddetail { return 3; } 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 @@ sub get_response_data_by_student { 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 @@ sub get_response_data_by_student { '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';