--- loncom/interface/loncoursedata.pm 2007/11/06 04:39:19 1.184 +++ loncom/interface/loncoursedata.pm 2008/11/17 14:16:55 1.189 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: loncoursedata.pm,v 1.184 2007/11/06 04:39:19 raeburn Exp $ +# $Id: loncoursedata.pm,v 1.189 2008/11/17 14:16:55 jms Exp $ # # Copyright Michigan State University Board of Trustees # @@ -30,7 +30,7 @@ =head1 NAME -loncoursedata +Apache::loncoursedata =head1 SYNOPSIS @@ -64,13 +64,6 @@ use Digest::MD5(); This section contains all the functions that get data from other servers and/or itself. -=cut - -################################################ -################################################ - -=pod - =item &make_into_hash($values); Returns a reference to a hash as described by $values. $values is @@ -930,7 +923,7 @@ sub populate_student_table { $dbh->do($request); if ($dbh->err()) { &Apache::lonnet::logthis("error ".$dbh->errstr(). - " occured executing \n". + " occurred executing \n". $request); } return; @@ -983,7 +976,7 @@ sub populate_groupnames_table { $dbh->do($request); if ($dbh->err()) { &Apache::lonnet::logthis("error ".$dbh->errstr(). - " occured executing \n". + " occurred executing \n". $request); } return; @@ -1053,7 +1046,7 @@ sub populate_students_groups_table { $dbh->do($request); if ($dbh->err()) { &Apache::lonnet::logthis("error ".$dbh->errstr(). - " occured executing \n". + " occurred executing \n". $request); } return; @@ -1112,7 +1105,7 @@ Input: $sname, $sdom, $courseid 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. This subroutine loads a students data using lonnet::dump and inserts @@ -1126,7 +1119,7 @@ a description of the error. Once the "fulldump" tables are updated, the tables used for chart and 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. Notice we do not insert the data and immediately query it. This means it @@ -1398,7 +1391,7 @@ Input: $sname, $sdom, $courseid 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. \%student_data is the data returned by a call to lonnet::currentdump. @@ -1669,9 +1662,9 @@ sub ensure_current_data { # # Get the update time for the user my $updatetime = 0; + my $getuserdir = 1; my $modifiedtime = &Apache::lonnet::GetFileTimestamp - ($sdom,$sname,$courseid.'.db', - $Apache::lonnet::perlvar{'lonUsersDir'}); + ($sdom,$sname,$courseid.'.db',$getuserdir); # if ($modifiedtime == -1) { return ('no data',undef); @@ -1721,9 +1714,9 @@ sub ensure_current_full_data { &ensure_tables_are_set_up($courseid); # # Get the update time for the user + my $getuserdir = 1; my $modifiedtime = &Apache::lonnet::GetFileTimestamp - ($sdom,$sname,$courseid.'.db', - $Apache::lonnet::perlvar{'lonUsersDir'}); + ($sdom,$sname,$courseid.'.db',$getuserdir); # my $student_id = &get_student_id($sname,$sdom); my @Result = &Apache::lonmysql::get_rows($student_table, @@ -2209,7 +2202,7 @@ sub populate_weight_table { $dbh->do($request); if ($dbh->err()) { &Apache::lonnet::logthis("error ".$dbh->errstr(). - " occured executing \n". + " occurred executing \n". $request); } return; @@ -3103,6 +3096,8 @@ sub CL_GROUP { return 10; } sub CL_PERMANENTEMAIL { return 11; } sub CL_ROLE { return 12; } sub CL_EXTENT { return 13; } +sub CL_PHOTO { return 14; } +sub CL_THUMBNAIL { return 15; } sub get_classlist { my ($cdom,$cnum) = @_;