version 1.597, 2010/03/11 16:29:42
|
version 1.600, 2010/03/19 22:00:06
|
Line 96 sub ssi_print_error {
|
Line 96 sub ssi_print_error {
|
|
|
# |
# |
# --- Retrieve the parts from the metadata file.--- |
# --- Retrieve the parts from the metadata file.--- |
|
# Returns an array of everything that the resources stores away |
|
# |
|
|
sub getpartlist { |
sub getpartlist { |
my ($symb,$errorref) = @_; |
my ($symb,$errorref) = @_; |
|
|
Line 121 sub getpartlist {
|
Line 124 sub getpartlist {
|
} |
} |
|
|
# --- Get the symbolic name of a problem and the url |
# --- Get the symbolic name of a problem and the url |
|
# Generate an error message if symb could not be found unless silent flag is set |
|
# Takes $env{'form.symb'} by default; if not present, takes $env{'form.url'} and tries to get symb from that |
|
# |
|
|
sub get_symb { |
sub get_symb { |
my ($request,$silent) = @_; |
my ($request,$silent) = @_; |
(my $url=$env{'form.url'}) =~ s-^http://($ENV{'SERVER_NAME'}|$ENV{'HTTP_HOST'})--; |
(my $url=$env{'form.url'}) =~ s-^http://($ENV{'SERVER_NAME'}|$ENV{'HTTP_HOST'})--; |
my $symb=($env{'form.symb'} ne '' ? $env{'form.symb'} : (&Apache::lonnet::symbread($url))); |
my $symb=($env{'form.symb'} ne '' ? $env{'form.symb'} : (&Apache::lonnet::symbread($url))); |
if ($symb eq '') { |
if ($symb eq '') { |
if (!$silent) { |
if (!$silent) { |
$request->print("Unable to handle ambiguous references:$url:."); |
$request->print(&mt("Unable to handle ambiguous references: [_1].",$url)); |
return (); |
return (); |
} |
} |
} |
} |
Line 209 sub get_display_part {
|
Line 216 sub get_display_part {
|
|
|
#--- Show resource title |
#--- Show resource title |
#--- and parts and response type |
#--- and parts and response type |
sub showResourceInfo { |
#sub showResourceInfo { |
my ($symb,$probTitle,$checkboxes,$res_error) = @_; |
# my ($symb,$probTitle,$checkboxes,$res_error) = @_; |
my $result = '<h3>'.&mt('Current Resource').': '.$probTitle.'</h3>'."\n"; |
# my $result = '<h3>'.&mt('Current Resource').': '.$probTitle.'</h3>'."\n"; |
my ($partlist,$handgrade,$responseType) = &response_type($symb,$res_error); |
# my ($partlist,$handgrade,$responseType) = &response_type($symb,$res_error); |
if (ref($res_error)) { |
# if (ref($res_error)) { |
if ($$res_error) { |
# if ($$res_error) { |
return; |
# return; |
} |
# } |
} |
# } |
$result.=&Apache::loncommon::start_data_table() |
# $result.=&Apache::loncommon::start_data_table() |
.&Apache::loncommon::start_data_table_header_row(); |
# .&Apache::loncommon::start_data_table_header_row(); |
if ($checkboxes) { |
# if ($checkboxes) { |
$result.='<th> </th>'; |
# $result.='<th> </th>'; |
} |
# } |
$result.='<th>'.&mt('Problem Part').'</th>' |
# $result.='<th>'.&mt('Problem Part').'</th>' |
.'<th>'.&mt('Res. ID').'</th>' |
# .'<th>'.&mt('Res. ID').'</th>' |
.'<th>'.&mt('Type').'</th>' |
# .'<th>'.&mt('Type').'</th>' |
.&Apache::loncommon::end_data_table_header_row(); |
# .&Apache::loncommon::end_data_table_header_row(); |
my %resptype = (); |
# my %resptype = (); |
my $hdgrade='no'; |
# my $hdgrade='no'; |
my %partsseen; |
# my %partsseen; |
foreach my $partID (sort(keys(%$responseType))) { |
# foreach my $partID (sort(keys(%$responseType))) { |
foreach my $resID (sort(keys(%{ $responseType->{$partID} }))) { |
# foreach my $resID (sort(keys(%{ $responseType->{$partID} }))) { |
my $handgrade=$$handgrade{$partID.'_'.$resID}; |
# my $handgrade=$$handgrade{$partID.'_'.$resID}; |
my $responsetype = $responseType->{$partID}->{$resID}; |
# my $responsetype = $responseType->{$partID}->{$resID}; |
$hdgrade = $handgrade if ($handgrade eq 'yes'); |
# $hdgrade = $handgrade if ($handgrade eq 'yes'); |
$result.=&Apache::loncommon::start_data_table_row(); |
# $result.=&Apache::loncommon::start_data_table_row(); |
if ($checkboxes) { |
# if ($checkboxes) { |
if (exists($partsseen{$partID})) { |
# if (exists($partsseen{$partID})) { |
$result.="<td> </td>"; |
# $result.="<td> </td>"; |
} else { |
# } else { |
$result.="<td><input type='checkbox' name='vPart' value='$partID' checked='checked' /></td>"; |
# $result.="<td><input type='checkbox' name='vPart' value='$partID' checked='checked' /></td>"; |
} |
# } |
$partsseen{$partID}=1; |
# $partsseen{$partID}=1; |
} |
# } |
my $display_part=&get_display_part($partID,$symb); |
# my $display_part=&get_display_part($partID,$symb); |
$result.='<td>'.$display_part.'</td>' |
# $result.='<td>'.$display_part.'</td>' |
.'<td>'.'<span class="LC_internal_info">'.$resID.'</span></td>' |
# .'<td>'.'<span class="LC_internal_info">'.$resID.'</span></td>' |
.'<td>'.&mt($responsetype).'</td>' |
# .'<td>'.&mt($responsetype).'</td>' |
# .'<td>'.&mt('<b>Handgrade: </b>[_1]',$handgrade).'</td>' |
# .'<td>'.&mt('<b>Handgrade: </b>[_1]',$handgrade).'</td>' |
.&Apache::loncommon::end_data_table_row(); |
# .&Apache::loncommon::end_data_table_row(); |
} |
# } |
} |
# } |
$result.=&Apache::loncommon::end_data_table(); |
# $result.=&Apache::loncommon::end_data_table(); |
return $result,$responseType,$hdgrade,$partlist,$handgrade; |
# return $result,$responseType,$hdgrade,$partlist,$handgrade; |
} |
#} |
|
|
sub reset_caches { |
sub reset_caches { |
&reset_analyze_cache(); |
&reset_analyze_cache(); |
Line 732 sub most_similar {
|
Line 739 sub most_similar {
|
|
|
# ignore empty submissions (occuring when only files are sent) |
# ignore empty submissions (occuring when only files are sent) |
|
|
unless ($uessay=~/\w+/) { return ''; } |
unless ($uessay=~/\w+/s) { return ''; } |
|
|
# these will be returned. Do not care if not at least 50 percent similar |
# these will be returned. Do not care if not at least 50 percent similar |
my $limit=0.6; |
my $limit=0.6; |
Line 878 sub listStudents {
|
Line 885 sub listStudents {
|
.&mt("$viewgrade Submissions for a Student or a Group of Students") |
.&mt("$viewgrade Submissions for a Student or a Group of Students") |
.'</span></h3>'; |
.'</span></h3>'; |
|
|
my ($table,undef,$hdgrade,$partlist,$handgrade) = &showResourceInfo($symb,$env{'form.probTitle'},($env{'form.showgrading'} eq 'yes')); |
# my ($table,undef,$hdgrade,$partlist,$handgrade) = &showResourceInfo($symb,$env{'form.probTitle'},($env{'form.showgrading'} eq 'yes')); |
|
my ($partlist,$handgrade,$responseType) = &response_type($symb |
|
#,$res_error |
|
); |
|
|
my %lt = &Apache::lonlocal::texthash ( |
my %lt = &Apache::lonlocal::texthash ( |
'multiple' => 'Please select a student or group of students before clicking on the Next button.', |
'multiple' => 'Please select a student or group of students before clicking on the Next button.', |
Line 921 LISTJAVASCRIPT
|
Line 931 LISTJAVASCRIPT
|
my $checkhdgrade = ($env{'form.handgrade'} eq 'yes' && scalar(@$partlist) > 1 ) ? 'checked="checked"' : ''; |
my $checkhdgrade = ($env{'form.handgrade'} eq 'yes' && scalar(@$partlist) > 1 ) ? 'checked="checked"' : ''; |
my $checklastsub = $checkhdgrade eq '' ? 'checked="checked"' : ''; |
my $checklastsub = $checkhdgrade eq '' ? 'checked="checked"' : ''; |
my $gradeTable='<form action="/adm/grades" method="post" name="gradesub">'. |
my $gradeTable='<form action="/adm/grades" method="post" name="gradesub">'. |
"\n".$table; |
"\n"; |
|
|
$gradeTable .= &Apache::lonhtmlcommon::start_pick_box(); |
$gradeTable .= &Apache::lonhtmlcommon::start_pick_box(); |
$gradeTable .= &Apache::lonhtmlcommon::row_title(&mt('View Problem Text')) |
$gradeTable .= &Apache::lonhtmlcommon::row_title(&mt('View Problem Text')) |
Line 2268 KEYWORDS
|
Line 2278 KEYWORDS
|
} |
} |
$request->print($lastsubonly); |
$request->print($lastsubonly); |
} elsif ($env{'form.lastSub'} eq 'datesub') { |
} elsif ($env{'form.lastSub'} eq 'datesub') { |
my (undef,$responseType,undef,$parts) = &showResourceInfo($symb); |
# my (undef,$responseType,undef,$parts) = &showResourceInfo($symb); |
|
my ($parts,$handgrade,$responseType) = &response_type($symb); |
|
|
$request->print(&displaySubByDates($symb,\%record,$parts,$responseType,$checkIcon,$uname,$udom)); |
$request->print(&displaySubByDates($symb,\%record,$parts,$responseType,$checkIcon,$uname,$udom)); |
} elsif ($env{'form.lastSub'} =~ /^(last|all)$/) { |
} elsif ($env{'form.lastSub'} =~ /^(last|all)$/) { |
$request->print(&Apache::loncommon::get_previous_attempt($symb,$uname,$udom, |
$request->print(&Apache::loncommon::get_previous_attempt($symb,$uname,$udom, |
Line 2664 sub processHandGrade {
|
Line 2676 sub processHandGrade {
|
|
|
# Go directly to grade student - from submission or link from chart page |
# Go directly to grade student - from submission or link from chart page |
if ($button eq 'Grade Student') { |
if ($button eq 'Grade Student') { |
(undef,undef,$env{'form.handgrade'},undef,undef) = &showResourceInfo($symb); |
# (undef,undef,$env{'form.handgrade'},undef,undef) = &showResourceInfo($symb); |
my $processUser = $env{'form.unamedom'.$env{'form.studentNo'}}; |
my $processUser = $env{'form.unamedom'.$env{'form.studentNo'}}; |
($env{'form.student'},$env{'form.userdom'}) = split(/:/,$processUser); |
($env{'form.student'},$env{'form.userdom'}) = split(/:/,$processUser); |
$env{'form.fullname'} = $$fullname{$processUser}; |
$env{'form.fullname'} = $$fullname{$processUser}; |
Line 3894 sub csvuploadmap_header {
|
Line 3906 sub csvuploadmap_header {
|
$javascript=&csvupload_javascript_forward_associate(); |
$javascript=&csvupload_javascript_forward_associate(); |
} |
} |
|
|
my ($result) = &showResourceInfo($symb,$env{'form.probTitle'}); |
# my ($result) = &showResourceInfo($symb,$env{'form.probTitle'}); |
|
my $result=''; |
my $checked=(($env{'form.noFirstLine'})?' checked="checked"':''); |
my $checked=(($env{'form.noFirstLine'})?' checked="checked"':''); |
my $ignore=&mt('Ignore First Line'); |
my $ignore=&mt('Ignore First Line'); |
$symb = &Apache::lonenc::check_encrypt($symb); |
$symb = &Apache::lonenc::check_encrypt($symb); |
Line 3985 sub upcsvScores_form {
|
Line 3998 sub upcsvScores_form {
|
if (!$symb) {return '';} |
if (!$symb) {return '';} |
my $result=&checkforfile_js(); |
my $result=&checkforfile_js(); |
$env{'form.probTitle'} = &Apache::lonnet::gettitle($symb); |
$env{'form.probTitle'} = &Apache::lonnet::gettitle($symb); |
my ($table) = &showResourceInfo($symb,$env{'form.probTitle'}); |
# my ($table) = &showResourceInfo($symb,$env{'form.probTitle'}); |
$result.=$table; |
# $result.=$table; |
$result.='<br /><table width="100%" border="0"><tr><td bgcolor="#777777">'."\n"; |
$result.='<br /><table width="100%" border="0"><tr><td bgcolor="#777777">'."\n"; |
$result.='<table width="100%" border="0"><tr bgcolor="#e6ffff"><td>'."\n"; |
$result.='<table width="100%" border="0"><tr bgcolor="#e6ffff"><td>'."\n"; |
$result.=' <b>'.&mt('Specify a file containing the class scores for current resource.'). |
$result.=' <b>'.&mt('Specify a file containing the class scores for current resource.'). |
Line 8519 sub grading_menu {
|
Line 8532 sub grading_menu {
|
my ($symb)=&get_symb($request); |
my ($symb)=&get_symb($request); |
if (!$symb) {return '';} |
if (!$symb) {return '';} |
my $probTitle = &Apache::lonnet::gettitle($symb); |
my $probTitle = &Apache::lonnet::gettitle($symb); |
my ($table,undef,$hdgrade) = &showResourceInfo($symb,$probTitle); |
|
|
|
$request->print($table); |
# $request->print($table); |
my %fields = ('symb'=>&Apache::lonenc::check_encrypt($symb), |
my %fields = ('symb'=>&Apache::lonenc::check_encrypt($symb), |
'handgrade'=>$hdgrade, |
|
'probTitle'=>$probTitle, |
'probTitle'=>$probTitle, |
'command'=>'submit_options', |
'command'=>'individual', |
'saveState'=>"", |
'saveState'=>"", |
'gradingMenu'=>1, |
'gradingMenu'=>1, |
'showgrading'=>"yes"); |
'showgrading'=>"yes"); |
|
|
my $url1 = &Apache::lonhtmlcommon::build_url('grades/',\%fields); |
my $url1a = &Apache::lonhtmlcommon::build_url('grades/',\%fields); |
|
|
|
$fields{'command'}='ungraded'; |
|
my $url1b=&Apache::lonhtmlcommon::build_url('grades/',\%fields); |
|
|
|
$fields{'command'}='table'; |
|
my $url1c=&Apache::lonhtmlcommon::build_url('grades/',\%fields); |
|
|
|
$fields{'command'}='all_for_one'; |
|
my $url1d=&Apache::lonhtmlcommon::build_url('grades/',\%fields); |
|
|
$fields{'command'} = 'csvform'; |
$fields{'command'} = 'csvform'; |
my $url2 = &Apache::lonhtmlcommon::build_url('grades/',\%fields); |
my $url2 = &Apache::lonhtmlcommon::build_url('grades/',\%fields); |
|
|
Line 8541 sub grading_menu {
|
Line 8561 sub grading_menu {
|
$fields{'command'} = 'scantron_selectphase'; |
$fields{'command'} = 'scantron_selectphase'; |
my $url4 = &Apache::lonhtmlcommon::build_url('grades/',\%fields); |
my $url4 = &Apache::lonhtmlcommon::build_url('grades/',\%fields); |
|
|
my @menu = ({ categorytitle=>'Course Grading', |
my @menu = ({ categorytitle=>'Hand Grading', |
items =>[ |
items =>[ |
{ linktext => 'Manual Grading/View Submissions', |
{ linktext => 'Select individual students to grade', |
url => $url1, |
url => $url1a, |
permission => 'F', |
permission => 'F', |
icon => 'edit-find-replace.png', |
icon => 'edit-find-replace.png', |
linktitle => 'Start the process of hand grading submissions.' |
linktitle => 'Grade current resource for a selection of students.' |
|
}, |
|
{ linktext => 'Grade ungraded submissions.', |
|
url => $url1b, |
|
permission => 'F', |
|
icon => 'edit-find-replace.png', |
|
linktitle => 'Grade all submissions that have not been graded yet.' |
}, |
}, |
|
|
|
{ linktext => 'Grading table', |
|
url => $url1c, |
|
permission => 'F', |
|
icon => 'edit-find-replace.png', |
|
linktitle => 'Grade current resource for all students.' |
|
}, |
|
{ linktext => 'Grade complete page/sequence/folder for one student', |
|
url => $url1d, |
|
permission => 'F', |
|
icon => 'edit-find-replace.png', |
|
linktitle => 'Grade all resources in current page/sequence/folder for one student.' |
|
}]}, |
|
{ categorytitle=>'Automated Grading', |
|
items =>[ |
|
|
{ linktext => 'Upload Scores', |
{ linktext => 'Upload Scores', |
url => $url2, |
url => $url2, |
permission => 'F', |
permission => 'F', |
Line 8579 sub grading_menu {
|
Line 8621 sub grading_menu {
|
$Str .= '<form method="post" action="" name="gradingMenu">'; |
$Str .= '<form method="post" action="" name="gradingMenu">'; |
$Str .= '<input type="hidden" name="command" value="" />'. |
$Str .= '<input type="hidden" name="command" value="" />'. |
'<input type="hidden" name="symb" value="'.&Apache::lonenc::check_encrypt($symb).'" />'."\n". |
'<input type="hidden" name="symb" value="'.&Apache::lonenc::check_encrypt($symb).'" />'."\n". |
'<input type="hidden" name="handgrade" value="'.$hdgrade.'" />'."\n". |
# '<input type="hidden" name="handgrade" value="'.$hdgrade.'" />'."\n". |
'<input type="hidden" name="probTitle" value="'.$probTitle.'" />'."\n". |
'<input type="hidden" name="probTitle" value="'.$probTitle.'" />'."\n". |
'<input type="hidden" name="saveState" value="" />'."\n". |
'<input type="hidden" name="saveState" value="" />'."\n". |
'<input type="hidden" name="gradingMenu" value="1" />'."\n". |
'<input type="hidden" name="gradingMenu" value="1" />'."\n". |
Line 8634 GRADINGMENUJS
|
Line 8676 GRADINGMENUJS
|
} |
} |
|
|
|
|
#--- Displays the submissions first page ------- |
sub ungraded { |
sub submit_options { |
my ($request)=@_; |
|
&submit_options($request); |
|
} |
|
|
|
sub submit_options_sequence { |
my ($request) = @_; |
my ($request) = @_; |
my ($symb)=&get_symb($request); |
my ($symb)=&get_symb($request); |
if (!$symb) {return '';} |
if (!$symb) {return '';} |
my $probTitle = &Apache::lonnet::gettitle($symb); |
&commonJSfunctions($request); |
|
my $result; |
|
my (undef,$sections) = &getclasslist('all','0'); |
|
my $savedState = &savedState(); |
|
my $saveCmd = ($$savedState{'saveCmd'} eq '' ? 'submission' : $$savedState{'saveCmd'}); |
|
my $saveSec = ($$savedState{'saveSec'} eq '' ? 'all' : $$savedState{'saveSec'}); |
|
my $saveSub = ($$savedState{'saveSub'} eq '' ? 'all' : $$savedState{'saveSub'}); |
|
my $saveStatus = ($$savedState{'saveStatus'} eq '' ? 'Active' : $$savedState{'saveStatus'}); |
|
|
my $receiptalert = &mt("Please enter a receipt number given by a student in the receipt box."); |
# Preselect sections |
$request->print(&Apache::lonhtmlcommon::scripttag(<<GRADINGMENUJS)); |
my $selsec=""; |
function checkChoice(formname,val,cmdx) { |
if (ref($sections)) { |
if (val <= 2) { |
foreach my $section (sort(@$sections)) { |
var cmd = radioSelection(formname.radioChoice); |
$selsec.='<option value="'.$section.'" '. |
var cmdsave = cmd; |
($saveSec eq $section ? 'selected="selected"':'').'>'.$section.'</option>'."\n"; |
} else { |
} |
cmd = cmdx; |
|
cmdsave = 'submission'; |
|
} |
|
formname.command.value = cmd; |
|
formname.saveState.value = "saveCmd="+cmdsave+":saveSec="+pullDownSelection(formname.section)+ |
|
":saveSub="+pullDownSelection(formname.submitonly)+":saveStatus="+pullDownSelection(formname.Status); |
|
if (val < 5) formname.submit(); |
|
if (val == 5) { |
|
if (!checkReceiptNo(formname,'notOK')) { return false;} |
|
formname.submit(); |
|
} |
|
if (val < 7) formname.submit(); |
|
} |
} |
|
|
function checkReceiptNo(formname,nospace) { |
$result.='<form action="/adm/grades" method="post" name="gradingMenu">'."\n". |
var receiptNo = formname.receipt.value; |
'<input type="hidden" name="symb" value="'.&Apache::lonenc::check_encrypt($symb).'" />'."\n". |
var checkOpt = false; |
'<input type="hidden" name="saveState" value="" />'."\n". |
if (nospace == "OK" && isNaN(receiptNo)) {checkOpt = true;} |
'<input type="hidden" name="gradingMenu" value="1" />'."\n". |
if (nospace == "notOK" && (isNaN(receiptNo) || receiptNo == "")) {checkOpt = true;} |
'<input type="hidden" name="showgrading" value="yes" />'."\n"; |
if (checkOpt) { |
|
alert("$receiptalert"); |
$result.=' |
formname.receipt.value = ""; |
<h2> |
formname.receipt.focus(); |
'.&mt('Grade complete page/sequence/folder for one student').' |
return false; |
</h2> |
} |
|
return true; |
<div class="LC_columnSection"> |
|
|
|
<fieldset> |
|
<legend> |
|
'.&mt('Sections').' |
|
</legend> |
|
<select name="section" multiple="multiple" size="5">'."\n"; |
|
$result.= $selsec; |
|
$result.= '<option value="all" '.($saveSec eq 'all' ? 'selected="selected"' : ''). '>all</option></select> '; |
|
$result.=' |
|
</fieldset> |
|
|
|
<fieldset> |
|
<legend> |
|
'.&mt('Groups').' |
|
</legend> |
|
'.&Apache::lonstatistics::GroupSelect('group','multiple',5).' |
|
</fieldset> |
|
|
|
<fieldset> |
|
<legend> |
|
'.&mt('Access Status').' |
|
</legend> |
|
'.&Apache::lonhtmlcommon::StatusOptions($saveStatus,undef,5,undef,'mult').' |
|
</fieldset> |
|
|
|
</div> |
|
|
|
<br /> |
|
|
|
<input type="hidden" name="command" value="pickStudentPage" /> |
|
<div> |
|
<input type="submit" value="'.&mt('Next').' →" /> |
|
</div> |
|
</div> |
|
</form>'; |
|
$result .= &show_grading_menu_form($symb); |
|
return $result; |
|
} |
|
|
|
sub submit_options_table { |
|
my ($request) = @_; |
|
my ($symb)=&get_symb($request); |
|
if (!$symb) {return '';} |
|
&commonJSfunctions($request); |
|
my $result; |
|
my (undef,$sections) = &getclasslist('all','0'); |
|
my $savedState = &savedState(); |
|
my $saveCmd = ($$savedState{'saveCmd'} eq '' ? 'submission' : $$savedState{'saveCmd'}); |
|
my $saveSec = ($$savedState{'saveSec'} eq '' ? 'all' : $$savedState{'saveSec'}); |
|
my $saveSub = ($$savedState{'saveSub'} eq '' ? 'all' : $$savedState{'saveSub'}); |
|
my $saveStatus = ($$savedState{'saveStatus'} eq '' ? 'Active' : $$savedState{'saveStatus'}); |
|
|
|
# Preselect sections |
|
my $selsec=""; |
|
if (ref($sections)) { |
|
foreach my $section (sort(@$sections)) { |
|
$selsec.='<option value="'.$section.'" '. |
|
($saveSec eq $section ? 'selected="selected"':'').'>'.$section.'</option>'."\n"; |
|
} |
} |
} |
GRADINGMENUJS |
|
|
$result.='<form action="/adm/grades" method="post" name="gradingMenu">'."\n". |
|
'<input type="hidden" name="symb" value="'.&Apache::lonenc::check_encrypt($symb).'" />'."\n". |
|
'<input type="hidden" name="saveState" value="" />'."\n". |
|
'<input type="hidden" name="gradingMenu" value="1" />'."\n". |
|
'<input type="hidden" name="showgrading" value="yes" />'."\n"; |
|
|
|
$result.=' |
|
<h2> |
|
'.&mt('Grading table').' |
|
</h2> |
|
|
|
<div class="LC_columnSection"> |
|
|
|
<fieldset> |
|
<legend> |
|
'.&mt('Sections').' |
|
</legend> |
|
<select name="section" multiple="multiple" size="5">'."\n"; |
|
$result.= $selsec; |
|
$result.= '<option value="all" '.($saveSec eq 'all' ? 'selected="selected"' : ''). '>all</option></select> '; |
|
$result.=' |
|
</fieldset> |
|
|
|
<fieldset> |
|
<legend> |
|
'.&mt('Groups').' |
|
</legend> |
|
'.&Apache::lonstatistics::GroupSelect('group','multiple',5).' |
|
</fieldset> |
|
|
|
<fieldset> |
|
<legend> |
|
'.&mt('Access Status').' |
|
</legend> |
|
'.&Apache::lonhtmlcommon::StatusOptions($saveStatus,undef,5,undef,'mult').' |
|
</fieldset> |
|
|
|
</div> |
|
|
|
<br /> |
|
|
|
<input type="hidden" name="command" value="viewgrades" /> |
|
<div> |
|
<input type="submit" value="'.&mt('Next').' →" /> |
|
</div> |
|
</div> |
|
</form>'; |
|
$result .= &show_grading_menu_form($symb); |
|
return $result; |
|
} |
|
|
|
|
|
|
|
#--- Displays the submissions first page ------- |
|
sub submit_options { |
|
my ($request) = @_; |
|
my ($symb)=&get_symb($request); |
|
if (!$symb) {return '';} |
|
my $probTitle = &Apache::lonnet::gettitle($symb); |
|
|
&commonJSfunctions($request); |
&commonJSfunctions($request); |
my ($table,undef,$hdgrade) = &showResourceInfo($symb,$probTitle); |
|
my $result; |
my $result; |
my (undef,$sections) = &getclasslist('all','0'); |
my (undef,$sections) = &getclasslist('all','0'); |
my $savedState = &savedState(); |
my $savedState = &savedState(); |
Line 8697 GRADINGMENUJS
|
Line 8856 GRADINGMENUJS
|
|
|
$result.='<form action="/adm/grades" method="post" name="gradingMenu">'."\n". |
$result.='<form action="/adm/grades" method="post" name="gradingMenu">'."\n". |
'<input type="hidden" name="symb" value="'.&Apache::lonenc::check_encrypt($symb).'" />'."\n". |
'<input type="hidden" name="symb" value="'.&Apache::lonenc::check_encrypt($symb).'" />'."\n". |
'<input type="hidden" name="handgrade" value="'.$hdgrade.'" />'."\n". |
|
'<input type="hidden" name="probTitle" value="'.$probTitle.'" />'."\n". |
'<input type="hidden" name="probTitle" value="'.$probTitle.'" />'."\n". |
'<input type="hidden" name="command" value="" />'."\n". |
|
'<input type="hidden" name="saveState" value="" />'."\n". |
'<input type="hidden" name="saveState" value="" />'."\n". |
'<input type="hidden" name="gradingMenu" value="1" />'."\n". |
'<input type="hidden" name="gradingMenu" value="1" />'."\n". |
'<input type="hidden" name="showgrading" value="yes" />'."\n"; |
'<input type="hidden" name="showgrading" value="yes" />'."\n"; |
|
|
$result.=' |
$result.=' |
<h2> |
<h2> |
'.&mt('Grade Current Resource').' |
'.&mt('Select individual students to grade').' |
</h2> |
</h2> |
<div> |
|
'.$table.' |
|
</div> |
|
|
|
<div class="LC_columnSection"> |
<div class="LC_columnSection"> |
|
|
Line 8754 GRADINGMENUJS
|
Line 8908 GRADINGMENUJS
|
</div> |
</div> |
|
|
<br /> |
<br /> |
<div> |
<input type="hidden" name="command" value="submission" /> |
<div> |
<input type="submit" value="'.&mt('Next').' →" /> |
<label> |
|
<input type="radio" name="radioChoice" value="submission" '. |
|
($saveCmd eq 'submission' ? 'checked="checked"' : '').' /> '. |
|
&mt('Select individual students to grade and view submissions.').' |
|
</label> |
|
</div> |
|
<div> |
|
<label> |
|
<input type="radio" name="radioChoice" value="viewgrades" '. |
|
($saveCmd eq 'viewgrades' ? 'checked="checked"' : '').' /> '. |
|
&mt('Grade all selected students in a grading table.').' |
|
</label> |
|
</div> |
|
<div> |
|
<input type="button" onclick="javascript:checkChoice(this.form,\'2\');" value="'.&mt('Next').' →" /> |
|
</div> |
</div> |
</div> |
</div> |
|
|
|
|
<h2> |
|
'.&mt('Grade Complete Folder for One Student').' |
|
</h2> |
|
<div> |
|
<div> |
|
<label> |
|
<input type="radio" name="radioChoice" value="pickStudentPage" '. |
|
($saveCmd eq 'pickStudentPage' ? 'checked="checked"' : '').' /> '. |
|
&mt('The <b>complete</b> page/sequence/folder: For one student').' |
|
</label> |
|
</div> |
|
<div> |
|
<input type="button" onclick="javascript:checkChoice(this.form,\'2\');" value="'.&mt('Next').' →" /> |
|
</div> |
|
</div> |
|
</form>'; |
</form>'; |
$result .= &show_grading_menu_form($symb); |
$result .= &show_grading_menu_form($symb); |
return $result; |
return $result; |
Line 8884 sub process_clicker {
|
Line 9008 sub process_clicker {
|
if (!$symb) {return '';} |
if (!$symb) {return '';} |
my $result=&checkforfile_js(); |
my $result=&checkforfile_js(); |
$env{'form.probTitle'} = &Apache::lonnet::gettitle($symb); |
$env{'form.probTitle'} = &Apache::lonnet::gettitle($symb); |
my ($table) = &showResourceInfo($symb,$env{'form.probTitle'}); |
# my ($table) = &showResourceInfo($symb,$env{'form.probTitle'}); |
$result.=$table; |
# $result.=$table; |
$result.='<br /><table width="100%" border="0"><tr><td bgcolor="#777777">'."\n"; |
$result.='<br /><table width="100%" border="0"><tr><td bgcolor="#777777">'."\n"; |
$result.='<table width="100%" border="0"><tr bgcolor="#e6ffff"><td>'."\n"; |
$result.='<table width="100%" border="0"><tr bgcolor="#e6ffff"><td>'."\n"; |
$result.=' <b>'.&mt('Specify a file containing the clicker information for this resource.'). |
$result.=' <b>'.&mt('Specify a file containing the clicker information for this resource.'). |
Line 8994 sub process_clicker_file {
|
Line 9118 sub process_clicker_file {
|
my %Saveable_Parameters=&clicker_grading_parameters(); |
my %Saveable_Parameters=&clicker_grading_parameters(); |
&Apache::loncommon::store_course_settings('grades_clicker', |
&Apache::loncommon::store_course_settings('grades_clicker', |
\%Saveable_Parameters); |
\%Saveable_Parameters); |
|
my $result=''; |
my ($result) = &showResourceInfo($symb,$env{'form.probTitle'}); |
# my ($result) = &showResourceInfo($symb,$env{'form.probTitle'}); |
if (($env{'form.gradingmechanism'} eq 'specific') && ($env{'form.specificid'}!~/\w/)) { |
if (($env{'form.gradingmechanism'} eq 'specific') && ($env{'form.specificid'}!~/\w/)) { |
$result.='<span class="LC_error">'.&mt('You need to specify a clicker ID for the correct answer').'</span>'; |
$result.='<span class="LC_error">'.&mt('You need to specify a clicker ID for the correct answer').'</span>'; |
return $result.&show_grading_menu_form($symb); |
return $result.&show_grading_menu_form($symb); |
Line 9234 sub assign_clicker_grades {
|
Line 9358 sub assign_clicker_grades {
|
# FIXME: This should probably look for the first handgradeable part |
# FIXME: This should probably look for the first handgradeable part |
my $part=$$partlist[0]; |
my $part=$$partlist[0]; |
# Start screen output |
# Start screen output |
my ($result) = &showResourceInfo($symb,$env{'form.probTitle'}); |
my $result=''; |
|
# my ($result) = &showResourceInfo($symb,$env{'form.probTitle'}); |
|
|
my $heading=&mt('Assigning grades based on clicker file'); |
my $heading=&mt('Assigning grades based on clicker file'); |
$result.=(<<ENDHEADER); |
$result.=(<<ENDHEADER); |
Line 9404 sub handler {
|
Line 9529 sub handler {
|
&processGroup($request); |
&processGroup($request); |
} elsif ($command eq 'gradingmenu' && $perm{'vgr'}) { |
} elsif ($command eq 'gradingmenu' && $perm{'vgr'}) { |
$request->print(&grading_menu($request)); |
$request->print(&grading_menu($request)); |
} elsif ($command eq 'submit_options' && $perm{'vgr'}) { |
} elsif ($command eq 'individual' && $perm{'vgr'}) { |
$request->print(&submit_options($request)); |
$request->print(&submit_options($request)); |
|
} elsif ($command eq 'ungraded' && $perm{'vgr'}) { |
|
$request->print(&submit_options($request)); |
|
} elsif ($command eq 'table' && $perm{'vgr'}) { |
|
$request->print(&submit_options_table($request)); |
|
} elsif ($command eq 'all_for_one' && $perm{'vgr'}) { |
|
$request->print(&submit_options_sequence($request)); |
} elsif ($command eq 'viewgrades' && $perm{'vgr'}) { |
} elsif ($command eq 'viewgrades' && $perm{'vgr'}) { |
$request->print(&viewgrades($request)); |
$request->print(&viewgrades($request)); |
} elsif ($command eq 'handgrade' && $perm{'mgr'}) { |
} elsif ($command eq 'handgrade' && $perm{'mgr'}) { |