Diff for /loncom/homework/structuretags.pm between versions 1.323 and 1.324

version 1.323, 2005/11/18 20:29:13 version 1.324, 2005/11/21 21:51:29
Line 613  sub start_problem { Line 613  sub start_problem {
     }      }
     $form_tag_start.='<hr />';      $form_tag_start.='<hr />';
  }   }
  ($status,$accessmsg) = &Apache::lonhomework::check_access('0');  
    ($status,$accessmsg,my $slot_name,my $slot) = 
       &Apache::lonhomework::check_slot_access('0','problem');
  push (@Apache::inputtags::status,$status);   push (@Apache::inputtags::status,$status);
   
  my $expression='$external::datestatus="'.$status.'";';   my $expression='$external::datestatus="'.$status.'";';
  $expression.='$external::gradestatus="'.$Apache::lonhomework::history{"resource.0.solved"}.'";';   $expression.='$external::gradestatus="'.$Apache::lonhomework::history{"resource.0.solved"}.'";';
  &Apache::run::run($expression,$safeeval);   &Apache::run::run($expression,$safeeval);
  &Apache::lonxml::debug("Got $status");   &Apache::lonxml::debug("Got $status");
   
  if (( $status eq 'CLOSED' ) ||   if (( $status eq 'CLOSED' ) ||
     ( $status eq 'UNCHECKEDOUT') ||      ( $status eq 'UNCHECKEDOUT') ||
     ( $status eq 'NOT_YET_VIEWED') ||      ( $status eq 'NOT_YET_VIEWED') ||
     ( $status eq 'BANNED') ||      ( $status eq 'BANNED') ||
     ( $status eq 'UNAVAILABLE') ||      ( $status eq 'UNAVAILABLE') ||
       ( $status eq 'NOT_IN_A_SLOT') ||
     ( $status eq 'INVALID_ACCESS')) {      ( $status eq 'INVALID_ACCESS')) {
     my $bodytext=&Apache::lonxml::get_all_text("/problem",$parser);      my $bodytext=&Apache::lonxml::get_all_text("/problem",$parser);
     if ( $target eq "web" ) {      if ( $target eq "web" ) {
Line 650  sub start_problem { Line 655  sub start_problem {
     $result.=&mt('Problem is not open to be viewed. It')." $accessmsg \\vskip 0 mm ";      $result.=&mt('Problem is not open to be viewed. It')." $accessmsg \\vskip 0 mm ";
  }   }
     }      }
    } elsif ($status eq 'NEEDS_CHECKIN') {
       my $bodytext=&Apache::lonxml::get_all_text("/problem",$parser);
       if ($target eq 'web') {
    $result .= $head_tag_start.'</head>';
    $result .= $body_tag_start;
    $result .= &Apache::bridgetask::proctor_validation_screen();
       } elsif ($target eq 'grade') {
    &Apache::bridgetask::proctor_check_auth($slot_name,$slot,
    'problem');
       }
  } elsif ($target eq 'web') {   } elsif ($target eq 'web') {
     my $name= &get_resource_name($parstack,$safeeval);      my $name= &get_resource_name($parstack,$safeeval);
     $result.="$head_tag_start<title>$name</title></head>      $result.="$head_tag_start<title>$name</title></head>
Line 792  sub end_problem { Line 807  sub end_problem {
     # if part is zero, no <part>s existed, so we need to the grading      # if part is zero, no <part>s existed, so we need to the grading
     if ($status eq 'CAN_ANSWER' ||$Apache::lonhomework::scantronmode) {      if ($status eq 'CAN_ANSWER' ||$Apache::lonhomework::scantronmode) {
  &Apache::inputtags::grade;   &Apache::inputtags::grade;
       } elsif ($status eq 'NEEDS_CHECKIN') {
    # no need to grade, and don't want to hide data
     } else {      } else {
  # move any submission data to .hidden   # move any submission data to .hidden
  &Apache::inputtags::hidealldata($Apache::inputtags::part);   &Apache::inputtags::hidealldata($Apache::inputtags::part);

Removed from v.1.323  
changed lines
  Added in v.1.324


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