--- loncom/homework/lonhomework.pm 2009/03/26 18:21:24 1.308 +++ loncom/homework/lonhomework.pm 2010/08/20 03:48:29 1.310.4.1 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Homework handler # -# $Id: lonhomework.pm,v 1.308 2009/03/26 18:21:24 bisitz Exp $ +# $Id: lonhomework.pm,v 1.310.4.1 2010/08/20 03:48:29 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -111,7 +111,11 @@ sub get_target { } elsif ( $env{'form.grade_target'} eq 'webgrade' && ($Apache::lonhomework::queuegrade eq 'F' )) { return ($env{'form.grade_target'}); - } + } elsif ($env{'form.grade_target'} eq 'answer') { + if ($env{'form.answer_output_mode'} eq 'tex') { + return ($env{'form.grade_target'}); + } + } if ($env{'form.webgrade'} && ($Apache::lonhomework::modifygrades eq 'F' || $Apache::lonhomework::queuegrade eq 'F' )) { @@ -297,12 +301,15 @@ sub check_slot_access { return ('WAITING_FOR_GRADE'); } - # no slot is currently open, and has been checked in for this version - # previous slot is therefore CLOSED, so therefore the problem is + # Previously used slot is no longer open, and has been checked in for this version. + # However, the problem is not closed, and potentially, another slot might be + # used to gain access to it to work on it, until the due date is reached, and the + # problem then becomes CLOSED. Therefore return the slotstatus - + # (which will be NOT_IN_SLOT). if (!defined($slot_name) && $checkedin && $type eq 'problem') { - return ('CLOSED',$datemsg); + return ($slotstatus); } if ($slotstatus eq 'NOT_IN_A_SLOT' @@ -690,7 +697,7 @@ sub analyze_header { $result .= &Apache::lonxml::message_location().' -
'. ''. @@ -921,7 +928,7 @@ sub editxmlmode { }}); $result.=$start_page. &renderpage($request,$file,['no_output_web'],1). - ''. &Apache::structuretags::remember_problem_state().'
@@ -1142,8 +1149,8 @@ $errormsg

".&mt("To create a new $extension, select a template from the". - " list below. Then click on the \"Create $extension\" button.")." -

"); + " list below. Then click on the \"Create $extension\" button.").' +

'); if (defined($templatelist)) { $request->print($templatelist);