version 1.585, 2009/12/16 16:09:24
|
version 1.594, 2010/02/19 15:41:32
|
Line 160 sub response_type {
|
Line 160 sub response_type {
|
return; |
return; |
} |
} |
my $res = $navmap->getBySymb($symb); |
my $res = $navmap->getBySymb($symb); |
|
unless (ref($res)) { |
|
$$response_error = 1; |
|
return; |
|
} |
my $partlist = $res->parts(); |
my $partlist = $res->parts(); |
my %vPart = |
my %vPart = |
map { $_ => 1 } (&Apache::loncommon::get_env_multiple('form.vPart')); |
map { $_ => 1 } (&Apache::loncommon::get_env_multiple('form.vPart')); |
Line 944 LISTJAVASCRIPT
|
Line 948 LISTJAVASCRIPT
|
my $saveStatus = $stu_status eq '' ? 'Active' : $stu_status; |
my $saveStatus = $stu_status eq '' ? 'Active' : $stu_status; |
$env{'form.Status'} = $saveStatus; |
$env{'form.Status'} = $saveStatus; |
$submission_options.= |
$submission_options.= |
'<label><input type="radio" name="lastSub" value="lastonly" '.$checklastsub.' /> '.&mt('last submission only').' </label>'."\n". |
'<span class="LC_nobreak">'. |
'<label><input type="radio" name="lastSub" value="last" /> '.&mt('last submission & parts info').' </label>'."\n". |
'<label><input type="radio" name="lastSub" value="lastonly" '.$checklastsub.' /> '. |
'<label><input type="radio" name="lastSub" value="datesub" /> '.&mt('by dates and submissions').' </label>'."\n". |
&mt('last submission only').' </label></span>'."\n". |
'<label><input type="radio" name="lastSub" value="all" /> '.&mt('all details').'</label>'; |
'<span class="LC_nobreak">'. |
|
'<label><input type="radio" name="lastSub" value="last" /> '. |
|
&mt('last submission & parts info').' </label></span>'."\n". |
|
'<span class="LC_nobreak">'. |
|
'<label><input type="radio" name="lastSub" value="datesub" /> '. |
|
&mt('by dates and submissions').'</label></span>'."\n". |
|
'<span class="LC_nobreak">'. |
|
'<label><input type="radio" name="lastSub" value="all" /> '. |
|
&mt('all details').'</label></span>'; |
$gradeTable .= &Apache::lonhtmlcommon::row_title(&mt('Submissions')) |
$gradeTable .= &Apache::lonhtmlcommon::row_title(&mt('Submissions')) |
.$submission_options |
.$submission_options |
.&Apache::lonhtmlcommon::row_closure(); |
.&Apache::lonhtmlcommon::row_closure(); |
Line 993 LISTJAVASCRIPT
|
Line 1005 LISTJAVASCRIPT
|
# checkall buttons |
# checkall buttons |
$gradeTable.=&check_script('gradesub', 'stuinfo'); |
$gradeTable.=&check_script('gradesub', 'stuinfo'); |
$gradeTable.='<input type="button" '."\n". |
$gradeTable.='<input type="button" '."\n". |
'onClick="javascript:checkSelect(this.form.stuinfo);" '."\n". |
'onclick="javascript:checkSelect(this.form.stuinfo);" '."\n". |
'value="'.&mt('Next').' →" /> <br />'."\n"; |
'value="'.&mt('Next').' →" /> <br />'."\n"; |
$gradeTable.=&check_buttons(); |
$gradeTable.=&check_buttons(); |
my ($classlist, undef, $fullname) = &getclasslist($getsec,'1',$getgroup); |
my ($classlist, undef, $fullname) = &getclasslist($getsec,'1',$getgroup); |
$gradeTable.= &Apache::loncommon::start_data_table(). |
$gradeTable.= &Apache::loncommon::start_data_table(). |
Line 1111 LISTJAVASCRIPT
|
Line 1123 LISTJAVASCRIPT
|
} |
} |
|
|
$gradeTable.=&Apache::loncommon::end_data_table()."\n". |
$gradeTable.=&Apache::loncommon::end_data_table()."\n". |
'<input type="button" '. |
'<input type="button" '. |
'onClick="javascript:checkSelect(this.form.stuinfo);" '. |
'onclick="javascript:checkSelect(this.form.stuinfo);" '. |
'value="'.&mt('Next').' →" /></form>'."\n"; |
'value="'.&mt('Next').' →" /></form>'."\n"; |
if ($ctr == 0) { |
if ($ctr == 0) { |
my $num_students=(scalar(keys(%$fullname))); |
my $num_students=(scalar(keys(%$fullname))); |
if ($num_students eq 0) { |
if ($num_students eq 0) { |
Line 1617 INNERJS
|
Line 1629 INNERJS
|
pDoc = pWin.document; |
pDoc = pWin.document; |
pDoc.write("<\\/table>"); |
pDoc.write("<\\/table>"); |
pDoc.write("<\\/td><\\/tr><\\/table> "); |
pDoc.write("<\\/td><\\/tr><\\/table> "); |
pDoc.write("<input type=\\"button\\" value=\\"Save\\" onClick=\\"javascript:checkInput()\\"> "); |
pDoc.write("<input type=\\"button\\" value=\\"Save\\" onclick=\\"javascript:checkInput()\\"> "); |
pDoc.write("<input type=\\"button\\" value=\\"Cancel\\" onClick=\\"self.close()\\"><br /><br />"); |
pDoc.write("<input type=\\"button\\" value=\\"Cancel\\" onclick=\\"self.close()\\"><br /><br />"); |
pDoc.write("<\\/form>"); |
pDoc.write("<\\/form>"); |
pDoc.write('$end_page_msg_central'); |
pDoc.write('$end_page_msg_central'); |
pDoc.close(); |
pDoc.close(); |
Line 1691 INNERJS
|
Line 1703 INNERJS
|
var hDoc = hwdWin.document; |
var hDoc = hwdWin.document; |
hDoc.write("<\\/table>"); |
hDoc.write("<\\/table>"); |
hDoc.write("<\\/td><\\/tr><\\/table> "); |
hDoc.write("<\\/td><\\/tr><\\/table> "); |
hDoc.write("<input type=\\"button\\" value=\\"Save\\" onClick=\\"javascript:updateChoice(1)\\"> "); |
hDoc.write("<input type=\\"button\\" value=\\"Save\\" onclick=\\"javascript:updateChoice(1)\\"> "); |
hDoc.write("<input type=\\"button\\" value=\\"Cancel\\" onClick=\\"self.close()\\"><br /><br />"); |
hDoc.write("<input type=\\"button\\" value=\\"Cancel\\" onclick=\\"self.close()\\"><br /><br />"); |
hDoc.write("<\\/form>"); |
hDoc.write("<\\/form>"); |
hDoc.write('$end_page_highlight_central'); |
hDoc.write('$end_page_highlight_central'); |
hDoc.close(); |
hDoc.close(); |
Line 1757 sub gradeBox {
|
Line 1769 sub gradeBox {
|
my $radio.='<table border="0"><tr>'."\n"; # display radio buttons in a nice table 10 across |
my $radio.='<table border="0"><tr>'."\n"; # display radio buttons in a nice table 10 across |
while ($thisweight<=$wgt) { |
while ($thisweight<=$wgt) { |
$radio.= '<td><span class="LC_nobreak"><label><input type="radio" name="RADVAL'.$counter.'_'.$partid.'" '. |
$radio.= '<td><span class="LC_nobreak"><label><input type="radio" name="RADVAL'.$counter.'_'.$partid.'" '. |
'onclick="javascript:writeBox(this.form,\''.$counter.'_'.$partid.'\','. |
'onclick="javascript:writeBox(this.form,\''.$counter.'_'.$partid.'\','. |
$thisweight.')" value="'.$thisweight.'" '. |
$thisweight.')" value="'.$thisweight.'" '. |
($score eq $thisweight ? 'checked="checked"':'').' /> '.$thisweight."</label></span></td>\n"; |
($score eq $thisweight ? 'checked="checked"':'').' /> '.$thisweight."</label></span></td>\n"; |
$radio.=(($ctr+1)%10 == 0 ? '</tr><tr>' : ''); |
$radio.=(($ctr+1)%10 == 0 ? '</tr><tr>' : ''); |
Line 1768 sub gradeBox {
|
Line 1780 sub gradeBox {
|
|
|
my $line.='<input type="text" name="GD_BOX'.$counter.'_'.$partid.'"'. |
my $line.='<input type="text" name="GD_BOX'.$counter.'_'.$partid.'"'. |
($score ne ''? ' value = "'.$score.'"':'').' size="4" '. |
($score ne ''? ' value = "'.$score.'"':'').' size="4" '. |
'onChange="javascript:updateRadio(this.form,\''.$counter.'_'.$partid.'\','. |
'onchange="javascript:updateRadio(this.form,\''.$counter.'_'.$partid.'\','. |
$wgt.')" /></td>'."\n"; |
$wgt.')" /></td>'."\n"; |
$line.='<td>/'.$wgt.' '.$wgtmsg. |
$line.='<td>/'.$wgt.' '.$wgtmsg. |
($$record{'resource.'.$partid.'.solved'} eq 'correct_by_student' ? ' '.$checkIcon : ''). |
($$record{'resource.'.$partid.'.solved'} eq 'correct_by_student' ? ' '.$checkIcon : ''). |
' </td>'."\n"; |
' </td>'."\n"; |
$line.='<td><select name="GD_SEL'.$counter.'_'.$partid.'" '. |
$line.='<td><select name="GD_SEL'.$counter.'_'.$partid.'" '. |
'onChange="javascript:clearRadBox(this.form,\''.$counter.'_'.$partid.'\')" >'."\n"; |
'onchange="javascript:clearRadBox(this.form,\''.$counter.'_'.$partid.'\')" >'."\n"; |
if ($$record{'resource.'.$partid.'.solved'} eq 'excused') { |
if ($$record{'resource.'.$partid.'.solved'} eq 'excused') { |
$line.='<option></option>'. |
$line.='<option></option>'. |
'<option value="excused" selected="selected">'.&mt('excused').'</option>'; |
'<option value="excused" selected="selected">'.&mt('excused').'</option>'; |
Line 1869 sub show_problem {
|
Line 1881 sub show_problem {
|
$companswer=~s|name="submit"|name="would_have_been_submit"|g; |
$companswer=~s|name="submit"|name="would_have_been_submit"|g; |
} |
} |
$rendered= |
$rendered= |
'<div class="LC_grade_show_problem_header">'. |
'<div class="LC_Box">' |
&mt('View of the problem'). |
.'<h3 class="LC_hcell">'.&mt('View of the problem').'</h3>' |
'</div><div class="LC_grade_show_problem_problem">'. |
.$rendered |
$rendered. |
.'</div>'; |
'</div>'; |
|
$companswer= |
$companswer= |
'<div class="LC_grade_show_problem_header">'. |
'<div class="LC_Box">' |
&mt('Correct answer'). |
.'<h3 class="LC_hcell">'.&mt('Correct answer').'</h3>' |
'</div><div class="LC_grade_show_problem_problem">'. |
.$companswer |
$companswer. |
.'</div>'; |
'</div>'; |
|
my $result; |
my $result; |
if ($mode eq 'both') { |
if ($mode eq 'both') { |
$result=$rendered.$companswer; |
$result=$rendered.$companswer; |
} elsif ($mode eq 'text') { |
} elsif ($mode eq 'text') { |
$result=$rendered; |
$result=$rendered; |
} elsif ($mode eq 'answer') { |
} elsif ($mode eq 'answer') { |
$result=$companswer; |
$result=$companswer; |
} |
} |
$result='<div class="LC_grade_show_problem">'.$result.'</div>'; |
|
return $result; |
return $result; |
} |
} |
|
|
Line 2066 sub submission {
|
Line 2075 sub submission {
|
$request->print(<<KEYWORDS); |
$request->print(<<KEYWORDS); |
<b>Keyword Options:</b> |
<b>Keyword Options:</b> |
<a href="javascript:keywords(document.SCORE);" target="_self">List</a> |
<a href="javascript:keywords(document.SCORE);" target="_self">List</a> |
<a href="#" onMouseDown="javascript:getSel(); return false" |
<a href="#" onmousedown="javascript:getSel(); return false" |
CLASS="page">Paste Selection to List</a> |
CLASS="page">Paste Selection to List</a> |
<a href="javascript:kwhighlight();" target="_self">Highlight Attribute</a><br /><br /> |
<a href="javascript:kwhighlight();" target="_self">Highlight Attribute</a><br /><br /> |
KEYWORDS |
KEYWORDS |
Line 2082 KEYWORDS
|
Line 2091 KEYWORDS
|
} |
} |
|
|
# This is where output for one specific student would start |
# This is where output for one specific student would start |
my $add_class = ($counter%2) ? 'LC_grade_show_user_odd_row' : ''; |
my $add_class = ($counter%2) ? ' LC_grade_show_user_odd_row' : ''; |
$request->print("\n\n". |
$request->print( |
'<div class="LC_grade_show_user '.$add_class.'">'. |
"\n\n" |
'<div class="LC_grade_user_name">'.&nameUserString(undef,$env{'form.fullname'},$uname,$udom).'</div>'. |
.'<div class="LC_grade_show_user'.$add_class.'">' |
'<div class="LC_grade_show_user_body">'."\n"); |
.'<h2>'.&nameUserString(undef,$env{'form.fullname'},$uname,$udom).'</h2>' |
|
."\n" |
|
); |
|
|
|
# Show additional functions if allowed |
|
if ($perm{'vgr'}) { |
|
$request->print( |
|
&Apache::loncommon::track_student_link( |
|
&mt('View recent activity'), |
|
$uname,$udom,'check') |
|
.' ' |
|
); |
|
} |
|
if ($perm{'opa'}) { |
|
$request->print( |
|
&Apache::loncommon::pprmlink( |
|
&mt('Set/Change parameters'), |
|
$uname,$udom,$symb,'check')); |
|
} |
|
|
|
# Show Problem |
if ($env{'form.vProb'} eq 'all' or $env{'form.vAns'} eq 'all') { |
if ($env{'form.vProb'} eq 'all' or $env{'form.vAns'} eq 'all') { |
my $mode; |
my $mode; |
if ($env{'form.vProb'} eq 'all' && $env{'form.vAns'} eq 'all') { |
if ($env{'form.vProb'} eq 'all' && $env{'form.vAns'} eq 'all') { |
Line 2111 KEYWORDS
|
Line 2139 KEYWORDS
|
|
|
# Display student info |
# Display student info |
$request->print(($counter == 0 ? '' : '<br />')); |
$request->print(($counter == 0 ? '' : '<br />')); |
my $result='<div class="LC_grade_submissions">'; |
|
|
my $result='<div class="LC_Box">' |
$result.='<div class="LC_grade_submissions_header">'; |
.'<h3 class="LC_hcell">'.&mt('Submissions').'</h3>'; |
$result.= &mt('Submissions'); |
|
$result.='<input type="hidden" name="name'.$counter. |
$result.='<input type="hidden" name="name'.$counter. |
'" value="'.$env{'form.fullname'}.'" />'."\n"; |
'" value="'.$env{'form.fullname'}.'" />'."\n"; |
if ($env{'form.handgrade'} eq 'no') { |
if ($env{'form.handgrade'} eq 'no') { |
$result.='<span class="LC_grade_check_note">'. |
$result.='<p class="LC_info">' |
&mt('Part(s) graded correct by the computer is marked with a [_1] symbol.',$checkIcon)."</span>\n"; |
.&mt('Part(s) graded correct by the computer is marked with a [_1] symbol.',$checkIcon) |
|
."</p>\n"; |
} |
} |
|
|
|
|
|
|
# If any part of the problem is an essay-response (handgraded), then check for collaborators |
# If any part of the problem is an essay-response (handgraded), then check for collaborators |
my $fullname; |
my $fullname; |
my $col_fullnames = []; |
my $col_fullnames = []; |
Line 2135 KEYWORDS
|
Line 2160 KEYWORDS
|
$result.=$sub_result; |
$result.=$sub_result; |
} |
} |
$request->print($result."\n"); |
$request->print($result."\n"); |
$request->print('</div>'."\n"); |
|
# print student answer/submission |
# print student answer/submission |
# Options are (1) Handgaded submission only |
# Options are (1) Handgraded submission only |
# (2) Last submission, includes submission that is not handgraded |
# (2) Last submission, includes submission that is not handgraded |
# (for multi-response type part) |
# (for multi-response type part) |
# (3) Last submission plus the parts info |
# (3) Last submission plus the parts info |
Line 2147 KEYWORDS
|
Line 2172 KEYWORDS
|
|
|
my $lastsubonly; |
my $lastsubonly; |
|
|
if ($$timestamp eq '') { |
if ($$timestamp eq '') { |
$lastsubonly.='<div class="LC_grade_submissions_body">'.$$string[0].'</div>'; |
$lastsubonly.='<div class="LC_grade_submissions_body">'.$$string[0].'</div>'; |
} else { |
} else { |
$lastsubonly = '<div class="LC_grade_submissions_body"> <b>Date Submitted:</b> '.$$timestamp."\n"; |
$lastsubonly = |
|
'<div class="LC_grade_submissions_body">' |
|
.'<b>'.&mt('Date Submitted:').'</b> '.$$timestamp."\n"; |
|
|
my %seenparts; |
my %seenparts; |
my @part_response_id = &flatten_responseType($responseType); |
my @part_response_id = &flatten_responseType($responseType); |
Line 2238 KEYWORDS
|
Line 2265 KEYWORDS
|
} |
} |
} |
} |
} |
} |
$lastsubonly.='</div>'."\n"; |
$lastsubonly.='</div>'."\n"; # End: LC_grade_submissions_body |
} |
} |
$request->print($lastsubonly); |
$request->print($lastsubonly); |
} elsif ($env{'form.lastSub'} eq 'datesub') { |
} elsif ($env{'form.lastSub'} eq 'datesub') { |
Line 2256 KEYWORDS
|
Line 2283 KEYWORDS
|
# return if view submission with no grading option |
# return if view submission with no grading option |
if ($env{'form.showgrading'} eq '' || (!&canmodify($usec))) { |
if ($env{'form.showgrading'} eq '' || (!&canmodify($usec))) { |
my $toGrade.='<input type="button" value="Grade Student" '. |
my $toGrade.='<input type="button" value="Grade Student" '. |
'onClick="javascript:checksubmit(this.form,\'Grade Student\',\'' |
'onclick="javascript:checksubmit(this.form,\'Grade Student\',\'' |
.$counter.'\');" target="_self" /> '."\n" if (&canmodify($usec)); |
.$counter.'\');" target="_self" /> '."\n" if (&canmodify($usec)); |
$toGrade.='</div>'."\n"; |
$toGrade.='</div>'."\n"; |
if (($env{'form.command'} eq 'submission') || |
if (($env{'form.command'} eq 'submission') || |
Line 2301 KEYWORDS
|
Line 2328 KEYWORDS
|
my @gradePartRespid; |
my @gradePartRespid; |
my @part_response_id = &flatten_responseType($responseType); |
my @part_response_id = &flatten_responseType($responseType); |
$request->print( |
$request->print( |
'<div class="LC_grade_assign">' |
'<div class="LC_Box">' |
.'<div class="LC_grade_assign_header">' |
.'<h3 class="LC_hcell">'.&mt('Assign Grades').'</h3>' |
.&mt('Assign Grades').'</div>' |
|
); |
); |
$request->print(&gradeBox_start()); # <div class="LC_grade_assign_body"> |
$request->print(&gradeBox_start()); |
foreach my $part_response_id (@part_response_id) { |
foreach my $part_response_id (@part_response_id) { |
my ($partid,$respid) = @{ $part_response_id }; |
my ($partid,$respid) = @{ $part_response_id }; |
my $part_resp = join('_',@{ $part_response_id }); |
my $part_resp = join('_',@{ $part_response_id }); |
Line 2321 KEYWORDS
|
Line 2347 KEYWORDS
|
$request->print('</div>'); |
$request->print('</div>'); |
|
|
$request->print('<div class="LC_grade_info_links">'); |
$request->print('<div class="LC_grade_info_links">'); |
if ($perm{'vgr'}) { |
|
$request->print( |
|
&Apache::loncommon::track_student_link(&mt('View recent activity'), |
|
$uname,$udom,'check')); |
|
} |
|
if ($perm{'opa'}) { |
|
$request->print( |
|
&Apache::loncommon::pprmlink(&mt('Set/Change parameters'), |
|
$uname,$udom,$symb,'check')); |
|
} |
|
$request->print('</div>'); |
$request->print('</div>'); |
|
|
$result='<input type="hidden" name="partlist'.$counter. |
$result='<input type="hidden" name="partlist'.$counter. |
Line 2347 KEYWORDS
|
Line 2363 KEYWORDS
|
|
|
# Done with printing info for one student |
# Done with printing info for one student |
|
|
$request->print('</div>');#LC_grade_show_user_body |
|
$request->print('</div>');#LC_grade_show_user |
$request->print('</div>');#LC_grade_show_user |
|
|
|
|
# print end of form |
# print end of form |
if ($counter == $total) { |
if ($counter == $total) { |
my $endform='<table border="0"><tr><td>'."\n"; |
my $endform='<br /><hr /><table border="0"><tr><td>'."\n"; |
$endform.='<input type="button" value="'.&mt('Save & Next').'" '. |
$endform.='<input type="button" value="'.&mt('Save & Next').'" '. |
'onClick="javascript:checksubmit(this.form,\'Save & Next\','. |
'onclick="javascript:checksubmit(this.form,\'Save & Next\','. |
$total.','.scalar(@partlist).');" target="_self" /> '."\n"; |
$total.','.scalar(@partlist).');" target="_self" /> '."\n"; |
my $ntstu ='<select name="NTSTU">'. |
my $ntstu ='<select name="NTSTU">'. |
'<option>1</option><option>2</option>'. |
'<option>1</option><option>2</option>'. |
Line 2365 KEYWORDS
|
Line 2380 KEYWORDS
|
$ntstu =~ s/<option>$nsel</<option selected="selected">$nsel</; |
$ntstu =~ s/<option>$nsel</<option selected="selected">$nsel</; |
$endform.=&mt('[_1]student(s)',$ntstu); |
$endform.=&mt('[_1]student(s)',$ntstu); |
$endform.=' <input type="button" value="'.&mt('Previous').'" '. |
$endform.=' <input type="button" value="'.&mt('Previous').'" '. |
'onClick="javascript:checksubmit(this.form,\'Previous\');" target="_self" /> '."\n". |
'onclick="javascript:checksubmit(this.form,\'Previous\');" target="_self" /> '."\n". |
'<input type="button" value="'.&mt('Next').'" '. |
'<input type="button" value="'.&mt('Next').'" '. |
'onClick="javascript:checksubmit(this.form,\'Next\');" target="_self" /> '; |
'onclick="javascript:checksubmit(this.form,\'Next\');" target="_self" /> '; |
$endform.=&mt('(Next and Previous (student) do not save the scores.)')."\n" ; |
$endform.='<span class="LC_warning">'. |
|
&mt('(Next and Previous (student) do not save the scores.)'). |
|
'</span>'."\n" ; |
$endform.="<input type='hidden' value='".&get_increment(). |
$endform.="<input type='hidden' value='".&get_increment(). |
"' name='increment' />"; |
"' name='increment' />"; |
$endform.='</td></tr></table></form>'; |
$endform.='</td></tr></table></form>'; |
Line 3356 sub viewgrades {
|
Line 3373 sub viewgrades {
|
} |
} |
$radio.='</tr></table>'; |
$radio.='</tr></table>'; |
my $line = '<input type="text" name="TEXTVAL_'. |
my $line = '<input type="text" name="TEXTVAL_'. |
$partid.'" size="4" '.'onChange="javascript:writePoint(\''. |
$partid.'" size="4" '.'onchange="javascript:writePoint(\''. |
$partid.'\','.$weight{$partid}.',\'textval\')" /> /'. |
$partid.'\','.$weight{$partid}.',\'textval\')" /> /'. |
$weight{$partid}.' '.&mt('(problem weight)').'</td>'."\n"; |
$weight{$partid}.' '.&mt('(problem weight)').'</td>'."\n"; |
$line.= '<td><b>'.&mt('Grade Status').':</b><select name="SELVAL_'.$partid.'"'. |
$line.= '<td><b>'.&mt('Grade Status').':</b><select name="SELVAL_'.$partid.'"'. |
'onChange="javascript:writeRadText(\''.$partid.'\','. |
'onchange="javascript:writeRadText(\''.$partid.'\','. |
$weight{$partid}.')"> '. |
$weight{$partid}.')"> '. |
'<option selected="selected"> </option>'. |
'<option selected="selected"> </option>'. |
'<option value="excused">'.&mt('excused').'</option>'. |
'<option value="excused">'.&mt('excused').'</option>'. |
Line 3381 sub viewgrades {
|
Line 3398 sub viewgrades {
|
$result.=&Apache::loncommon::end_data_table()."\n". |
$result.=&Apache::loncommon::end_data_table()."\n". |
'<input type="hidden" name="totalparts" value="'.$ctsparts.'" />'; |
'<input type="hidden" name="totalparts" value="'.$ctsparts.'" />'; |
$result.='<input type="button" value="'.&mt('Revert to Default').'" '. |
$result.='<input type="button" value="'.&mt('Revert to Default').'" '. |
'onClick="javascript:resetEntry('.$ctsparts.');" />'; |
'onclick="javascript:resetEntry('.$ctsparts.');" />'; |
|
|
#table listing all the students in a section/class |
#table listing all the students in a section/class |
#header of table |
#header of table |
Line 3445 sub viewgrades {
|
Line 3462 sub viewgrades {
|
$result.=&Apache::loncommon::end_data_table(); |
$result.=&Apache::loncommon::end_data_table(); |
$result.='<input type="hidden" name="total" value="'.$ctr.'" />'."\n"; |
$result.='<input type="hidden" name="total" value="'.$ctr.'" />'."\n"; |
$result.='<input type="button" value="'.&mt('Save').'" '. |
$result.='<input type="button" value="'.&mt('Save').'" '. |
'onClick="javascript:submit();" target="_self" /></form>'."\n"; |
'onclick="javascript:submit();" target="_self" /></form>'."\n"; |
if (scalar(%$fullname) eq 0) { |
if (scalar(%$fullname) eq 0) { |
my $colspan=3+scalar(@parts); |
my $colspan=3+scalar(@parts); |
my $section_display = join (", ",&Apache::loncommon::get_env_multiple('form.section')); |
my $section_display = join (", ",&Apache::loncommon::get_env_multiple('form.section')); |
Line 3497 sub viewstudentgrade {
|
Line 3514 sub viewstudentgrade {
|
'GD_'.$student.'_'.$part.'_awarded_s" value="'.$pts.'" />'."\n"; |
'GD_'.$student.'_'.$part.'_awarded_s" value="'.$pts.'" />'."\n"; |
$result.='<input type="text" name="'. |
$result.='<input type="text" name="'. |
'GD_'.$student.'_'.$part.'_awarded" '. |
'GD_'.$student.'_'.$part.'_awarded" '. |
'onChange="javascript:changeSelect(\''.$part.'\',\''.$student. |
'onchange="javascript:changeSelect(\''.$part.'\',\''.$student. |
'\')" value="'.$pts.'" size="4" /></td>'."\n"; |
'\')" value="'.$pts.'" size="4" /></td>'."\n"; |
} elsif ($type eq 'solved') { |
} elsif ($type eq 'solved') { |
my ($status,$foo)=split(/_/,$score,2); |
my ($status,$foo)=split(/_/,$score,2); |
Line 3506 sub viewstudentgrade {
|
Line 3523 sub viewstudentgrade {
|
$part.'_solved_s" value="'.$status.'" />'."\n"; |
$part.'_solved_s" value="'.$status.'" />'."\n"; |
$result.=' <select name="'. |
$result.=' <select name="'. |
'GD_'.$student.'_'.$part.'_solved" '. |
'GD_'.$student.'_'.$part.'_solved" '. |
'onChange="javascript:changeOneScore(\''.$part.'\',\''.$student.'\')" >'."\n"; |
'onchange="javascript:changeOneScore(\''.$part.'\',\''.$student.'\')" >'."\n"; |
$result.= (($status eq 'excused') ? '<option> </option><option selected="selected" value="excused">'.&mt('excused').'</option>' |
$result.= (($status eq 'excused') ? '<option> </option><option selected="selected" value="excused">'.&mt('excused').'</option>' |
: '<option selected="selected"> </option><option value="excused">'.&mt('excused').'</option>')."\n"; |
: '<option selected="selected"> </option><option value="excused">'.&mt('excused').'</option>')."\n"; |
$result.='<option value="reset status">'.&mt('reset status').'</option>'; |
$result.='<option value="reset status">'.&mt('reset status').'</option>'; |
Line 3866 $result
|
Line 3883 $result
|
Total number of records found in file: $distotal <hr /> |
Total number of records found in file: $distotal <hr /> |
Enter as many fields as you can. The system will inform you and bring you back |
Enter as many fields as you can. The system will inform you and bring you back |
to this page if the data selected is insufficient to run your class.<hr /> |
to this page if the data selected is insufficient to run your class.<hr /> |
<input type="button" value="Reverse Association" onClick="javascript:this.form.associate.value='Reverse Association';submit(this.form);" /> |
<input type="button" value="Reverse Association" onclick="javascript:this.form.associate.value='Reverse Association';submit(this.form);" /> |
<label><input type="checkbox" name="noFirstLine" $checked />$ignore</label> |
<label><input type="checkbox" name="noFirstLine" $checked />$ignore</label> |
<input type="hidden" name="associate" value="" /> |
<input type="hidden" name="associate" value="" /> |
<input type="hidden" name="phase" value="three" /> |
<input type="hidden" name="phase" value="three" /> |
Line 3921 sub csvuploadmap_footer {
|
Line 3938 sub csvuploadmap_footer {
|
</table> |
</table> |
<input type="hidden" name="nfields" value="$i" /> |
<input type="hidden" name="nfields" value="$i" /> |
<input type="hidden" name="keyfields" value="$keyfields" /> |
<input type="hidden" name="keyfields" value="$keyfields" /> |
<input type="button" onClick="javascript:verify(this.form)" value="Assign Grades" /><br /> |
<input type="button" onclick="javascript:verify(this.form)" value="Assign Grades" /><br /> |
</form> |
</form> |
ENDPICK |
ENDPICK |
} |
} |
Line 3966 sub upcsvScores_form {
|
Line 3983 sub upcsvScores_form {
|
<input type="hidden" name="probTitle" value="$env{'form.probTitle'}" /> |
<input type="hidden" name="probTitle" value="$env{'form.probTitle'}" /> |
<input type="hidden" name="saveState" value="$env{'form.saveState'}" /> |
<input type="hidden" name="saveState" value="$env{'form.saveState'}" /> |
$upfile_select |
$upfile_select |
<br /><input type="button" onClick="javascript:checkUpload(this.form);" value="$upload" /> |
<br /><input type="button" onclick="javascript:checkUpload(this.form);" value="$upload" /> |
<label><input type="checkbox" name="noFirstLine" />$ignore</label> |
<label><input type="checkbox" name="noFirstLine" />$ignore</label> |
</form> |
</form> |
ENDUPFORM |
ENDUPFORM |
Line 4289 LISTJAVASCRIPT
|
Line 4306 LISTJAVASCRIPT
|
$result.=' <b>'.&mt('Use CODE').': </b> <input type="text" name="CODE" value="" /> <br />'."\n"; |
$result.=' <b>'.&mt('Use CODE').': </b> <input type="text" name="CODE" value="" /> <br />'."\n"; |
|
|
$result.=' <input type="button" '. |
$result.=' <input type="button" '. |
'onClick="javascript:checkPickOne(this.form);" value="'.&mt('Next').' →" /><br />'."\n"; |
'onclick="javascript:checkPickOne(this.form);" value="'.&mt('Next').' →" /><br />'."\n"; |
|
|
$request->print($result); |
$request->print($result); |
|
|
Line 4328 LISTJAVASCRIPT
|
Line 4345 LISTJAVASCRIPT
|
} |
} |
$studentTable.=&Apache::loncommon::end_data_table()."\n"; |
$studentTable.=&Apache::loncommon::end_data_table()."\n"; |
$studentTable.='<input type="button" '. |
$studentTable.='<input type="button" '. |
'onClick="javascript:checkPickOne(this.form);" value="'.&mt('Next').' →" /></form>'."\n"; |
'onclick="javascript:checkPickOne(this.form);" value="'.&mt('Next').' →" /></form>'."\n"; |
|
|
$studentTable.=&show_grading_menu_form($symb); |
$studentTable.=&show_grading_menu_form($symb); |
$request->print($studentTable); |
$request->print($studentTable); |
Line 4435 sub displayPage {
|
Line 4452 sub displayPage {
|
my $checkIcon = '<img alt="'.&mt('Check Mark'). |
my $checkIcon = '<img alt="'.&mt('Check Mark'). |
'" src="'.&Apache::loncommon::lonhttpdurl($request->dir_config('lonIconsURL').'/check.gif').'" height="16" border="0" />'; |
'" src="'.&Apache::loncommon::lonhttpdurl($request->dir_config('lonIconsURL').'/check.gif').'" height="16" border="0" />'; |
|
|
$studentTable.=' '.&mt('<b>Note:</b> Problems graded correct by the computer are marked with a [_1] symbol.',$checkIcon)."\n". |
$studentTable.=' <span class="LC_info">'. |
|
&mt('Problems graded correct by the computer are marked with a [_1] symbol.',$checkIcon). |
|
'</span>'."\n". |
&Apache::loncommon::start_data_table(). |
&Apache::loncommon::start_data_table(). |
&Apache::loncommon::start_data_table_header_row(). |
&Apache::loncommon::start_data_table_header_row(). |
'<th align="center"> Prob. </th>'. |
'<th align="center"> Prob. </th>'. |
Line 4521 sub displayPage {
|
Line 4540 sub displayPage {
|
$curRes = $iterator->next(); |
$curRes = $iterator->next(); |
} |
} |
|
|
$studentTable.='</table>'."\n". |
$studentTable.= |
'<input type="button" value="'.&mt('Save').'" '. |
'</table>'."\n". |
'onClick="javascript:checkSubmitPage(this.form,'.$question.');" />'. |
'<input type="button" value="'.&mt('Save').'" '. |
'</form>'."\n"; |
'onclick="javascript:checkSubmitPage(this.form,'.$question.');" />'. |
|
'</form>'."\n"; |
$studentTable.=&show_grading_menu_form($symb); |
$studentTable.=&show_grading_menu_form($symb); |
$request->print($studentTable); |
$request->print($studentTable); |
|
|
Line 5270 sub scantron_selectphase {
|
Line 5290 sub scantron_selectphase {
|
<input name="command" value="scantronupload_save" type="hidden" /> |
<input name="command" value="scantronupload_save" type="hidden" /> |
'.&mt('File to upload: [_1]','<input type="file" name="upfile" size="50" />').' |
'.&mt('File to upload: [_1]','<input type="file" name="upfile" size="50" />').' |
<br /> |
<br /> |
<input type="button" onClick="javascript:checkUpload(this.form);" value="'.&mt('Upload Bubblesheet Data').'" /> |
<input type="button" onclick="javascript:checkUpload(this.form);" value="'.&mt('Upload Bubblesheet Data').'" /> |
</form> |
</form> |
'); |
'); |
|
|
Line 7457 sub scantron_get_maxbubble {
|
Line 7477 sub scantron_get_maxbubble {
|
if (ref($nav_error)) { |
if (ref($nav_error)) { |
$$nav_error = 1; |
$$nav_error = 1; |
} |
} |
|
return; |
} |
} |
my $map=$navmap->getResourceByUrl($sequence); |
my $map=$navmap->getResourceByUrl($sequence); |
my @resources=$navmap->retrieveResources($map,\&scantron_filter,1,0); |
my @resources=$navmap->retrieveResources($map,\&scantron_filter,1,0); |
Line 7620 sub scantron_process_students {
|
Line 7641 sub scantron_process_students {
|
my (%grader_partids_by_symb,%grader_randomlists_by_symb); |
my (%grader_partids_by_symb,%grader_randomlists_by_symb); |
&graders_resources_pass(\@resources,\%grader_partids_by_symb, |
&graders_resources_pass(\@resources,\%grader_partids_by_symb, |
\%grader_randomlists_by_symb); |
\%grader_randomlists_by_symb); |
|
my $resource_error; |
foreach my $resource (@resources) { |
foreach my $resource (@resources) { |
my $ressymb = $resource->symb(); |
my $ressymb; |
|
if (ref($resource)) { |
|
$ressymb = $resource->symb(); |
|
} else { |
|
$resource_error = 1; |
|
last; |
|
} |
my ($analysis,$parts) = |
my ($analysis,$parts) = |
&scantron_partids_tograde($resource,$env{'request.course.id'}, |
&scantron_partids_tograde($resource,$env{'request.course.id'}, |
$env{'user.name'},$env{'user.domain'},1); |
$env{'user.name'},$env{'user.domain'},1); |
Line 7633 sub scantron_process_students {
|
Line 7661 sub scantron_process_students {
|
} |
} |
} |
} |
} |
} |
|
if ($resource_error) { |
|
$r->print(&navmap_errormsg()); |
|
return ''; |
|
} |
|
|
my ($uname,$udom); |
my ($uname,$udom); |
my $result= <<SCANTRONFORM; |
my $result= <<SCANTRONFORM; |
Line 7703 SCANTRONFORM
|
Line 7735 SCANTRONFORM
|
} |
} |
($uname,$udom)=split(/:/,$uname); |
($uname,$udom)=split(/:/,$uname); |
|
|
my %partids_by_symb; |
my (%partids_by_symb,$res_error); |
foreach my $resource (@resources) { |
foreach my $resource (@resources) { |
my $ressymb = $resource->symb(); |
my $ressymb; |
|
if (ref($resource)) { |
|
$ressymb = $resource->symb(); |
|
} else { |
|
$res_error = 1; |
|
last; |
|
} |
if ((exists($grader_randomlists_by_symb{$ressymb})) || |
if ((exists($grader_randomlists_by_symb{$ressymb})) || |
(ref($grader_partids_by_symb{$ressymb}) ne 'ARRAY')) { |
(ref($grader_partids_by_symb{$ressymb}) ne 'ARRAY')) { |
my ($analysis,$parts) = |
my ($analysis,$parts) = |
Line 7716 SCANTRONFORM
|
Line 7754 SCANTRONFORM
|
} |
} |
} |
} |
|
|
|
if ($res_error) { |
|
&scantron_add_delay(\@delayqueue,$line, |
|
'An error occurred while grading student '.$uname,2); |
|
next; |
|
} |
|
|
&Apache::lonxml::clear_problem_counter(); |
&Apache::lonxml::clear_problem_counter(); |
&Apache::lonnet::appenv($scan_record); |
&Apache::lonnet::appenv($scan_record); |
|
|
Line 7939 sub scantron_upload_scantron_data {
|
Line 7983 sub scantron_upload_scantron_data {
|
&Apache::lonhtmlcommon::end_pick_box().'<br /> |
&Apache::lonhtmlcommon::end_pick_box().'<br /> |
|
|
<input name="command" value="scantronupload_save" type="hidden" /> |
<input name="command" value="scantronupload_save" type="hidden" /> |
<input type="button" onClick="javascript:checkUpload(this.form);" value="'.&mt('Upload Bubblesheet Data').'" /> |
<input type="button" onclick="javascript:checkUpload(this.form);" value="'.&mt('Upload Bubblesheet Data').'" /> |
</form> |
</form> |
'); |
'); |
return ''; |
return ''; |
Line 8498 sub grading_menu {
|
Line 8542 sub grading_menu {
|
icon => 'addClickerInfoFile.png', |
icon => 'addClickerInfoFile.png', |
linktitle => 'Specify a file containing the clicker information for this resource.' |
linktitle => 'Specify a file containing the clicker information for this resource.' |
}, |
}, |
{ linktext => 'Grade/Manage/Review Bubblesheet Forms', |
{ linktext => 'Grade/Manage/Review Bubblesheets', |
url => $url4, |
url => $url4, |
permission => 'F', |
permission => 'F', |
icon => 'stat.png', |
icon => 'stat.png', |
Line 8525 sub grading_menu {
|
Line 8569 sub grading_menu {
|
$Str .= Apache::lonhtmlcommon::generate_menu(@menu); |
$Str .= Apache::lonhtmlcommon::generate_menu(@menu); |
#$menudata->{'jscript'} |
#$menudata->{'jscript'} |
$Str .='<hr /><input type="button" value="'.&mt('Verify Receipt No.').'" '. |
$Str .='<hr /><input type="button" value="'.&mt('Verify Receipt No.').'" '. |
' onClick="javascript:checkChoice(document.forms.gradingMenu,\'5\',\'verify\')" '. |
' onclick="javascript:checkChoice(document.forms.gradingMenu,\'5\',\'verify\')" '. |
' /> '. |
' /> '. |
&Apache::lonnet::recprefix($env{'request.course.id'}). |
&Apache::lonnet::recprefix($env{'request.course.id'}). |
'-<input type="text" name="receipt" size="4" onChange="javascript:checkReceiptNo(this.form,\'OK\')" />'; |
'-<input type="text" name="receipt" size="4" onchange="javascript:checkReceiptNo(this.form,\'OK\')" />'; |
|
|
$Str .="</form>\n"; |
$Str .="</form>\n"; |
my $receiptalert = &mt("Please enter a receipt number given by a student in the receipt box."); |
my $receiptalert = &mt("Please enter a receipt number given by a student in the receipt box."); |
Line 8711 GRADINGMENUJS
|
Line 8755 GRADINGMENUJS
|
</label> |
</label> |
</div> |
</div> |
<div> |
<div> |
<input type="button" onClick="javascript:checkChoice(this.form,\'2\');" value="'.&mt('Next').' →" /> |
<input type="button" onclick="javascript:checkChoice(this.form,\'2\');" value="'.&mt('Next').' →" /> |
</div> |
</div> |
</div> |
</div> |
|
|
Line 8728 GRADINGMENUJS
|
Line 8772 GRADINGMENUJS
|
</label> |
</label> |
</div> |
</div> |
<div> |
<div> |
<input type="button" onClick="javascript:checkChoice(this.form,\'2\');" value="'.&mt('Next').' →" /> |
<input type="button" onclick="javascript:checkChoice(this.form,\'2\');" value="'.&mt('Next').' →" /> |
</div> |
</div> |
</div> |
</div> |
</form>'; |
</form>'; |
Line 8908 function sanitycheck() {
|
Line 8952 function sanitycheck() {
|
<input type="hidden" name="saveState" value="$env{'form.saveState'}" /> |
<input type="hidden" name="saveState" value="$env{'form.saveState'}" /> |
<input type="file" name="upfile" size="50" /> |
<input type="file" name="upfile" size="50" /> |
<br /><label>$type: $selectform</label> |
<br /><label>$type: $selectform</label> |
<br /><label><input type="radio" name="gradingmechanism" value="attendance"$checked{'attendance'} onClick="sanitycheck()" />$attendance </label> |
<br /><label><input type="radio" name="gradingmechanism" value="attendance"$checked{'attendance'} onclick="sanitycheck()" />$attendance </label> |
<br /><label><input type="radio" name="gradingmechanism" value="personnel"$checked{'personnel'} onClick="sanitycheck()" />$personnel</label> |
<br /><label><input type="radio" name="gradingmechanism" value="personnel"$checked{'personnel'} onclick="sanitycheck()" />$personnel</label> |
<br /><label><input type="radio" name="gradingmechanism" value="specific"$checked{'specific'} onClick="sanitycheck()" />$specific </label> |
<br /><label><input type="radio" name="gradingmechanism" value="specific"$checked{'specific'} onclick="sanitycheck()" />$specific </label> |
<input type="text" name="specificid" value="$env{'form.specificid'}" size="20" /> |
<input type="text" name="specificid" value="$env{'form.specificid'}" size="20" /> |
<br /><label><input type="radio" name="gradingmechanism" value="given"$checked{'given'} onClick="sanitycheck()" />$given </label> |
<br /><label><input type="radio" name="gradingmechanism" value="given"$checked{'given'} onclick="sanitycheck()" />$given </label> |
<br /> |
<br /> |
<input type="text" name="givenanswer" size="50" /> |
<input type="text" name="givenanswer" size="50" /> |
<input type="hidden" name="waschecked" value="$env{'form.gradingmechanism'}" /> |
<input type="hidden" name="waschecked" value="$env{'form.gradingmechanism'}" /> |
<br /><label>$pcorrect: <input type="text" name="pcorrect" size="4" value="$env{'form.pcorrect'}" onChange="sanitycheck()" /></label> |
<br /><label>$pcorrect: <input type="text" name="pcorrect" size="4" value="$env{'form.pcorrect'}" onchange="sanitycheck()" /></label> |
<br /><label>$pincorrect: <input type="text" name="pincorrect" size="4" value="$env{'form.pincorrect'}" onChange="sanitycheck()" /></label> |
<br /><label>$pincorrect: <input type="text" name="pincorrect" size="4" value="$env{'form.pincorrect'}" onchange="sanitycheck()" /></label> |
<br /><input type="button" onClick="javascript:checkUpload(this.form);" value="$upload" /> |
<br /><input type="button" onclick="javascript:checkUpload(this.form);" value="$upload" /> |
</form> |
</form> |
ENDUPFORM |
ENDUPFORM |
$result.='</td></tr></table>'."\n". |
$result.='</td></tr></table>'."\n". |