version 1.71, 2003/05/27 14:51:24
|
version 1.73, 2003/05/29 21:44:53
|
Line 300 sub PrepareClasslist {
|
Line 300 sub PrepareClasslist {
|
@Students = @TmpStudents; |
@Students = @TmpStudents; |
# |
# |
# Now deal with that current student thing.... |
# Now deal with that current student thing.... |
if (exists($ENV{'form.StudentAssessmentStudent'})) { |
$curr_student = undef; |
|
if (exists($ENV{'form.SelectedStudent'})) { |
my ($current_uname,$current_dom) = |
my ($current_uname,$current_dom) = |
split(':',$ENV{'form.StudentAssessmentStudent'}); |
split(':',$ENV{'form.SelectedStudent'}); |
my $i; |
my $i; |
for ($i = 0; $i<=$#Students; $i++) { |
for ($i = 0; $i<=$#Students; $i++) { |
next if (($Students[$i]->{'username'} ne $current_uname) || |
next if (($Students[$i]->{'username'} ne $current_uname) || |
Line 310 sub PrepareClasslist {
|
Line 311 sub PrepareClasslist {
|
$curr_student = $Students[$i]; |
$curr_student = $Students[$i]; |
last; # If we get here, we have our student. |
last; # If we get here, we have our student. |
} |
} |
if ($i == 0) { |
if (defined($curr_student)) { |
$prev_student = 'none'; |
if ($i == 0) { |
} else { |
$prev_student = undef; |
$prev_student = $Students[$i-1]; |
} else { |
} |
$prev_student = $Students[$i-1]; |
if ($i == $#Students) { |
} |
$next_student = 'none'; |
if ($i == $#Students) { |
} else { |
$next_student = undef; |
$next_student = $Students[$i+1]; |
} else { |
|
$next_student = $Students[$i+1]; |
|
} |
} |
} |
} |
} |
# |
# |
Line 329 sub PrepareClasslist {
|
Line 332 sub PrepareClasslist {
|
@SelectedStudentData = ($ENV{'form.StudentData'}); |
@SelectedStudentData = ($ENV{'form.StudentData'}); |
} |
} |
} else { |
} else { |
@SelectedStudentData = ('fullname'); |
@SelectedStudentData = ('username'); |
} |
} |
foreach (@SelectedStudentData) { |
foreach (@SelectedStudentData) { |
if ($_ eq 'all') { |
if ($_ eq 'all') { |
Line 377 selected student.
|
Line 380 selected student.
|
####################################################### |
####################################################### |
####################################################### |
####################################################### |
sub current_student { |
sub current_student { |
if (defined($curr_student)) { |
return $curr_student; |
return $curr_student; |
|
} else { |
|
return 'All Students'; |
|
} |
|
} |
} |
|
|
####################################################### |
####################################################### |
Line 399 in the list of students. Or something.
|
Line 398 in the list of students. Or something.
|
####################################################### |
####################################################### |
####################################################### |
####################################################### |
sub previous_student { |
sub previous_student { |
if (defined($prev_student)) { |
return $prev_student; |
return $prev_student; |
|
} else { |
|
return 'No Student Selected'; |
|
} |
|
} |
} |
|
|
####################################################### |
####################################################### |
Line 421 to be viewed.
|
Line 416 to be viewed.
|
####################################################### |
####################################################### |
####################################################### |
####################################################### |
sub next_student { |
sub next_student { |
if (defined($next_student)) { |
return $next_student; |
return $next_student; |
|
} else { |
|
return 'No Student Selected'; |
|
} |
|
} |
} |
|
|
####################################################### |
####################################################### |
Line 839 sub DisplayClasslist {
|
Line 830 sub DisplayClasslist {
|
if ($field eq 'fullname') { |
if ($field eq 'fullname') { |
$Str .= '<a href="/adm/statistics?reportSelected='; |
$Str .= '<a href="/adm/statistics?reportSelected='; |
$Str .= &Apache::lonnet::escape('student_assessment'); |
$Str .= &Apache::lonnet::escape('student_assessment'); |
$Str .= '&StudentAssessmentStudent='; |
$Str .= '&sort='.&Apache::lonnet::escape($ENV{'form.sort'}); |
|
$Str .= '&SelectedStudent='; |
$Str .= &Apache::lonnet::escape($sname).'">'; |
$Str .= &Apache::lonnet::escape($sname).'">'; |
$Str .= $student->{$field}.' '; |
$Str .= $student->{$field}.' '; |
$Str .= '</a>'; |
$Str .= '</a>'; |
Line 867 sub CreateMainMenu {
|
Line 859 sub CreateMainMenu {
|
# |
# |
$Str .= '<table border="0"><tbody><tr>'."\n"; |
$Str .= '<table border="0"><tbody><tr>'."\n"; |
$Str .= '<td></td>'."\n"; |
$Str .= '<td></td>'."\n"; |
$Str .= '<td></td>'."\n"; |
|
$Str .= '<td align="center"><b>Select a Report</b></td>'."\n"; |
$Str .= '<td align="center"><b>Select a Report</b></td>'."\n"; |
|
$Str .= '<td></td>'."\n"; |
|
$Str .= '<td></td>'."\n"; |
$Str .= '<tr>'."\n"; |
$Str .= '<tr>'."\n"; |
# |
# |
$Str .= '<td align="center">'. |
$Str .= '<td align="center">'. |
'<input type="submit" name="Refresh" value="Update Display" />'. |
'<input type="submit" name="Refresh" value="Update Display" />'. |
"</td>\n"; |
"</td>\n"; |
$Str .= '<td align="center">'. |
|
'<input type="submit" name="ClearCache" value="Clear Caches" />'. |
|
"</td>\n"; |
|
# |
# |
$Str .= '<td align="center">'; |
$Str .= '<td align="center">'; |
$Str .= '<select name="reportSelected" >'."\n"; |
$Str .= '<select name="reportSelected" >'."\n"; |
Line 889 sub CreateMainMenu {
|
Line 879 sub CreateMainMenu {
|
} |
} |
$Str .= '</select></td>'."\n"; |
$Str .= '</select></td>'."\n"; |
# |
# |
|
$Str .= '<td>'.(' 'x30).'</td>'; |
|
$Str .= '<td align="center">'. |
|
'<input type="submit" name="ClearCache" value="Clear Caches" />'. |
|
"</td>\n"; |
$Str .= '</tr></tbody></table>'."\n"; |
$Str .= '</tr></tbody></table>'."\n"; |
$Str .= '<hr>'."\n"; |
$Str .= '<hr>'."\n"; |
# |
# |
Line 940 sub handler {
|
Line 934 sub handler {
|
# Extract form elements from query string |
# Extract form elements from query string |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
['sort','reportSelected', |
['sort','reportSelected', |
'StudentAssessmentStudent']); |
'SelectedStudent']); |
if (! exists($ENV{'form.reportSelected'})) { |
if (! exists($ENV{'form.reportSelected'})) { |
$ENV{'form.reportSelected'} = 'student_assessment'; |
$ENV{'form.reportSelected'} = 'student_assessment'; |
} |
} |