--- loncom/homework/bridgetask.pm 2006/05/30 12:45:36 1.158
+++ loncom/homework/bridgetask.pm 2006/06/13 15:45:54 1.168
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: bridgetask.pm,v 1.158 2006/05/30 12:45:36 www Exp $
+# $Id: bridgetask.pm,v 1.168 2006/06/13 15:45:54 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -43,23 +43,23 @@ use LONCAPA;
BEGIN {
- &Apache::lonxml::register('Apache::bridgetask',('Task','IntroParagraph','Dimension','Question','Instance','InstanceText','Criteria','ClosingParagraph'));
+ &Apache::lonxml::register('Apache::bridgetask',('Task','IntroParagraph','Dimension','Question','QuestionText','Setup','Instance','InstanceText','Criteria','ClosingParagraph'));
}
+my %dimension_info;
sub initialize_bridgetask {
# id of current Dimension, 0 means that no dimension is current
# (inside Submitted non-existant file $file Submitted file $file '.&mt('Message sent to user: [_1]',
+ $message_status).' '.&mt('Message sent to instructor: [_1]',
+ $comment_status).' Files submitted: $files You are now done with this Bridge Task Files submitted: $files You are now done with this Bridge Task '.$file.
- '
'.$file.
+ '
'.
+ $msg,$user,$domain);
+ $comment_status = '
+
+
+$message_status
+$comment_status
+DONESCREEN
+
+}
+
sub start_Task {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
@@ -455,8 +525,10 @@ sub start_Task {
if ($target eq 'web' && $env{'request.state'} eq 'construct') {
$form_tag_start.=&Apache::structuretags::problem_web_to_edit_header($env{'form.rndseed'});
}
- if ($target eq 'web' || ($target eq 'grade' && !$env{'form.webgrade'}) || $target eq 'answer' ||
- $target eq 'tex') {
+ if ($target eq 'web'
+ || ($target eq 'grade' && !$env{'form.webgrade'})
+ || $target eq 'answer'
+ || $target eq 'tex') {
my ($version,$previous)=&get_version();
($status,$accessmsg,my $slot_name,$slot) =
&Apache::lonhomework::check_slot_access('0','Task');
@@ -493,30 +565,7 @@ sub start_Task {
} elsif ($status eq 'WAITING_FOR_GRADE') {
$msg.=''.&mt('Your submission is in the grading queue.').'
';
} elsif ($env{'form.donescreen'}) {
- my $title=&Apache::lonnet::gettitle();
- my @files=split(',',$Apache::lonhomework::history{'resource.'.$version.'.0.bridgetask.portfiles'});
- 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 .= '
';
-
- $result.=<
-
-
-DONESCREEN
+ $result .= &done_screen($version);
} elsif ($status ne 'NOT_YET_VIEWED') {
$msg.=''.&mt('Not open to be viewed').'
';
}
@@ -592,6 +641,17 @@ DONESCREEN
&mt('Return to resource').'
Empty |
Status | "; } - $result.=" | user | data | user | data | ". + &Apache::loncommon::end_data_table_header_row(); foreach my $key (sort(keys(%queue))) { my ($symb,$uname,$udom) = &decode_queue_key($key); if (!defined($classlist->{$uname.':'.$udom})) { next; } @@ -1277,14 +1390,15 @@ sub show_queue { } if ($key=~/locked$/ && !$with_selects) { - $result.="
---|---|---|---|
$uname | "; + $result.= &Apache::loncommon::start_data_table_row(). + "$uname | "; $result.=''.$queue{$key}.' | |
"; + $result.=&Apache::loncommon::start_data_table_row()." | "; $result.=' | '. &Apache::lonlocal::locallocaltime($queue{$key})." | |
'.$slot_text.' End time: '. &Apache::lonlocal::locallocaltime($end_time). - " |
Showing only sections '.join(', ',@chosen_sections). '.
'."\n"; } - $result.=''.$classlist->{$student}[&Apache::loncoursedata::CL_FULLNAME()]. + $result.=&Apache::loncommon::start_data_table_row(). + ' | '.$classlist->{$student}[&Apache::loncoursedata::CL_FULLNAME()]. ' | ';
} else {
my $seclist;
@@ -1676,8 +1791,8 @@ sub select_user {
$seclist.='';
}
+ $result.=&Apache::loncommon::start_data_table_row();
$result.=<
| |
'; @Apache::scripttag::parser_env = @_; - $result.=&Apache::scripttag::xmlparse($dimension{'criteria.'.$id}); + $result.=&Apache::scripttag::xmlparse($dimension_info{$dim}{'criteria.'.$id}); $result.='
'.$status_display.'
'; if ($Apache::lonhomework::history{"resource.$version.0.$dim.$id.comment"}) { $result.=''.&mt('Comment: [_1]',$Apache::lonhomework::history{"resource.$version.0.$dim.$id.comment"}).'
'; @@ -1939,19 +2087,21 @@ sub get_instance { } elsif ($target eq 'webgrade') { # in case of any side effects that we need @Apache::scripttag::parser_env = @_; - &Apache::scripttag::xmlparse($dimension{'intro'}); + &Apache::scripttag::xmlparse($dimension_info{$dim}{'intro'}); @Apache::scripttag::parser_env = @_; - &Apache::scripttag::xmlparse($dimension{$instance.'.text'}); - foreach my $id (@{$dimension{$instance.'.criterias'}}, - @{$dimension{'criterias'}} ) { + &Apache::scripttag::xmlparse($dimension_info{$dim}{$instance.'.text'}); + @Apache::scripttag::parser_env = @_; + &Apache::scripttag::xmlparse($dimension_info{$dim}{'questiontext'}); + foreach my $id (@{$dimension_info{$dim}{$instance.'.criterias'}}, + @{$dimension_info{$dim}{'criterias'}} ) { my $link=&link($id); my $status=$Apache::lonhomework::history{"resource.$version.0.$dim.$id.status"}; $result.='