--- loncom/homework/inputtags.pm 2013/07/24 18:21:42 1.319 +++ loncom/homework/inputtags.pm 2013/08/29 13:02:11 1.322 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # input definitons # -# $Id: inputtags.pm,v 1.319 2013/07/24 18:21:42 bisitz Exp $ +# $Id: inputtags.pm,v 1.322 2013/08/29 13:02:11 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -222,7 +222,7 @@ sub start_textfield { $oldresponse = $Apache::lonhomework::history{"resource.$partid.$resid.submission"}; } elsif (($Apache::lonhomework::history{"resource.$partid.type"} eq 'anonsurvey') || ($Apache::lonhomework::history{"resource.$partid.type"} eq 'anonsurveycred')) { - $oldresponse = '* '.&mt('only shown to submitter').' *'; + $oldresponse = '* '.&mt('(only shown to submitter)').' *'; } else { $oldresponse = $Apache::lonhomework::history{"resource.$partid.$resid.submission"}; } @@ -424,7 +424,7 @@ sub start_textline { ($Apache::lonhomework::history{"resource.$partid.type"} eq 'anonsurveycred') || ($Apache::lonhomework::type eq 'anonsurvey') || ($Apache::lonhomework::type eq 'anonsurveycred')) { - $oldresponse = '* '.&mt('only shown to submitter').' *'; + $oldresponse = '* '.&mt('(only shown to submitter)').' *'; } else { $oldresponse = $Apache::lonhomework::history{"resource.$partid.$id.submission"}; } @@ -691,7 +691,8 @@ sub current_file_submissions { my $uploadedfile=$Apache::lonhomework::history{"resource.$part.$id.uploadedfile"}; my $portfiles=$Apache::lonhomework::history{"resource.$part.$id.portfiles"}; return if (($uploadedfile eq '') && ($portfiles !~/[^\s]/)); - my $header = &Apache::loncommon::start_data_table(). + my $header = &portpath_popup_js(). + &Apache::loncommon::start_data_table(). &Apache::loncommon::start_data_table_header_row(); if ($Apache::inputtags::status[-1] eq 'CAN_ANSWER') { $header .= ''.&mt('Delete?').''; @@ -757,13 +758,24 @@ sub current_file_submissions { ' value="'.$portfile.'" id="HWFILE'.$jspart.'_'.$id.'_'.$num.'_delete" />'."\n"; $num ++; } - my $showname = $rows{$url}{path}.$name; + my $pathid = 'HWFILE'.$jspart.'_'.$id.'_'.$num.'_path'; + my $pathidtext = $pathid.'text'; + my ($showname,$showpath); if ($legacy{$url}) { $showname = $name.' '.&mt('not in portfolio'); + } else { + $showname = $name; + $showpath = '
'. + ''. + ''. + &mt('(Show path)').''. + '
'.$rows{$url}{path}.$name. +'
'; } $result .= ''.$showname.''."\n". + '" border="0" alt="" />'.$showname.''.$showpath.''."\n". ''.$rows{$url}{size}.''."\n". ''.$rows{$url}{lastmodified}.''."\n". &Apache::loncommon::end_data_table_row(); @@ -818,6 +830,43 @@ sub current_file_info { return ($status,\%info,$error); } +sub portpath_popup_js { + my %lt = &Apache::lonlocal::texthash( + show => '(Show path)', + hide => '(Hide)', + ); + return <<"END"; + + +END +} + sub valid_award { my ($award) =@_; foreach my $possibleaward ('EXTRA_ANSWER','MISSING_ANSWER', 'ERROR', @@ -1088,7 +1137,7 @@ sub decideoutput { $css_class=$possible_class{'not_charged_try'}; $button=1; } elsif ($award eq 'EXCESS_FILESIZE') { - $message = &mt('Submission won\'t be graded. The combined size of submitted files exceeded the amount allowed.'); + $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 'FILENAME_INUSE') {