--- loncom/homework/inputtags.pm 2012/03/11 20:17:10 1.302
+++ loncom/homework/inputtags.pm 2012/06/12 22:02:24 1.304
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# input definitons
#
-# $Id: inputtags.pm,v 1.302 2012/03/11 20:17:10 raeburn Exp $
+# $Id: inputtags.pm,v 1.304 2012/06/12 22:02:24 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -576,8 +576,20 @@ sub file_selector {
if ( $which eq 'both') {
$result.='
'.''.&mt('OR:').'
';
}
- if ($which eq 'portfolioonly' || $which eq 'both') {
- $result.=$extratext.''.
+ if ($which eq 'portfolioonly' || $which eq 'both') {
+ my $symb = $env{'request.symb'};
+ (undef,undef,my $res)=&Apache::lonnet::decode_symb($symb);
+ my $showsymb;
+ # If resource is a .task and URL is unencrypted, include symb in query string
+ # for url opened in portfolio file selection window. Can be used to override
+ # blocking of portfolio access resulting from an exam event in a different course.
+ if ($res =~ /\.task$/i) {
+ my $encsymb = &Apache::lonenc::check_encrypt($symb);
+ if ($symb eq $encsymb) {
+ $showsymb = $symb;
+ }
+ }
+ $result.=$extratext.''.
&mt('Select Portfolio Files: (one or more files per submission)').'
'.
''.
'
';
@@ -1127,7 +1139,17 @@ sub decideoutput {
if (&Apache::lonhomework::hide_problem_status()
&& $Apache::inputtags::status[-1] ne 'SHOW_ANSWER'
&& &hide_award($award)) {
- $message = &mt("Answer Submitted: Your final submission will be graded after the due date.");
+ $message = &mt("Answer Submitted: Your final submission will be graded after the due date.");
+ my @interval= &Apache::lonnet::EXT("resource.$part.interval");
+ if ($interval[0] =~ /\d+/) {
+ my $first_access=&Apache::lonnet::get_first_access($interval[1]);
+ if (defined($first_access)) {
+ my $due_date= &Apache::lonnet::EXT("resource.$part.duedate");
+ unless (($due_date) && ($due_date < $first_access + $interval[0])) {
+ $message = &mt("Answer Submitted: Your final submission will be graded when the time limit is reached.");
+ }
+ }
+ }
$css_class=$possible_class{'no_grade'};
$button=1;
}