--- loncom/homework/lonhomework.pm 2009/05/19 22:52:19 1.311 +++ loncom/homework/lonhomework.pm 2011/01/06 22:38:11 1.317.4.3 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Homework handler # -# $Id: lonhomework.pm,v 1.311 2009/05/19 22:52:19 bisitz Exp $ +# $Id: lonhomework.pm,v 1.317.4.3 2011/01/06 22:38:11 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -47,6 +47,7 @@ use Apache::externalresponse(); use Apache::rankresponse(); use Apache::matchresponse(); use Apache::chemresponse(); +use Apache::functionplotresponse(); use Apache::drawimage(); use Apache::Constants qw(:common); use Apache::loncommon(); @@ -111,7 +112,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' )) { @@ -265,8 +270,8 @@ sub check_slot_access { } if ($slotstatus eq 'NEEDS_CHECKIN' && &proctor_checked_in($slot_name,$returned_slot,$type)) { - &Apache::lonxml::debug("protoctor checked in"); - $slotstatus='CAN_ANSWER'; + &Apache::lonxml::debug("proctor checked in"); + $slotstatus=$status; } my ($is_correct,$got_grade,$checkedin); @@ -688,9 +693,19 @@ sub handle_save_or_undo { sub analyze_header { my ($request) = @_; my $js = &Apache::structuretags::setmode_javascript(); + + # Breadcrumbs + my $brcrum = [{'href' => &Apache::loncommon::authorspace(), + 'text' => 'Construction Space'}, + {'href' => '', + 'text' => 'Problem Testing'}, + {'href' => '', + 'text' => 'Analyzing a problem'}]; + my $result = - &Apache::loncommon::start_page('Analyzing a problem',$js) - .&Apache::lonhtmlcommon::breadcrumbs() # FIXME add breadcrumbs + &Apache::loncommon::start_page('Analyzing a problem', + $js, + {'bread_crumbs' => $brcrum,}) .&Apache::loncommon::head_subbox( &Apache::loncommon::CSTR_pageheader()); $result .= @@ -705,10 +720,10 @@ sub analyze_header { 'onclick="javascript:setmode(this.form,'."'editxml'".')" /> -
- '.&mt('Problem Editing').&Apache::loncommon::help_open_topic('Problem_Editor_XML_Index').'
+ '.&mt('Problem Editing').' '.&Apache::loncommon::help_open_topic('Problem_Editor_XML_Index').' | '.&Apache::loncommon::helpLatexCheatsheet('Problem_LON-CAPA_Functions','Script Functions').' |