--- loncom/homework/bridgetask.pm 2012/04/11 11:40:00 1.259 +++ loncom/homework/bridgetask.pm 2021/12/30 16:37:44 1.264.8.1.2.1 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: bridgetask.pm,v 1.259 2012/04/11 11:40:00 goltermann Exp $ +# $Id: bridgetask.pm,v 1.264.8.1.2.1 2021/12/30 16:37:44 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -65,8 +65,9 @@ sub initialize_bridgetask { sub proctor_check_auth { my ($slot_name,$slot,$type)=@_; my $user=$env{'form.proctorname'}; + $user =~ s/^\s+|\s+$//g; my $domain=$env{'form.proctordomain'}; - + my @allowed=split(",",$slot->{'proctor'}); foreach my $possible (@allowed) { my ($puser,$pdom)=(split(':',$possible)); @@ -252,11 +253,11 @@ sub add_grading_button { $size=scalar(keys(%sections))+2; } my $sec_select = "\n".'\n"; + $sec_select .= "\t".'\n\n"; my $uri=$env{'request.uri'}; if ($env{'request.enc'}) { $uri=&Apache::lonenc::encrypted($uri); } @@ -681,7 +682,8 @@ sub start_Task { $target eq 'tex') { if ($env{'form.markaccess'}) { my @interval=&Apache::lonnet::EXT("resource.0.interval"); - &Apache::lonnet::set_first_access($interval[1]); + my ($timelimit) = ($interval[0] =~ /^(\d+)/); + &Apache::lonnet::set_first_access($interval[1],$timelimit); } } @@ -719,7 +721,15 @@ sub start_Task { 'slot' => $slot_name}); ($version,$previous)=&get_version(); } - + if (($target eq 'web') && ($version ne '') && ($slot_name ne '')) { + if (ref($slot) eq 'HASH') { + if ($slot->{'endtime'} > time()) { + $result .= + &Apache::lonhtmlcommon::set_due_date($slot->{'endtime'}); + } + } + } + my $status_id = 'LC_task_take'; if ($previous && $target eq 'answer') { $status_id = 'LC_task_answer'; @@ -988,7 +998,7 @@ sub get_key_todo { my $classlist=&get_limited_classlist(); if (!&allow_grade_user($classlist->{$uname.':'.$udom})) { return (undef,'not_allowed', - &mt('Requested student ([_1]) is in a section you aren\'t allowed to grade.',$uname.':'.$udom)); + &mt("Requested student ([_1]) is in a section you aren't allowed to grade.",$uname.':'.$udom)); } } my $gradingkey=&encode_queue_key($symb,$udom,$uname); @@ -1399,7 +1409,7 @@ DONEBUTTON if ($canstore) { &Apache::structuretags::finalize_storage(); my @interval = &Apache::lonnet::EXT("resource.0.interval"); - if ($interval[0] =~ /^\d+$/ && $interval[1] eq 'resource') { + if ($interval[0] =~ /^\d+/ && $interval[1] eq 'resource') { my $key=$courseid."\0".$symb; my %times=&Apache::lonnet::get('firstaccesstimes', [$key],$domain,$name); @@ -1788,7 +1798,7 @@ sub show_queue { $result.=(<$status -
+ @@ -2207,7 +2217,7 @@ sub select_user { $result.=&Apache::loncommon::start_data_table_row(); $result.=< - + @@ -3277,9 +3287,9 @@ sub proctor_validation_screen { - - - + + +
$lt{'prus'}
$lt{'pasw'}
$lt{'prdo'}
$lt{'prus'}
$lt{'pasw'}
$lt{'prdo'}