[LON-CAPA-cvs] cvs: loncom /homework grades.pm
raeburn
raeburn at source.lon-capa.org
Thu May 7 14:43:52 EDT 2020
raeburn Thu May 7 18:43:52 2020 EDT
Modified files:
/loncom/homework grades.pm
Log:
- White space changes only (for readability).
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.765 loncom/homework/grades.pm:1.766
--- loncom/homework/grades.pm:1.765 Wed May 6 15:01:15 2020
+++ loncom/homework/grades.pm Thu May 7 18:43:52 2020
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.765 2020/05/06 15:01:15 raeburn Exp $
+# $Id: grades.pm,v 1.766 2020/05/07 18:43:52 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -821,14 +821,14 @@
#--- Check whether a receipt number is valid.---
sub verifyreceipt {
- my ($request,$symb) = @_;
+ my ($request,$symb) = @_;
my $courseid = $env{'request.course.id'};
my $receipt = &Apache::lonnet::recprefix($courseid).'-'.
$env{'form.receipt'};
$receipt =~ s/[^\-\d]//g;
- my $title.=
+ my $title =
'<h3><span class="LC_info">'.
&mt('Verifying Receipt Number [_1]',$receipt).
'</span></h3>'."\n";
@@ -917,7 +917,7 @@
my $getsec = $env{'form.section'} eq '' ? 'all' : $env{'form.section'};
my $getgroup = $env{'form.group'} eq '' ? 'all' : $env{'form.group'};
unless ($submitonly) {
- $submitonly= $env{'form.submitonly'} eq '' ? 'all' : $env{'form.submitonly'};
+ $submitonly = $env{'form.submitonly'} eq '' ? 'all' : $env{'form.submitonly'};
}
my $result='';
@@ -1214,8 +1214,8 @@
#---- Called from the listStudents routine
sub check_script {
- my ($form, $type)=@_;
- my $chkallscript= &Apache::lonhtmlcommon::scripttag('
+ my ($form,$type) = @_;
+ my $chkallscript = &Apache::lonhtmlcommon::scripttag('
function checkall() {
for (i=0; i<document.forms.'.$form.'.elements.length; i++) {
ele = document.forms.'.$form.'.elements[i];
@@ -1260,7 +1260,7 @@
# Displays the submissions for one student or a group of students
sub processGroup {
- my ($request,$symb) = @_;
+ my ($request,$symb) = @_;
my $ctr = 0;
my @stuchecked = &Apache::loncommon::get_env_multiple('form.stuinfo');
my $total = scalar(@stuchecked)-1;
@@ -2026,8 +2026,8 @@
sub download_all_link {
my ($r,$symb) = @_;
unless (&files_exist($r, $symb)) {
- $r->print(&mt('There are currently no submitted documents.'));
- return;
+ $r->print(&mt('There are currently no submitted documents.'));
+ return;
}
my $all_students =
join("\n", &Apache::loncommon::get_env_multiple('form.stuinfo'));
@@ -4738,7 +4738,7 @@
}
sub csvuploadassign {
- my ($request,$symb)= @_;
+ my ($request,$symb) = @_;
if (!$symb) {return '';}
my $error_msg = '';
my $datatoken = &Apache::loncommon::valid_datatoken($env{'form.datatoken'});
@@ -4854,7 +4854,7 @@
$grades{$store_key}=$entries{$fields{$dest}};
}
}
- if (! %grades) {
+ if (! %grades) {
push(@skipped,&mt("[_1]: no data to save","$username:$domain"));
} else {
$grades{"resource.regrader"}="$env{'user.name'}:$env{'user.domain'}";
@@ -5655,7 +5655,7 @@
sub defaultFormData {
my ($symb)=@_;
- return '<input type="hidden" name="symb" value="'.&Apache::lonenc::check_encrypt($symb).'" />';
+ return '<input type="hidden" name="symb" value="'.&Apache::lonenc::check_encrypt($symb).'" />';
}
@@ -9943,8 +9943,6 @@
<input type="submit" value="'.&mt('Next').' →" />
</div>
</div>
-
-
</form>';
return $result;
}
@@ -10212,7 +10210,7 @@
<input type="text" name="givenanswer" size="50" />
<input type="hidden" name="waschecked" value="$env{'form.gradingmechanism'}" />
ENDGRADINGFORM
- $result.='</td>'.&Apache::loncommon::end_data_table_row().
+ $result.='</td>'.&Apache::loncommon::end_data_table_row().
&Apache::loncommon::start_data_table_row().'<td>'.(<<ENDPERCFORM);
<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>
@@ -10226,7 +10224,7 @@
}
sub process_clicker_file {
- my ($r,$symb)=@_;
+ my ($r,$symb) = @_;
if (!$symb) {return '';}
my %Saveable_Parameters=&clicker_grading_parameters();
@@ -10556,7 +10554,7 @@
sub assign_clicker_grades {
- my ($r,$symb)=@_;
+ my ($r,$symb) = @_;
if (!$symb) {return '';}
# See which part we are saving to
my $res_error;
@@ -10567,11 +10565,11 @@
# FIXME: This should probably look for the first handgradeable part
my $part=$$partlist[0];
# Start screen output
- my $result=&Apache::loncommon::start_data_table().
- &Apache::loncommon::start_data_table_header_row().
- '<th>'.&mt('Assigning grades based on clicker file').'</th>'.
- &Apache::loncommon::end_data_table_header_row().
- &Apache::loncommon::start_data_table_row().'<td>';
+ my $result = &Apache::loncommon::start_data_table().
+ &Apache::loncommon::start_data_table_header_row().
+ '<th>'.&mt('Assigning grades based on clicker file').'</th>'.
+ &Apache::loncommon::end_data_table_header_row().
+ &Apache::loncommon::start_data_table_row().'<td>';
# Get correct result
# FIXME: Possibly need delimiter other than ":"
my @correct=();
@@ -10633,7 +10631,7 @@
for (my $i=0;$i<$number;$i++) {
if ($correct[$i] eq '-') {
$realnumber--;
- } elsif (($answer[$i]) || ($answer[$i]=~/^[0\.]+$/)) {
+ } elsif (($answer[$i]) || ($answer[$i]=~/^[0\.]+$/)) {
if ($gradingmechanism eq 'attendance') {
$sum+=$pcorrect;
} elsif ($correct[$i] eq '*') {
More information about the LON-CAPA-cvs
mailing list