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

bowersj2 lon-capa-cvs@mail.lon-capa.org
Tue, 27 May 2003 21:00:23 -0000


bowersj2		Tue May 27 17:00:23 2003 EDT

  Modified files:              
    /loncom/interface	lonnavmaps.pm 
  Log:
  Wanted to just commit the one line fix to LAST_CHECK which seems to 
  repair some FEEDBACK bubble issues, but this also includes some stuff 
  with responseIds and such.
  
  
  
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.192 loncom/interface/lonnavmaps.pm:1.193
--- loncom/interface/lonnavmaps.pm:1.192	Fri May 16 13:54:21 2003
+++ loncom/interface/lonnavmaps.pm	Tue May 27 17:00:23 2003
@@ -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 @@
         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 @@
 =item * B<parts>():
 
 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<countParts>():
 
 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<parts> 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<multipart>():
 
-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<responseType>($part):
 
 Returns the response type of the part, without the word "response" on the
 end. Example return values: 'string', 'essay', 'numeric', etc.
 
-=item * B<responseId>($part):
+=item * B<responseIds>($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 @@
     return $self->{RESPONSE_TYPE}->{$part};
 }
 
-sub responseId {
+sub responseIds {
     my $self = shift;
     my $part = shift;