--- loncom/homework/inputtags.pm 2011/06/06 18:55:54 1.287
+++ loncom/homework/inputtags.pm 2011/10/08 19:19:58 1.295
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# input definitons
#
-# $Id: inputtags.pm,v 1.287 2011/06/06 18:55:54 www Exp $
+# $Id: inputtags.pm,v 1.295 2011/10/08 19:19:58 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -571,7 +571,7 @@ sub file_selector {
if ($which eq 'uploadonly' || $which eq 'both') {
$result.=&mt('Submit a file: (only one file per submission)').
'
';
+ $jspart.'_'.$id.'" id="HWFILE'.$jspart.'_'.$id.'" />
';
}
if ( $which eq 'both') {
$result.='
'.''.&mt('OR:').'
';
@@ -885,8 +885,8 @@ sub decideoutput {
$message=&mt('Incorrect.');
$css_class=$possible_class{'charged_try'};
}
- if ($env{'request.filename'} =~
- m|/res/lib/templates/examupload.problem$|) {
+ if ($handgrade ||
+ ($env{'request.filename'}=~/\/res\/lib\/templates\/(examupload|DropBox).problem$/)) {
$message = &mt("A score has been assigned.");
$added_computer_text=1;
} else {
@@ -1320,11 +1320,10 @@ sub setgradedata {
if ($award eq 'SUBMITTED') {
&Apache::response::add_to_gradingqueue();
}
- if (($Apache::lonhomework::type eq 'anonsurvey') ||
- ($Apache::lonhomework::type eq 'anonsurveycred') ||
- ($Apache::lonhomework::type eq 'randomizetry')) {
- $Apache::lonhomework::results{"resource.$id.type"} = $Apache::lonhomework::type;
- }
+ $Apache::lonhomework::results{"resource.$id.type"} = $Apache::lonhomework::type;
+ $Apache::lonhomework::results{"resource.$id.duedate"} = &Apache::lonnet::EXT("resource.$id.duedate");
+ $Apache::lonhomework::results{"resource.$id.hinttries"} = &Apache::lonnet::EXT("resource.$id.hinttries");
+ $Apache::lonhomework::results{"resourse.$id.version"} = &Apache::lonnet::usedversion();
}
sub find_which_previous {
@@ -1437,28 +1436,30 @@ sub get_grade_messages {
if ( $tries eq '' ) { $tries = '0'; }
if ( $maxtries eq '' ) { $maxtries = '2'; }
if ( $maxtries eq 'con_lost' ) { $maxtries = '0'; }
- my $tries_text= &get_tries_text();;
+ my $tries_text= &get_tries_text();
if ($showbutton) {
if ($target eq 'tex') {
if ($env{'request.state'} ne "construct"
&& $Apache::lonhomework::type ne 'exam'
&& $env{'form.suppress_tries'} ne 'yes') {
- $trystr = ' {\vskip 1 mm \small \textit{'.$tries_text.'} '.
- $tries.'/'.$maxtries.'} \vskip 2 mm ';
+ $trystr ='{\vskip 1 mm \small '
+ .&mt('[_1]'.$tries_text.'[_2] [_3]'
+ ,'\textit{','}',$tries.'/'.$maxtries )
+ .'} \vskip 2 mm';
} else {
$trystr = '\vskip 0 mm ';
}
} else {
- $trystr = '