--- loncom/homework/inputtags.pm 2008/12/10 22:54:12 1.248.2.2 +++ loncom/homework/inputtags.pm 2009/09/14 17:03:42 1.248.4.2 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # input definitons # -# $Id: inputtags.pm,v 1.248.2.2 2008/12/10 22:54:12 raeburn Exp $ +# $Id: inputtags.pm,v 1.248.4.2 2009/09/14 17:03:42 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -776,7 +776,6 @@ sub decideoutput { $message = &mt('Submission won\'t be graded. The combined size of submitted files exceeded the amount allowed.'); $css_class=$possible_class{'not_charged_try'}; $button=1; - } elsif ($award eq 'INVALID_FILETYPE') { $message = &mt('Submission won\'t be graded. The type of file submitted is not allowed.'); $css_class=$possible_class{'not_charged_try'}; @@ -830,6 +829,11 @@ sub decideoutput { $button=1; } elsif ($award eq 'SUBMITTED') { $message = &mt("Your submission has been recorded."); + if ($env{'request.uri'} eq '/res/gci/gci/internal/submission.problem') { + if ($target eq 'web') { + $message .= '
'.&mt('Thank you for making a submission to the Geosciences Concept Inventory via the GCI Web Center.'); + } + } $css_class=$possible_class{'no_grade'}; $button=1; } elsif ($award eq 'DRAFT') { @@ -855,21 +859,41 @@ sub decideoutput { my (undef,undef,$domain,$user)=&Apache::lonnet::whichuser(); foreach my $resid(@Apache::inputtags::response){ if ($Apache::lonhomework::history{"resource.$part.$resid.handback"}) { - $message.='
'; + if ($target eq 'tex') { + $message.= "\\\\\n"; + } else { + $message.='
'; + } my @files = split(/\s*,\s*/, $Apache::lonhomework::history{"resource.$part.$resid.handback"}); my $file_msg; foreach my $file (@files) { - $file_msg.= '
'.$file.''; + if ($target eq 'tex') { + $file_msg.= "\\\\\n".$file; + } else { + $file_msg.= '
'.$file.''; + } } $message .= &mt('Returned file(s): [_1]',$file_msg); + if ($target eq 'tex') { + $message.= "\\\\\n"; + } else { + $message.='
'; + } } } 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."); + if ($env{'request.uri'} eq '/res/gci/gci/internal/submission.problem') { + if ($target eq 'web') { + $message = &mt("Your submission has been recorded.").'
'. + &mt('Thank you for making a submission to the Geosciences Concept Inventory via the GCI Web Center.'); + } + } else { + $message = &mt("Answer Submitted: Your final submission will be graded after the due date."); + } $css_class=$possible_class{'no_grade'}; $button=1; } @@ -1184,16 +1208,20 @@ sub get_grade_messages { $trystr = '\vskip 0 mm '; } } else { - $trystr = "".$tries_text." $tries"; - if ($Apache::lonhomework::parsing_a_task) { - } elsif($env{'request.state'} ne 'construct') { - $trystr.="/$maxtries"; - } else { - if (defined($Apache::inputtags::params{'maxtries'})) { - $trystr.="/".$Apache::inputtags::params{'maxtries'}; - } - } - $trystr.=""; + $trystr = ''; + my %parmhash=&Apache::lonnet::coursedescription($env{'request.course.id'}); + if ($parmhash{'suppress_tries'} ne 'yes') { + $trystr .= "$tries_text $tries"; + if ($Apache::lonhomework::parsing_a_task) { + } elsif($env{'request.state'} ne 'construct') { + $trystr.="/$maxtries"; + } else { + if (defined($Apache::inputtags::params{'maxtries'})) { + $trystr.="/".$Apache::inputtags::params{'maxtries'}; + } + } + } + $trystr.=""; } } @@ -1233,14 +1261,18 @@ sub gradestatus { if ( $status eq 'SHOW_ANSWER') { undef($previousmsg); } - if ( $showbutton ) { - if ($target ne 'tex') { + if ( $showbutton ) { + if ($target ne 'tex') { + my $submit_text = &mt('Submit Answer'); + if ($env{'request.uri'} eq '/res/gci/gci/internal/submission.problem') { + $submit_text = &mt('Submit Questions'); + } $button = ''; + value="'.$submit_text.'" />'; } } @@ -1348,11 +1380,15 @@ sub previous_tries { $prefix =~ tr{.}{_}; my $function_name = "LONCAPA_previous_tries_".$prefix. $Apache::lonxml::curdepth.'_'.$env{'form.counter'}; + my $triestext = &mt('Previous Tries'); + if ($env{'request.uri'} eq '/res/gci/gci/internal/submission.problem') { + $triestext = &mt('Submission History'); + } my $result ="".&mt("Previous Tries")."
"; +".$triestext."
"; #use Data::Dumper; #&Apache::lonnet::logthis(&Dumper(\%Apache::inputtags::submission_display)); return $result;