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

matthew lon-capa-cvs@mail.lon-capa.org
Mon, 27 Oct 2003 21:07:22 -0000


matthew		Mon Oct 27 16:07:22 2003 EDT

  Modified files:              
    /loncom/interface	loncoursedata.pm 
  Log:
  Overhaul of &get_response_time_data().
  
  
Index: loncom/interface/loncoursedata.pm
diff -u loncom/interface/loncoursedata.pm:1.106 loncom/interface/loncoursedata.pm:1.107
--- loncom/interface/loncoursedata.pm:1.106	Fri Oct 24 09:34:45 2003
+++ loncom/interface/loncoursedata.pm	Mon Oct 27 16:07:22 2003
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: loncoursedata.pm,v 1.106 2003/10/24 13:34:45 matthew Exp $
+# $Id: loncoursedata.pm,v 1.107 2003/10/27 21:07:22 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2065,25 +2065,25 @@
 }
 
 sub get_response_time_data {
-    my ($students,$symb,$response,$courseid) = @_;
+    my ($students,$symb,$part,$courseid) = @_;
     return undef if (! defined($symb) || 
-                     ! defined($response));
+                     ! defined($part));
     $courseid = $ENV{'request.course.id'} if (! defined($courseid));
     #
     &setup_table_names($courseid);
     my $symb_id = &get_symb_id($symb);
-    my $response_id = &get_part_id($response);
+    my $part_id = &get_part_id($part);
     #
     my $dbh = &Apache::lonmysql::get_dbh();
     return undef if (! defined($dbh));
     my $request = 'SELECT '.
-        'a.student_id, a.awarddetail, b.timestamp '.
-        'FROM '.$fulldump_response_table.' AS a '.
+        'a.student_id, a.awarded, a.tries, b.timestamp '.
+        'FROM '.$fulldump_part_table.' AS a '.
         'NATURAL LEFT JOIN '.$fulldump_timestamp_table.' AS b '.
 #        'ON a.symb_id=b.symb_id AND a.student_id=b.student_id AND '.
 #        'a.transaction = b.transaction '.
         'WHERE '.
-        'a.symb_id='.$symb_id.' AND a.response_id='.$response_id;
+        'a.symb_id='.$symb_id.' AND a.part_id='.$part_id;
     if (defined($students)) {
         $request .= ' AND ('.
             join(' OR ', map {'a.student_id='.