version 1.192, 2003/05/16 17:54:21
|
version 1.193, 2003/05/27 21:00:23
|
Line 1662 sub init {
|
Line 1662 sub init {
|
my %emailstatus = &Apache::lonnet::dump('email_status'); |
my %emailstatus = &Apache::lonnet::dump('email_status'); |
my $logoutTime = $emailstatus{'logout'}; |
my $logoutTime = $emailstatus{'logout'}; |
my $courseLeaveTime = $emailstatus{'logout_'.$ENV{'request.course.id'}}; |
my $courseLeaveTime = $emailstatus{'logout_'.$ENV{'request.course.id'}}; |
$self->{LAST_CHECK} = ($courseLeaveTime < $logoutTime ? |
$self->{LAST_CHECK} = (($courseLeaveTime > $logoutTime) ? |
$courseLeaveTime : $logoutTime); |
$courseLeaveTime : $logoutTime); |
my %discussiontime = &Apache::lonnet::dump('discussiontimes', |
my %discussiontime = &Apache::lonnet::dump('discussiontimes', |
$cdom, $cnum); |
$cdom, $cnum); |
Line 3211 sub getErrors {
|
Line 3211 sub getErrors {
|
=item * B<parts>(): |
=item * B<parts>(): |
|
|
Returns a list reference containing sorted strings corresponding to |
Returns a list reference containing sorted strings corresponding to |
each part of the problem. To count the number of parts, use the list |
each part of the problem. Single part problems have only a part '0'. |
in a scalar context, and subtract one if greater than two. (One part |
Multipart problems do not return their part '0', since they typically |
problems have a part 0. Multi-parts have a part 0, plus a part for |
do not really matter. |
each part. Filtering part 0 if you want it is up to you.) |
|
|
|
=item * B<countParts>(): |
=item * B<countParts>(): |
|
|
Returns the number of parts of the problem a student can answer. Thus, |
Returns the number of parts of the problem a student can answer. Thus, |
for single part problems, returns 1. For multipart, it returns the |
for single part problems, returns 1. For multipart, it returns the |
number of parts in the problem, not including psuedo-part 0. Thus, |
number of parts in the problem, not including psuedo-part 0. |
B<parts> may return an array with more parts in it then countParts |
|
might lead you to believe. |
|
|
|
=item * B<multipart>(): |
=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): |
=item * B<responseType>($part): |
|
|
Returns the response type of the part, without the word "response" on the |
Returns the response type of the part, without the word "response" on the |
end. Example return values: 'string', 'essay', 'numeric', etc. |
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 |
=back |
|
|
Line 3281 sub responseType {
|
Line 3280 sub responseType {
|
return $self->{RESPONSE_TYPE}->{$part}; |
return $self->{RESPONSE_TYPE}->{$part}; |
} |
} |
|
|
sub responseId { |
sub responseIds { |
my $self = shift; |
my $self = shift; |
my $part = shift; |
my $part = shift; |
|
|