version 1.40, 2005/08/15 19:36:21
|
version 1.46, 2005/09/09 18:45:56
|
Line 148 sub add_grading_button {
|
Line 148 sub add_grading_button {
|
&mt("Get a submission to grade").'" />'; |
&mt("Get a submission to grade").'" />'; |
$result.='<input type="hidden" name="grade_target" value="webgrade" />'; |
$result.='<input type="hidden" name="grade_target" value="webgrade" />'; |
if (&Apache::lonnet::allowed('mgq',$env{'request.course.id'})) { |
if (&Apache::lonnet::allowed('mgq',$env{'request.course.id'})) { |
# FIXME need a permission for limiting this to 'powerful users' |
|
|
|
my ($entries,$ready,$locks)=&get_queue_counts('gradingqueue'); |
my ($entries,$ready,$locks)=&get_queue_counts('gradingqueue'); |
$result.='<p>'.&mt("Grading Queue has [_1] entries. [_2] of them are ready to be graded and [_3] of them are currently being graded",$entries,$ready,$locks); |
$result.='<p>'.&mt("Grading Queue has [_1] entries. [_2] of them are ready to be graded and [_3] of them are currently being graded",$entries,$ready,$locks); |
|
|
Line 285 sub start_Task {
|
Line 283 sub start_Task {
|
} |
} |
} 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)) { |
&proctor_check_auth($slot_name,$slot); |
# FIXME immeadiatly add this to the grading queue |
|
# with slot->{'endtime'} for when grading can |
|
# begin on this resource |
|
# FIXME I think the above is done by default, |
|
# need to check that |
|
# failure doesn't do this. |
|
} |
|
} |
} |
} |
} |
} elsif ($target eq 'web') { |
} elsif ($target eq 'web') { |
Line 471 sub end_Task {
|
Line 462 sub end_Task {
|
$result.="\n".'<table border="1">'. |
$result.="\n".'<table border="1">'. |
&Apache::inputtags::file_selector("$version.0", |
&Apache::inputtags::file_selector("$version.0", |
"bridgetask","*", |
"bridgetask","*", |
'portfolioonly'). |
'portfolioonly', |
|
' |
|
<h2>'.&mt('Submit Portfolio Files for Grading').'</h2> |
|
<p>'.&mt('Indicate the files from your portfolio to be evaluated in grading this task.').'</p>'). |
"</table>"; |
"</table>"; |
$result.=&Apache::inputtags::gradestatus('0'); |
$result.=&Apache::inputtags::gradestatus('0'); |
} |
} |
Line 1045 sub get_instance {
|
Line 1039 sub get_instance {
|
$result.='<tr><td colspan="4">'; |
$result.='<tr><td colspan="4">'; |
my (undef,undef,$udom,$uname) = &Apache::lonxml::whichuser(); |
my (undef,undef,$udom,$uname) = &Apache::lonxml::whichuser(); |
my $file_url = '/uploaded/'.$udom.'/'.$uname.'/portfolio'; |
my $file_url = '/uploaded/'.$udom.'/'.$uname.'/portfolio'; |
foreach my $partial_file (split(',',$Apache::lonhomework::history{"resource.$version.bridgetask.portfiles"})) { |
foreach my $partial_file (split(',',$Apache::lonhomework::history{"resource.$version.0.bridgetask.portfiles"})) { |
my $file=$file_url.$partial_file; |
my $file=$file_url.$partial_file; |
&Apache::lonnet::allowuploaded('/adm/bridgetask',$file); |
&Apache::lonnet::allowuploaded('/adm/bridgetask',$file); |
$result.='<a href="'.$file.'" target="lonGRDs"><img src="'. |
$result.='<a href="'.$file.'" target="lonGRDs"><img src="'. |
Line 1179 sub proctor_validation_screen {
|
Line 1173 sub proctor_validation_screen {
|
my ($slot) = @_; |
my ($slot) = @_; |
my (undef,undef,$domain,$user) = &Apache::lonxml::whichuser(); |
my (undef,undef,$domain,$user) = &Apache::lonxml::whichuser(); |
my $url=&Apache::lonnet::studentphoto($domain,$user,'jpg'); |
my $url=&Apache::lonnet::studentphoto($domain,$user,'jpg'); |
$user=$env{'form.proctorname'}; |
my $name=&Apache::loncommon::plainname($user,$domain); |
if ($env{'form.proctordomain'}) { $domain=$env{'form.proctordomain'}; } |
|
my $msg; |
my $msg; |
if ($env{'form.proctorpassword'}) { |
if ($env{'form.proctorpassword'}) { |
$msg='<p><font color="red">'.&mt("Failed to authenticate the proctor.") |
$msg='<p><font color="red">'.&mt("Failed to authenticate the proctor.") |
Line 1194 sub proctor_validation_screen {
|
Line 1188 sub proctor_validation_screen {
|
<input type="hidden" name="validate" value="yes" /> |
<input type="hidden" name="validate" value="yes" /> |
<input type="hidden" name="submitted" value="yes" /> |
<input type="hidden" name="submitted" value="yes" /> |
<table> |
<table> |
<tr><td>Proctor's Username:</td><td><input type="string" name="proctorname" value="$user" /></td></tr> |
<tr><td>Proctor's Username:</td><td><input type="string" name="proctorname" value="$env{'form.proctorname'}" /></td></tr> |
<tr><td>Password:</td><td><input type="password" name="proctorpassword" value="" /></td></tr> |
<tr><td>Password:</td><td><input type="password" name="proctorpassword" value="" /></td></tr> |
<tr><td>Proctor's Domain:</td><td><input type="string" name="proctordomain" value="$domain" /></td></tr> |
<tr><td>Proctor's Domain:</td><td><input type="string" name="proctordomain" value="$env{'form.proctordomain'}" /></td></tr> |
</table> |
</table> |
<input type="submit" name="checkoutbutton" value="Validate" /><br /> |
<input type="submit" name="checkoutbutton" value="Validate" /><br /> |
Student who should be logged in is:<br /> |
<table border="1"> |
<img src="$url" /><br /> |
<tr><td> |
|
<table> |
|
<tr><td colspan="2">Student who should be logged in is:</td></tr> |
|
<tr><td>Name:</td><td>$name</td></tr> |
|
<tr><td>Student ID:</td><td>$env{'environment.id'}</td></tr> |
|
<tr><td>Usename</td><td>$user\@$domain</td></tr> |
|
<tr><td colspan="2"><img src="$url" /></td></tr> |
|
</table> |
|
</tr></td> |
|
</table> |
</form> |
</form> |
ENDCHECKOUT |
ENDCHECKOUT |
return $result; |
return $result; |