Diff for /loncom/homework/bridgetask.pm between versions 1.80 and 1.81

version 1.80, 2005/11/21 17:47:37 version 1.81, 2005/11/21 21:51:29
Line 60  sub initialize_bridgetask { Line 60  sub initialize_bridgetask {
 }  }
   
 sub proctor_check_auth {  sub proctor_check_auth {
     my ($slot_name,$slot)=@_;      my ($slot_name,$slot,$type)=@_;
     my $user=$env{'form.proctorname'};      my $user=$env{'form.proctorname'};
     my $domain=$env{'form.proctordomain'};      my $domain=$env{'form.proctordomain'};
           
Line 79  sub proctor_check_auth { Line 79  sub proctor_check_auth {
     $authenticated=1;      $authenticated=1;
  }   }
     }      }
     if ($authenticated) {      if ($authenticated && $type eq 'Task') {
  my $version=   my $version=
     $Apache::lonhomework::results{'resource.version'}=      $Apache::lonhomework::results{'resource.version'}=
     ++$Apache::lonhomework::history{'resource.version'};      ++$Apache::lonhomework::history{'resource.version'};
Line 93  sub proctor_check_auth { Line 93  sub proctor_check_auth {
     }      }
  }   }
  return 1;   return 1;
       } elsif ($authenticated && $type eq 'problem') {
    &Apache::lonxml::debug("authed #slot_name");
    $Apache::lonhomework::results{"resource.0.checkedin"}=
       $user.'@'.$domain;
    $Apache::lonhomework::results{"resource.0.checkedin.slot"}=
       $slot_name;
     }      }
  }   }
     }      }
Line 416  sub start_Task { Line 422  sub start_Task {
  $target eq 'tex') {   $target eq 'tex') {
  my ($version,$previous)=&get_version();   my ($version,$previous)=&get_version();
  ($status,$accessmsg,my $slot_name,$slot) =    ($status,$accessmsg,my $slot_name,$slot) = 
     &Apache::lonhomework::check_task_access('0');      &Apache::lonhomework::check_slot_access('0','Task');
  push(@Apache::inputtags::status,$status);   push(@Apache::inputtags::status,$status);
  $Apache::inputtags::slot_name=$slot_name;   $Apache::inputtags::slot_name=$slot_name;
  my $expression='$external::datestatus="'.$status.'";';   my $expression='$external::datestatus="'.$status.'";';
Line 470  DONESCREEN Line 476  DONESCREEN
  }   }
     } elsif ($target eq 'grade' && !$env{'form.webgrade'}) {      } elsif ($target eq 'grade' && !$env{'form.webgrade'}) {
  if ($status eq 'NEEDS_CHECKIN') {   if ($status eq 'NEEDS_CHECKIN') {
     if(&proctor_check_auth($slot_name,$slot)) {      if(&proctor_check_auth($slot_name,$slot,'Task')) {
  my $result=&add_to_queue('gradingqueue',   my $result=&add_to_queue('gradingqueue',
  $Apache::inputtags::slot_name);   $Apache::inputtags::slot_name);
  &Apache::lonxml::debug("add_to_queue said $result");   &Apache::lonxml::debug("add_to_queue said $result");
Line 525  DONESCREEN Line 531  DONESCREEN
  } else {   } else {
     if ($target eq 'webgrade') {      if ($target eq 'webgrade') {
  $result.="\n";   $result.="\n";
    my $back='<p><a href="/adm/flip?postdata=return:">'.
       &mt('Return to resource').'</a></p>';
  if      ($status_code eq 'stop') {   if      ($status_code eq 'stop') {
     $result.='<b>'.&mt("Stopped grading.").'</b>';      $result.='<b>'.&mt("Stopped grading.").'</b>'.$back;
  } elsif ($status_code eq 'lock_failed') {   } elsif ($status_code eq 'lock_failed') {
     $result.='<b>'.&mt("Failed to lock the request record.").'</b>';      $result.='<b>'.&mt("Failed to lock the request record.")
    .'</b>'.$back;
  } elsif ($status_code eq 'unlock') {   } elsif ($status_code eq 'unlock') {
     $result.='<b>'.&mt("Unlocked the requested record.").'</b>';      $result.='<b>'.&mt("Unlocked the requested record.")
    .'</b>'.$back;
     $result.=&show_queue($env{'form.queue'},1);      $result.=&show_queue($env{'form.queue'},1);
  } elsif ($status_code eq 'show_list') {   } elsif ($status_code eq 'show_list') {
     $result.=&show_queue($env{'form.queue'},1);      $result.=&show_queue($env{'form.queue'},1);
  } elsif ($status_code eq 'select_user') {   } elsif ($status_code eq 'select_user') {
     $result.=&select_user();      $result.=&select_user();
  } else {   } else {
     $result.='<b>'.&mt("No user to be graded.").'</b>';      $result.='<b>'.&mt("No user to be graded.").'</b>'.$back;
  }   }
     }      }
     $webgrade='no';      $webgrade='no';

Removed from v.1.80  
changed lines
  Added in v.1.81


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