--- loncom/homework/lonhomework.pm 2015/01/19 15:35:53 1.347 +++ loncom/homework/lonhomework.pm 2015/04/16 10:13:29 1.351 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Homework handler # -# $Id: lonhomework.pm,v 1.347 2015/01/19 15:35:53 goltermann Exp $ +# $Id: lonhomework.pm,v 1.351 2015/04/16 10:13:29 droeschl Exp $ # # Copyright Michigan State University Board of Trustees # @@ -469,7 +469,6 @@ sub check_access { if ( $tries eq '' ) { $tries = '0'; } if ( $maxtries eq '' && $env{'request.state'} ne 'construct') { $maxtries = '2'; } - $Apache::lonhomework::results{'resource.'.$id.'.maxtries'}=$maxtries; if ($maxtries && $tries >= $maxtries) { $status = 'CANNOT_ANSWER'; } # if (correct and show prob status) or excused then CANNOT_ANSWER if ( ($Apache::lonhomework::history{"resource.$id.solved"}=~/^correct/) @@ -1016,17 +1015,24 @@ sub editxmlmode { '
'; $result.=''. - &Apache::structuretags::problem_actionbar_buttons('editxml'); + &Apache::structuretags::problem_edit_buttons('editxml'); $result.='
'; unless ($env{'environment.nocodemirror'}) { # dropdown menues $result .= '
    '. - &Apache::lonmenu::create_submenu("#", "", &mt("Insert Menu"), &Apache::structuretags::insert_menu_datastructure(),"").'
'; + &Apache::lonmenu::create_submenu("#", "", &mt("Templates"), + &Apache::structuretags::insert_menu_datastructure(), + "").''; } - $result .= '
    '. - Apache::lonmenu::create_submenu("#", "", &mt("Help"), &Apache::structuretags::helpmenu_datastructure(),"").'
'; - $result.="
"; + $result .= '
    '; + + $result .= Apache::lonmenu::create_submenu("#", "", + &mt("Help") . ' ' . &mt(', + &Apache::structuretags::helpmenu_datastructure(),""); + + $result.="
"; $result.='
'.&Apache::lonxml::message_location(). &Apache::loncommon::xmleditor_js(). @@ -1344,7 +1350,7 @@ sub handler { my $file=&Apache::lonnet::filelocation("",$request->uri); #check if we know where we are - if ($env{'request.course.fn'} && !&Apache::lonnet::symbread()) { + if ($env{'request.course.fn'} && !&Apache::lonnet::symbread('','',1,1)) { # if we are browsing we might not be able to know where we are if ($Apache::lonhomework::browse ne 'F' && $env{'request.state'} ne "construct") {