| … | |
… | |
| 237 | my $avg_num_attempts = ($num_of_problems) ? $num_of_attempts/$num_of_problems : 0; |
237 | my $avg_num_attempts = ($num_of_problems) ? $num_of_attempts/$num_of_problems : 0; |
| 238 | my $successIndicator = ($avg_num_attempts) ? ($totalRight/$total)**2/$avg_num_attempts : 0 ; |
238 | my $successIndicator = ($avg_num_attempts) ? ($totalRight/$total)**2/$avg_num_attempts : 0 ; |
| 239 | |
239 | |
| 240 | print CGI::Tr( |
240 | print CGI::Tr( |
| 241 | CGI::td(CGI::a({-href=>$act_as_student_url},$fullName), CGI::br(), CGI::a({-href=>"mailto:$email"},$email)), |
241 | CGI::td(CGI::a({-href=>$act_as_student_url},$fullName), CGI::br(), CGI::a({-href=>"mailto:$email"},$email)), |
| 242 | CGI::td($totalRight), # score |
242 | CGI::td( sprintf("%0.2f",$totalRight) ), # score |
| 243 | CGI::td($total), # out of |
243 | CGI::td($total), # out of |
| 244 | CGI::td(sprintf("%0.0f",100*$successIndicator)), # indicator |
244 | CGI::td(sprintf("%0.0f",100*$successIndicator)), # indicator |
| 245 | CGI::td("<pre>$string\n$twoString</pre>"), # problems |
245 | CGI::td("<pre>$string\n$twoString</pre>"), # problems |
| 246 | CGI::td($studentRecord->section), |
246 | CGI::td($studentRecord->section), |
| 247 | CGI::td($studentRecord->recitation), |
247 | CGI::td($studentRecord->recitation), |
| … | |
… | |
| 263 | my $r = $self->{r}; |
263 | my $r = $self->{r}; |
| 264 | my $db = $self->{db}; |
264 | my $db = $self->{db}; |
| 265 | my $ce = $self->{ce}; |
265 | my $ce = $self->{ce}; |
| 266 | my $courseName = $ce->{courseName}; |
266 | my $courseName = $ce->{courseName}; |
| 267 | my $studentRecord = $db->getUser($studentName); |
267 | my $studentRecord = $db->getUser($studentName); |
| 268 | |
268 | my $root = $ce->{webworkURLs}->{root}; |
| 269 | |
269 | |
| 270 | my @setIDs = sort $db->listUserSets($studentName); |
270 | my @setIDs = sort $db->listUserSets($studentName); |
| 271 | my $fullName = join("", $studentRecord->first_name," ", $studentRecord->last_name); |
271 | my $fullName = join("", $studentRecord->first_name," ", $studentRecord->last_name); |
|
|
272 | my $act_as_student_url = "$root/$courseName/?user=".$r->param("user"). |
|
|
273 | "&effectiveUser=".$studentRecord->user_id()."&key=".$r->param("key"); |
|
|
274 | |
| 272 | my $email = $studentRecord->email_address; |
275 | my $email = $studentRecord->email_address; |
| 273 | print CGI::h3($fullName), CGI::a({-href=>"mailto:$email"},$email); |
276 | print CGI::h3($fullName ), |
|
|
277 | CGI::a({-href=>"mailto:$email"},$email),CGI::br(), |
|
|
278 | "Section: ", $studentRecord->section, CGI::br(), |
|
|
279 | "Recitation: ", $studentRecord->recitation,CGI::br(), |
|
|
280 | CGI::a({-href=>$act_as_student_url},$studentRecord->user_id); |
| 274 | ############################################################### |
281 | ############################################################### |
| 275 | # Print table |
282 | # Print table |
| 276 | ############################################################### |
283 | ############################################################### |
| 277 | |
284 | |
| 278 | print |
285 | print |
| … | |
… | |
| 356 | my $avg_num_attempts = ($num_of_problems) ? $num_of_attempts/$num_of_problems : 0; |
363 | my $avg_num_attempts = ($num_of_problems) ? $num_of_attempts/$num_of_problems : 0; |
| 357 | my $successIndicator = ($avg_num_attempts) ? ($totalRight/$total)**2/$avg_num_attempts : 0 ; |
364 | my $successIndicator = ($avg_num_attempts) ? ($totalRight/$total)**2/$avg_num_attempts : 0 ; |
| 358 | |
365 | |
| 359 | print CGI::Tr( |
366 | print CGI::Tr( |
| 360 | CGI::td($setName), |
367 | CGI::td($setName), |
| 361 | CGI::td($totalRight), # score |
368 | CGI::td(sprintf("%0.2f",$totalRight)), # score |
| 362 | CGI::td($total), # out of |
369 | CGI::td($total), # out of |
| 363 | CGI::td(sprintf("%0.0f",100*$successIndicator)), # indicator |
370 | CGI::td(sprintf("%0.0f",100*$successIndicator)), # indicator |
| 364 | CGI::td("<pre>$string\n$twoString</pre>"), # problems |
371 | CGI::td("<pre>$string\n$twoString</pre>"), # problems |
| 365 | #CGI::td($studentRecord->section), |
372 | #CGI::td($studentRecord->section), |
| 366 | #CGI::td($studentRecord->recitation), |
373 | #CGI::td($studentRecord->recitation), |