Diff for /loncom/homework/lonhomework.pm between versions 1.347 and 1.350

version 1.347, 2015/01/19 15:35:53 version 1.350, 2015/04/15 04:11:20
Line 469  sub check_access { Line 469  sub check_access {
  if ( $tries eq '' ) { $tries = '0'; }   if ( $tries eq '' ) { $tries = '0'; }
  if ( $maxtries eq '' &&    if ( $maxtries eq '' && 
      $env{'request.state'} ne 'construct') { $maxtries = '2'; }        $env{'request.state'} ne 'construct') { $maxtries = '2'; } 
  $Apache::lonhomework::results{'resource.'.$id.'.maxtries'}=$maxtries;  
  if ($maxtries && $tries >= $maxtries) { $status = 'CANNOT_ANSWER'; }   if ($maxtries && $tries >= $maxtries) { $status = 'CANNOT_ANSWER'; }
  # if (correct and show prob status) or excused then CANNOT_ANSWER   # if (correct and show prob status) or excused then CANNOT_ANSWER
  if ( ($Apache::lonhomework::history{"resource.$id.solved"}=~/^correct/)   if ( ($Apache::lonhomework::history{"resource.$id.solved"}=~/^correct/)
Line 1016  sub editxmlmode { Line 1015  sub editxmlmode {
               '</div><div class="LC_edit_actionbar" id="actionbar">';                '</div><div class="LC_edit_actionbar" id="actionbar">';
   
         $result.='<input type="hidden" name="problemmode" value="saveedit" />'.          $result.='<input type="hidden" name="problemmode" value="saveedit" />'.
                   &Apache::structuretags::problem_actionbar_buttons('editxml');                    &Apache::structuretags::problem_edit_buttons('editxml');
         $result.='<div class="LC_edit_problem_discards">';          $result.='<div class="LC_edit_problem_discards">';
   
  unless ($env{'environment.nocodemirror'}) {   unless ($env{'environment.nocodemirror'}) {
Line 1344  sub handler { Line 1343  sub handler {
     my $file=&Apache::lonnet::filelocation("",$request->uri);      my $file=&Apache::lonnet::filelocation("",$request->uri);
   
     #check if we know where we are      #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 we are browsing we might not be able to know where we are
  if ($Apache::lonhomework::browse ne 'F' &&    if ($Apache::lonhomework::browse ne 'F' && 
     $env{'request.state'} ne "construct") {      $env{'request.state'} ne "construct") {

Removed from v.1.347  
changed lines
  Added in v.1.350


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>