--- loncom/homework/inputtags.pm 2008/12/15 20:24:53 1.254 +++ loncom/homework/inputtags.pm 2009/09/23 03:15:18 1.259.2.1 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # input definitons # -# $Id: inputtags.pm,v 1.254 2008/12/15 20:24:53 raeburn Exp $ +# $Id: inputtags.pm,v 1.259.2.1 2009/09/23 03:15:18 gci Exp $ # # Copyright Michigan State University Board of Trustees # @@ -388,12 +388,13 @@ sub start_textline { && $Apache::lonhomework::type ne 'exam') { my $size = &Apache::lonxml::get_param('size',$parstack,$safeeval); if ($size != 0) {$size=$size*2; $size.=' mm';} else {$size='40 mm';} - if ($env{'form.pdfFormFields'} eq 'yes') { + if ($env{'form.pdfFormFields'} eq 'yes' + && $Apache::inputtags::status[-1] eq 'CAN_ANSWER') { my $fieldname = $env{'request.symb'}. '&part_'. $Apache::inputtags::part. '&textresponse'. '&HWVAL_' . $Apache::inputtags::response['-1']; - $result="\n\\\\\n".'\textField{'.$fieldname.'}{'.$size.'}{12 bp}'; + $result='\textField{'.$fieldname.'}{'.$size.'}{12 bp}'; } else { $result='\framebox['.$size.'][s]{\tiny\strut}'; } @@ -735,7 +736,7 @@ sub decideoutput { '.disable_receipt_display'} ne 'yes') && ($Apache::lonhomework::type ne 'practice')) { $message.=(($target eq 'web')?'
':' '). - &mt('Your receipt is [_1]', + &mt('Your receipt no. is [_1]', (&Apache::lonnet::receipt($Apache::inputtags::part). (($target eq 'web')?&Apache::loncommon::help_open_topic('Receipt'):''))); } @@ -817,7 +818,7 @@ sub decideoutput { $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.'); + $message = &mt("Submission won't be graded. The type of file submitted is not allowed."); $css_class=$possible_class{'not_charged_try'}; $button=1; } elsif ($award eq 'SIG_FAIL') { @@ -868,11 +869,15 @@ sub decideoutput { $css_class=$possible_class{'charged_try'}; $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') { - $message = &mt("A draft copy has been saved."); + $message = &mt("Copy saved but not submitted."); $css_class=$possible_class{'not_charged_try'}; $button=1; } elsif ($award eq 'ASSIGNED_SCORE') { @@ -921,9 +926,16 @@ 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."); - $css_class=$possible_class{'no_grade'}; - $button=1; + 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; } if ($Apache::inputtags::status[-1] eq 'SHOW_ANSWER' && !$added_computer_text && $target ne 'tex') { @@ -1236,16 +1248,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.=""; } } @@ -1286,13 +1302,17 @@ sub gradestatus { undef($previousmsg); } if ( $showbutton ) { - if ($target ne 'tex') { + 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.'" />'; } } @@ -1400,11 +1420,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;