Diff for /loncom/interface/loncoursedata.pm between versions 1.184 and 1.188

version 1.184, 2007/11/06 04:39:19 version 1.188, 2008/09/11 14:47:21
Line 930  sub populate_student_table { Line 930  sub populate_student_table {
     $dbh->do($request);      $dbh->do($request);
     if ($dbh->err()) {      if ($dbh->err()) {
         &Apache::lonnet::logthis("error ".$dbh->errstr().          &Apache::lonnet::logthis("error ".$dbh->errstr().
                                  " occured executing \n".                                   " occurred executing \n".
                                  $request);                                   $request);
     }      }
     return;      return;
Line 983  sub populate_groupnames_table { Line 983  sub populate_groupnames_table {
     $dbh->do($request);      $dbh->do($request);
     if ($dbh->err()) {      if ($dbh->err()) {
         &Apache::lonnet::logthis("error ".$dbh->errstr().          &Apache::lonnet::logthis("error ".$dbh->errstr().
                                  " occured executing \n".                                   " occurred executing \n".
                                  $request);                                   $request);
     }      }
     return;      return;
Line 1053  sub populate_students_groups_table { Line 1053  sub populate_students_groups_table {
     $dbh->do($request);      $dbh->do($request);
     if ($dbh->err()) {      if ($dbh->err()) {
         &Apache::lonnet::logthis("error ".$dbh->errstr().          &Apache::lonnet::logthis("error ".$dbh->errstr().
                                  " occured executing \n".                                   " occurred executing \n".
                                  $request);                                   $request);
     }      }
     return;      return;
Line 1112  Input: $sname, $sdom, $courseid Line 1112  Input: $sname, $sdom, $courseid
   
 Output: $returnstatus  Output: $returnstatus
   
 $returnstatus is a string describing any errors that occured.  'okay' is the  $returnstatus is a string describing any errors that occurred.  'okay' is the
 default.  default.
   
 This subroutine loads a students data using lonnet::dump and inserts  This subroutine loads a students data using lonnet::dump and inserts
Line 1126  a description of the error. Line 1126  a description of the error.
   
 Once the "fulldump" tables are updated, the tables used for chart and  Once the "fulldump" tables are updated, the tables used for chart and
 spreadsheet (which hold only the current state of the student on their  spreadsheet (which hold only the current state of the student on their
 homework, not historical data) are updated.  If all updates have occured   homework, not historical data) are updated.  If all updates have occurred 
 successfully, $student_table is updated to reflect the time of the update.  successfully, $student_table is updated to reflect the time of the update.
   
 Notice we do not insert the data and immediately query it.  This means it  Notice we do not insert the data and immediately query it.  This means it
Line 1398  Input: $sname, $sdom, $courseid Line 1398  Input: $sname, $sdom, $courseid
   
 Output: $returnstatus, \%student_data  Output: $returnstatus, \%student_data
   
 $returnstatus is a string describing any errors that occured.  'okay' is the  $returnstatus is a string describing any errors that occurred.  'okay' is the
 default.  default.
 \%student_data is the data returned by a call to lonnet::currentdump.  \%student_data is the data returned by a call to lonnet::currentdump.
   
Line 1669  sub ensure_current_data { Line 1669  sub ensure_current_data {
     #      #
     # Get the update time for the user      # Get the update time for the user
     my $updatetime = 0;      my $updatetime = 0;
       my $getuserdir = 1;
     my $modifiedtime = &Apache::lonnet::GetFileTimestamp      my $modifiedtime = &Apache::lonnet::GetFileTimestamp
         ($sdom,$sname,$courseid.'.db',          ($sdom,$sname,$courseid.'.db',$getuserdir);
          $Apache::lonnet::perlvar{'lonUsersDir'});  
     #      #
     if ($modifiedtime == -1) {      if ($modifiedtime == -1) {
  return ('no data',undef);   return ('no data',undef);
Line 1721  sub ensure_current_full_data { Line 1721  sub ensure_current_full_data {
     &ensure_tables_are_set_up($courseid);      &ensure_tables_are_set_up($courseid);
     #      #
     # Get the update time for the user      # Get the update time for the user
       my $getuserdir = 1;
     my $modifiedtime = &Apache::lonnet::GetFileTimestamp      my $modifiedtime = &Apache::lonnet::GetFileTimestamp
         ($sdom,$sname,$courseid.'.db',          ($sdom,$sname,$courseid.'.db',$getuserdir);
          $Apache::lonnet::perlvar{'lonUsersDir'});  
     #      #
     my $student_id = &get_student_id($sname,$sdom);      my $student_id = &get_student_id($sname,$sdom);
     my @Result = &Apache::lonmysql::get_rows($student_table,      my @Result = &Apache::lonmysql::get_rows($student_table,
Line 2209  sub populate_weight_table { Line 2209  sub populate_weight_table {
     $dbh->do($request);      $dbh->do($request);
     if ($dbh->err()) {      if ($dbh->err()) {
         &Apache::lonnet::logthis("error ".$dbh->errstr().          &Apache::lonnet::logthis("error ".$dbh->errstr().
                                  " occured executing \n".                                   " occurred executing \n".
                                  $request);                                   $request);
     }      }
     return;      return;
Line 3103  sub CL_GROUP    { return 10; } Line 3103  sub CL_GROUP    { return 10; }
 sub CL_PERMANENTEMAIL { return 11; }  sub CL_PERMANENTEMAIL { return 11; }
 sub CL_ROLE     { return 12; }  sub CL_ROLE     { return 12; }
 sub CL_EXTENT   { return 13; }  sub CL_EXTENT   { return 13; }
   sub CL_PHOTO   { return 14; }
   sub CL_THUMBNAIL { return 15; }
   
 sub get_classlist {  sub get_classlist {
     my ($cdom,$cnum) = @_;      my ($cdom,$cnum) = @_;

Removed from v.1.184  
changed lines
  Added in v.1.188


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>