--- loncom/homework/grades.pm 2010/02/28 23:31:42 1.596 +++ loncom/homework/grades.pm 2010/03/11 16:29:42 1.597 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.596 2010/02/28 23:31:42 raeburn Exp $ +# $Id: grades.pm,v 1.597 2010/03/11 16:29:42 wenzelju Exp $ # # Copyright Michigan State University Board of Trustees # @@ -425,7 +425,7 @@ sub cleanRecord { return '
'. ''.$toprow.''. ''. - $grayFont.$bottomrow.''.'
'.&mt('Answer').'
'.$grayFont.&mt('Option ID').'
'; + $bottomrow.''.''; } elsif ($response eq 'essay') { if (! exists ($env{'form.'.$symb})) { my (%keyhash) = &Apache::lonnet::dump('nohist_handgrade', @@ -487,8 +487,7 @@ sub cleanRecord { #-- A couple of common js functions sub commonJSfunctions { my $request = shift; - $request->print(< + $request->print(&Apache::lonhtmlcommon::scripttag(< 1) { @@ -516,7 +515,6 @@ sub commonJSfunctions { return selectOne.value; } } - COMMONJSFUNCTIONS } @@ -671,13 +669,13 @@ sub student_gradeStatus { sub jscriptNform { my ($symb) = @_; my $stu_status = join(':',&Apache::loncommon::get_env_multiple('form.Status')); - my $jscript=''."\n"; + "\n"); $jscript.= '
'."\n". ''."\n". ''."\n". @@ -886,8 +884,7 @@ sub listStudents { 'multiple' => 'Please select a student or group of students before clicking on the Next button.', 'single' => 'Please select the student before clicking on the Next button.', ); - $request->print(< + $request->print(&Apache::lonhtmlcommon::scripttag(< LISTJAVASCRIPT &commonJSfunctions($request); @@ -1152,7 +1148,7 @@ LISTJAVASCRIPT sub check_script { my ($form, $type)=@_; - my $chkallscript=''."\n"; +'."\n"); return $chkallscript; } @@ -1222,8 +1218,7 @@ sub processGroup { sub sub_page_js { my $request = shift; my $alertmsg = &mt('A number equal or greater than 0 is expected. Entered value = '); - $request->print(< + $request->print(&Apache::lonhtmlcommon::scripttag(< SUBJAVASCRIPT } @@ -1401,8 +1395,7 @@ sub sub_page_kw_js { my $iconpath = $request->dir_config('lonIconsURL'); &commonJSfunctions($request); - my $inner_js_msg_central=< + my $inner_js_msg_central= &Apache::lonhtmlcommon::scripttag(< INNERJS - my $inner_js_highlight_central=< + my $inner_js_highlight_central= &Apache::lonhtmlcommon::scripttag(< INNERJS my $start_page_msg_central = @@ -1478,8 +1468,7 @@ INNERJS my $docopen=&Apache::lonhtmlcommon::javascript_docopen(); $docopen=~s/^document\.//; my $alertmsg = &mt('Please select a word or group of words from document and then click this link.'); - $request->print(< + $request->print(&Apache::lonhtmlcommon::scripttag(< SUBJAVASCRIPT } @@ -2204,7 +2192,7 @@ KEYWORDS $lastsubonly.="\n".'
'. ''.&mt('Part: [_1]',$display_part).''. ' '. - '('.&mt('Part ID: [_1]',$respid).')'. + '('.&mt('Part ID: [_1]',$respid).')'. '   '. ''.&mt('Nothing submitted - no attempts.').'

'; next; @@ -2250,7 +2238,7 @@ KEYWORDS ''.&mt('Part: [_1]',$display_part).''. ' '. '('.&mt('Part ID: [_1]',$respid).')'. - '   '; + '   '; my $files=&get_submitted_files($udom,$uname,$partid,$respid,\%record); if (@$files) { if ($hide) { @@ -3170,8 +3158,7 @@ sub viewgrades_js { my ($request) = shift; my $alertmsg = &mt('A number equal or greater than 0 is expected. Entered value = '); - $request->print(< + $request->print(&Apache::lonhtmlcommon::scripttag(< VIEWJAVASCRIPT } @@ -3935,10 +3921,8 @@ to this page if the data selected is ins
- ENDPICK + $request->print(&Apache::lonhtmlcommon::scripttag($javascript)); return ''; } @@ -3983,8 +3967,7 @@ ENDPICK sub checkforfile_js { my $alertmsg = &mt('Please use the browse button to select a file from your local directory.'); - my $result =< + my $result = &Apache::lonhtmlcommon::scripttag(< CSVFORMJS return $result; } @@ -4266,8 +4248,7 @@ sub pickStudentPage { my ($request) = shift; my $alertmsg = &mt('Please select the student you wish to grade.'); - $request->print(< + $request->print(&Apache::lonhtmlcommon::scripttag(< LISTJAVASCRIPT &commonJSfunctions($request); my ($symb) = &get_symb($request); @@ -5318,17 +5298,15 @@ sub scantron_selectphase { my $default_form_data=&defaultFormData(&get_symb($r,1)); my $cdom= $env{'course.'.$env{'request.course.id'}.'.domain'}; my $cnum= $env{'course.'.$env{'request.course.id'}.'.num'}; - $r->print(' - - + }')); + $r->print(' '.$default_form_data.' @@ -7015,8 +6993,7 @@ sub scantron_get_correction { $r->print("\n
"); } - $r->print(< + $r->print(&Apache::lonhtmlcommon::scripttag(< ENDSCRIPT my $href="/adm/pickcode?". "form=".&escape("scantronupload"). @@ -7096,8 +7072,7 @@ sub verify_bubbles_checked { my (@ansnums) = @_; my $ansnumstr = join('","',@ansnums); my $warning = &mt("A bubble or 'No bubble' selection has not been made for one or more lines."); - my $output = (< + my $output = &Apache::lonhtmlcommon::scripttag((< ENDSCRIPT return $output; } @@ -7979,8 +7953,7 @@ sub scantron_upload_scantron_data { my $default_form_data=&defaultFormData(&get_symb($r,1)); my $nofile_alert = &mt('Please use the browse button to select a file from your local directory.'); my $nocourseid_alert = &mt("Please use the 'Select Course' link to open a separate window where you can search for a course to which a file can be uploaded."); - $r->print(' - - +')); + $r->print('

'.&mt('Send scanned bubblesheet data to a course').'

@@ -8622,8 +8595,7 @@ sub grading_menu { $Str .="\n"; my $receiptalert = &mt("Please enter a receipt number given by a student in the receipt box."); - $request->print(< + $request->print(&Apache::lonhtmlcommon::scripttag(< GRADINGMENUJS &commonJSfunctions($request); return $Str; @@ -8671,8 +8642,7 @@ sub submit_options { my $probTitle = &Apache::lonnet::gettitle($symb); my $receiptalert = &mt("Please enter a receipt number given by a student in the receipt box."); - $request->print(< + $request->print(&Apache::lonhtmlcommon::scripttag(< GRADINGMENUJS &commonJSfunctions($request); my ($table,undef,$hdgrade) = &showResourceInfo($symb,$probTitle); @@ -8951,8 +8920,7 @@ sub process_clicker { ('iclicker' => 'i>clicker', 'interwrite' => 'interwrite PRS')); $symb = &Apache::lonenc::check_encrypt($symb); - $result.=< + $result.= &Apache::lonhtmlcommon::scripttag(< +ENDUPFORM + $result.= < @@ -9009,7 +8978,7 @@ function sanitycheck() {


- +' ENDUPFORM $result.=''."\n". '

'."\n";