--- loncom/interface/loncoursedata.pm 2002/09/01 06:23:19 1.28 +++ loncom/interface/loncoursedata.pm 2002/09/17 15:34:42 1.32 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # (Publication Handler # -# $Id: loncoursedata.pm,v 1.28 2002/09/01 06:23:19 stredwic Exp $ +# $Id: loncoursedata.pm,v 1.32 2002/09/17 15:34:42 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -322,7 +322,8 @@ sub ProcessTopResourceMap { my (@sequences, @currentResource, @finishResource); my ($currentSequence, $currentResourceID, $lastResourceID); - $currentResourceID=$hash{'ids_/res/'.$ENV{'request.course.uri'}}; + $currentResourceID=$hash{'ids_'. + &Apache::lonnet::clutter($ENV{'request.course.uri'})}; push(@currentResource, $currentResourceID); $lastResourceID=-1; $currentSequence=-1; @@ -585,7 +586,24 @@ browser Output: @names @names: An array of students whose information has been processed, and are to -be considered in an arbitrary order. +be considered in an arbitrary order. The entries in @names are of the form +username:domain. + +The values in $cache are as follows: + + *NOTE: for the following $name implies username:domain + $name.':error' only defined if an error occured. Value + contains the error message + $name.':lastDownloadTime' unconverted time of the last update of a + student\'s course data + $name.'updateTime' coverted time of the last update of a + student\'s course data + $name.':username' username of a student + $name.':domain' domain of a student + $name.':fullname' full name of a student + $name.':id' PID of a student + $name.':Status' active/expired status of a student + $name.':section' section of a student =back @@ -608,9 +626,8 @@ sub ProcessClasslist { if($c->aborted()) { return (); } - my $studentInformation = $classlist->{$name.':studentInformation'}, - my $sectionData = $classlist->{$name.':sections'}, - my $date = $classlist->{$name}, + my $studentInformation = $classlist->{$name.':studentInformation'}; + my $date = $classlist->{$name}; my ($studentName,$studentDomain) = split(/\:/,$name); $cache->{$name.':username'}=$studentName; @@ -645,6 +662,7 @@ sub ProcessClasslist { $courseID=~s/^(\w)/\/$1/; my $sec=''; + my $sectionData = $classlist->{$name.':sections'}; foreach my $key (keys (%$sectionData)) { my $value = $sectionData->{$key}; if ($key=~/^$courseID(?:\/)*(\w+)*\_st$/) { @@ -652,7 +670,7 @@ sub ProcessClasslist { if($key eq $courseID.'_st') { $tempsection=''; } - my ($dummy,$roleend,$rolestart)=split(/\_/,$value); + my (undef,$roleend,$rolestart)=split(/\_/,$value); if($roleend eq $end && $rolestart eq $start) { $sec = $tempsection; last; @@ -737,7 +755,8 @@ sub ProcessStudentData { my %courseKeys; # user name:domain was prepended earlier in DownloadCourseInformation foreach (keys %$courseData) { - my $currentKey =~ s/^$name//; + my $currentKey = $_; + $currentKey =~ s/^$name//; $courseKeys{$currentKey}++; $cache->{$_}=$courseData->{$_}; } @@ -1249,7 +1268,7 @@ sub DownloadStudentCourseDataSeparate { $WhatIWant .= '|timestamp)'; $WhatIWant .= ')'; - &CheckForResidualDownload($courseID, $cacheDB, $students, $c); + &CheckForResidualDownload($cacheDB, 'true', 'true', $courseID, $r, $c); my $studentCount = scalar(@$students); if($status eq 'true') {