--- loncom/interface/lonnavmaps.pm 2003/05/16 17:54:21 1.192 +++ loncom/interface/lonnavmaps.pm 2003/05/27 21:00:23 1.193 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Navigate Maps Handler # -# $Id: lonnavmaps.pm,v 1.192 2003/05/16 17:54:21 bowersj2 Exp $ +# $Id: lonnavmaps.pm,v 1.193 2003/05/27 21:00:23 bowersj2 Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1662,7 +1662,7 @@ sub init { my %emailstatus = &Apache::lonnet::dump('email_status'); my $logoutTime = $emailstatus{'logout'}; my $courseLeaveTime = $emailstatus{'logout_'.$ENV{'request.course.id'}}; - $self->{LAST_CHECK} = ($courseLeaveTime < $logoutTime ? + $self->{LAST_CHECK} = (($courseLeaveTime > $logoutTime) ? $courseLeaveTime : $logoutTime); my %discussiontime = &Apache::lonnet::dump('discussiontimes', $cdom, $cnum); @@ -3211,31 +3211,30 @@ sub getErrors { =item * B(): Returns a list reference containing sorted strings corresponding to -each part of the problem. To count the number of parts, use the list -in a scalar context, and subtract one if greater than two. (One part -problems have a part 0. Multi-parts have a part 0, plus a part for -each part. Filtering part 0 if you want it is up to you.) +each part of the problem. Single part problems have only a part '0'. +Multipart problems do not return their part '0', since they typically +do not really matter. =item * B(): Returns the number of parts of the problem a student can answer. Thus, for single part problems, returns 1. For multipart, it returns the -number of parts in the problem, not including psuedo-part 0. Thus, -B may return an array with more parts in it then countParts -might lead you to believe. +number of parts in the problem, not including psuedo-part 0. =item * B(): -Returns true if the problem is multipart, false otherwise. +Returns true if the problem is multipart, false otherwise. Use this instead +of countParts if all you want is multipart/not multipart. =item * B($part): Returns the response type of the part, without the word "response" on the end. Example return values: 'string', 'essay', 'numeric', etc. -=item * B($part): +=item * B($part): -Retreives the response ID for the given part, which may be an empty string. +Retreives the response IDs for the given part as an array reference containing +strings naming the response IDs. This may be empty. =back @@ -3281,7 +3280,7 @@ sub responseType { return $self->{RESPONSE_TYPE}->{$part}; } -sub responseId { +sub responseIds { my $self = shift; my $part = shift;