Diff for /loncom/homework/bridgetask.pm between versions 1.140 and 1.141

version 1.140, 2006/04/10 22:55:02 version 1.141, 2006/04/14 21:42:05
Line 375  sub start_Task { Line 375  sub start_Task {
     }       } 
   
     $Apache::lonhomework::parsing_a_task=1;      $Apache::lonhomework::parsing_a_task=1;
     #should get back a <html> or the neccesary stuff to start XML/MathML  
     my ($result,$head_tag_start,$body_tag_start,$form_tag_start)=  
  &Apache::structuretags::page_start($target,$token,$tagstack,$parstack,$parser,$safeeval);  
       
     $head_tag_start .= &style($target);  
     $body_tag_start .= '<div class="LC_task">'."\n";  
   
       my $name;
     if ($target eq 'web' || $target eq 'webgrade') {      if ($target eq 'web' || $target eq 'webgrade') {
  $head_tag_start.='<title>'.   $name = &Apache::structuretags::get_resource_name($parstack,$safeeval);
     &Apache::structuretags::get_resource_name($parstack,$safeeval).  
     '</title>';  
     }      }
   
       #should get back a <html> or the neccesary stuff to start XML/MathML
       my ($result,$form_tag_start)=
    &Apache::structuretags::page_start($target,$token,$tagstack,$parstack,
      $parser,$safeeval,$name,&style());
       
       $result .= '<div class="LC_task">'."\n";
   
   
     if ($target eq 'web' && $env{'request.state'} ne 'construct') {      if ($target eq 'web' && $env{'request.state'} ne 'construct') {
  if ($Apache::lonhomework::modifygrades) {   if ($Apache::lonhomework::modifygrades) {
     $body_tag_start.='<form name="gradesubmission" method="post" action="';      $result.='<form name="gradesubmission" method="post" action="';
     my $uri=$env{'request.uri'};      my $uri=$env{'request.uri'};
     if ($env{'request.enc'}) { $uri=&Apache::lonenc::encrypted($uri); }      if ($env{'request.enc'}) { $uri=&Apache::lonenc::encrypted($uri); }
     $body_tag_start.=$uri.'">'.&add_grading_button()."</form>";      $result.=$uri.'">'.&add_grading_button()."</form>";
     my $symb=&Apache::lonnet::symbread();      my $symb=&Apache::lonnet::symbread();
     if (&Apache::lonnet::allowed('mgq',$env{'request.course.id'})) {      if (&Apache::lonnet::allowed('mgq',$env{'request.course.id'})) {
  $body_tag_start.='<form method="post" name="slotrequest" action="/adm/slotrequest">'.   $result.='<form method="post" name="slotrequest" action="/adm/slotrequest">'.
     '<input type="hidden" name="symb" value="'.$symb.'" />'.      '<input type="hidden" name="symb" value="'.$symb.'" />'.
     '<input type="hidden" name="command" value="showslots" />'.      '<input type="hidden" name="command" value="showslots" />'.
     '<input type="submit" name="requestattempt" value="'.      '<input type="submit" name="requestattempt" value="'.
Line 405  sub start_Task { Line 406  sub start_Task {
  my $target_id =    my $target_id = 
     &Apache::lonstathelpers::make_target_id({symb => $symb,      &Apache::lonstathelpers::make_target_id({symb => $symb,
      part => '0'});       part => '0'});
  $body_tag_start.='<form method="post" name="gradingstatus" action="/adm/statistics">'.   $result.='<form method="post" name="gradingstatus" action="/adm/statistics">'.
     '<input type="hidden" name="problemchoice" value="'.$target_id.'" />'.      '<input type="hidden" name="problemchoice" value="'.$target_id.'" />'.
     '<input type="hidden" name="reportSelected" value="grading_analysis" />'.      '<input type="hidden" name="reportSelected" value="grading_analysis" />'.
     '<input type="submit" name="grading" value="'.      '<input type="submit" name="grading" value="'.
Line 428  sub start_Task { Line 429  sub start_Task {
  $expression.='$external::gradestatus="'.$Apache::lonhomework::history{"resource.$version.0.solved"}.'";';   $expression.='$external::gradestatus="'.$Apache::lonhomework::history{"resource.$version.0.solved"}.'";';
  &Apache::run::run($expression,$safeeval);   &Apache::run::run($expression,$safeeval);
  &Apache::lonxml::debug("Got $status");   &Apache::lonxml::debug("Got $status");
  $body_tag_start.=&add_previous_version_button($status);   $result.=&add_previous_version_button($status);
  if (!&show_task($status,$previous)) {   if (!&show_task($status,$previous)) {
     my $bodytext=&Apache::lonxml::get_all_text("/task",$parser,$style);      my $bodytext=&Apache::lonxml::get_all_text("/task",$parser,$style);
     if ( $target eq "web" ) {      if ( $target eq "web" ) {
  $result.= $head_tag_start.'</head>'.$body_tag_start;  
  if ($env{'request.state'} eq 'construct') {   if ($env{'request.state'} eq 'construct') {
     $result.=$form_tag_start;      $result.=$form_tag_start;
  }   }
Line 497  DONESCREEN Line 497  DONESCREEN
  }   }
     }      }
  } elsif ($target eq 'web') {   } elsif ($target eq 'web') {
     $result.="$head_tag_start</head>  
               $body_tag_start \n";  
       
     $result.=&preserve_grade_info();      $result.=&preserve_grade_info();
     $result.=&internal_location();      $result.=&internal_location();
     $result.=$form_tag_start.      $result.=$form_tag_start.
Line 510  DONESCREEN Line 508  DONESCREEN
       $target eq 'webgrade') {        $target eq 'webgrade') {
  my $webgrade='yes';   my $webgrade='yes';
  if ($target eq 'webgrade') {   if ($target eq 'webgrade') {
     $result.=$head_tag_start.      $result.= "\n".'<div class="LC_GRADING_task">'."\n".
  '</head>'.$body_tag_start.  
  "\n".'<div class="LC_GRADING_task">'."\n".  
  '<script type="text/javascript"    '<script type="text/javascript" 
                          src="/res/adm/includes/task_grading.js"></script>';                           src="/res/adm/includes/task_grading.js"></script>';
     #$result.='<br />Review'.&show_queue('reviewqueue');      #$result.='<br />Review'.&show_queue('reviewqueue');
Line 596  DONESCREEN Line 592  DONESCREEN
     $result.="\n".'<div id="LC_GRADING_criterialist">';      $result.="\n".'<div id="LC_GRADING_criterialist">';
  }   }
     } elsif ($target eq 'edit') {      } elsif ($target eq 'edit') {
  $result.=$head_tag_start."</head>".$body_tag_start.$form_tag_start.   $result.=$form_tag_start.
     &Apache::structuretags::problem_edit_header();      &Apache::structuretags::problem_edit_header();
  $Apache::lonxml::warnings_error_header=   $Apache::lonxml::warnings_error_header=
     &mt("Editor Errors - these errors might not effect the running of the problem, but they will likely cause problems with further use of the Edit mode. Please use the EditXML mode to fix these errors.")."<br />";      &mt("Editor Errors - these errors might not effect the running of the problem, but they will likely cause problems with further use of the Edit mode. Please use the EditXML mode to fix these errors.")."<br />";

Removed from v.1.140  
changed lines
  Added in v.1.141


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