'."\n";
+ }
+
if ($target eq 'web' && $env{'request.state'} ne 'construct') {
- if ($Apache::lonhomework::modifygrades) {
- $body_tag_start.='
";
+ $result.=$uri.'">'.&add_grading_button()."";
my $symb=&Apache::lonnet::symbread();
if (&Apache::lonnet::allowed('mgq',$env{'request.course.id'})) {
- $body_tag_start.='
';
+ my $target_id =
+ &Apache::lonstathelpers::make_target_id({symb => $symb,
+ part => '0'});
+ $result.='
';
}
}
}
@@ -449,11 +435,10 @@ sub start_Task {
$expression.='$external::gradestatus="'.$Apache::lonhomework::history{"resource.$version.0.solved"}.'";';
&Apache::run::run($expression,$safeeval);
&Apache::lonxml::debug("Got $status");
- $body_tag_start.=&add_previous_version_button($status);
+ $result.=&add_previous_version_button($status);
if (!&show_task($status,$previous)) {
my $bodytext=&Apache::lonxml::get_all_text("/task",$parser,$style);
if ( $target eq "web" ) {
- $result.= $head_tag_start.''.$body_tag_start;
if ($env{'request.state'} eq 'construct') {
$result.=$form_tag_start;
}
@@ -471,7 +456,20 @@ sub start_Task {
} elsif ($env{'form.donescreen'}) {
my $title=&Apache::lonnet::gettitle();
my @files=split(',',$Apache::lonhomework::history{'resource.'.$version.'.0.bridgetask.portfiles'});
- my $files='
';
+ my (undef,undef,$domain,$user)=
+ &Apache::lonxml::whichuser();
+ my $files = '
';
+ foreach my $file (@files) {
+ my $url="/uploaded/$domain/$user/portfolio$file";
+ if (! &Apache::lonnet::stat_file($url)) {
+ $file = &mt(' Nonexistant file: [_1]',$file);
+ } else {
+ $file = ''.$file.'';
+ }
+ $files .= '- '.$file.'
';
+ }
+ $files.='
';
+
$result.=<
$title
Files submitted: $files
@@ -498,17 +496,18 @@ DONESCREEN
if ($status eq 'NEEDS_CHECKIN') {
if(&proctor_check_auth($slot_name,$slot,'Task')
&& defined($Apache::inputtags::slot_name)) {
- my $result=&add_to_queue('gradingqueue',
- [$Apache::inputtags::slot_name]);
+ my $result=
+ &add_to_queue('gradingqueue',
+ {'type' => 'task',
+ 'time' => time,
+ 'slot' =>
+ $Apache::inputtags::slot_name});
&Apache::lonxml::debug("add_to_queue said $result");
}
}
}
} elsif ($target eq 'web') {
- my $name= &Apache::structuretags::get_resource_name($parstack,$safeeval);
- $result.="$head_tag_start$name
- $body_tag_start \n".&style();
-
+
$result.=&preserve_grade_info();
$result.=&internal_location();
$result.=$form_tag_start.
@@ -519,7 +518,9 @@ DONESCREEN
$target eq 'webgrade') {
my $webgrade='yes';
if ($target eq 'webgrade') {
- $result.=$head_tag_start.$body_tag_start;
+ $result.= "\n".''."\n".
+ '';
#$result.='
Review'.&show_queue('reviewqueue');
#$result.='
Grade'.&show_queue('gradingqueue');
}
@@ -541,13 +542,9 @@ DONESCREEN
$Apache::bridgetask::queue_key=$todo;
&Apache::structuretags::initialize_storage();
&Apache::lonhomework::showhash(%Apache::lonhomework::history);
- if ($target eq 'webgrade') {
- #$result.='
After -'.&show_queue($env{'form.queue'});
- $result.="\n".'
';
- if ($status_code eq 'selected') {
- $form_tag_start.=
- '';
- }
+ if ($target eq 'webgrade' && $status_code eq 'selected') {
+ $form_tag_start.=
+ '';
}
} else {
if ($target eq 'webgrade') {
@@ -601,8 +598,11 @@ DONESCREEN
}
if ($webgrade eq 'yes') { $result.=&webgrade_standard_info(); }
}
+ if ($target eq 'webgrade') {
+ $result.="\n".'';
+ }
} elsif ($target eq 'edit') {
- $result.=$head_tag_start."".$body_tag_start.$form_tag_start.
+ $result.=$form_tag_start.
&Apache::structuretags::problem_edit_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.")."
";
@@ -638,7 +638,7 @@ sub get_key_todo {
}
- my $me=$env{'user.name'}.'@'.$env{'user.domain'};
+ my $me=$env{'user.name'}.':'.$env{'user.domain'};
#need to try both queues..
if (defined($env{'form.regradeaspecificsubmission'}) &&
@@ -684,7 +684,7 @@ sub get_key_todo {
#otherwise (defined($who) && $who ne $me) some else has it...
return (undef,'not_allowed',
&mt('Another user ([_1]) currently has the record for [_2] locked.',
- $who,$env{'form.gradinguser'}.'@'.$env{'form.gradingdomain'}));
+ $who,$env{'form.gradinguser'}.':'.$env{'form.gradingdomain'}));
}
@@ -794,8 +794,9 @@ sub end_Task {
&show_task($status,$previous)) {
$result.=&Apache::inputtags::gradestatus('0');
$result.='';
+ my $action = &Apache::lonenc::check_encrypt($env{'request.uri'});
$result.=<
+
@@ -812,7 +813,7 @@ DONEBUTTON
my $start_time=
&Apache::lonlocal::locallocaltime($slot{'starttime'});
- my $status = "\n\n";
+ my $status = "\n
\n";
if ($bt_status eq 'pass') {
$status.='
You passed the '.$title.' given on '.
@@ -848,8 +849,9 @@ DONEBUTTON
$result=~s/\Q$internal_location\E/$status/;
}
}
- if ($target eq 'web' || $target eq 'webgrade') {
- $result.=&Apache::lonxml::xmlend().'