version 1.52, 2008/12/12 05:52:26
|
version 1.59, 2010/04/12 16:28:22
|
Line 225 sub prepare_html_output {
|
Line 225 sub prepare_html_output {
|
my @extra_resp_headers = &get_extra_response_headers(); |
my @extra_resp_headers = &get_extra_response_headers(); |
# |
# |
# Create the table header |
# Create the table header |
my @student_columns = ('username','domain','id','section'); |
my @student_columns = @Apache::lonstatistics::SelectedStudentData; |
|
foreach (@student_columns) { |
|
if($_ eq 'all') { |
|
@student_columns = ('fullname','username','domain','id','section','status','groups','comments'); |
|
} |
|
} |
# |
# |
my %headers; |
my %headers; |
my $student_column_count = scalar(@student_columns); |
my $student_column_count = scalar(@student_columns); |
Line 285 sub prepare_html_output {
|
Line 290 sub prepare_html_output {
|
$headers{'part'} .= qq{<th colspan="$part_span">$tmpname</th>}; |
$headers{'part'} .= qq{<th colspan="$part_span">$tmpname</th>}; |
$nonempty_part_headers = 1; |
$nonempty_part_headers = 1; |
} else { |
} else { |
$headers{'part'} .= qq{<th colspan="$part_span"> </th>}; |
$headers{'part'} .= qq{<th colspan="$part_span"> </th>}; |
} |
} |
$prob_span += $part_span; |
$prob_span += $part_span; |
} |
} |
Line 326 sub prepare_html_output {
|
Line 331 sub prepare_html_output {
|
} |
} |
last if ($c->aborted()); |
last if ($c->aborted()); |
foreach my $field (@student_columns) { |
foreach my $field (@student_columns) { |
$student_row_data .= |
$student_row_data .= '<td valign="top">'; |
'<td valign="top">'.$student->{$field}.'</td>'; |
# handle comments like in lonstudentassessment.pm |
|
if($field eq 'comments') { |
|
$student_row_data .= |
|
'<a href="/adm/'.$student->{'domain'}.'/'. |
|
$student->{'username'}.'/'.'aboutme#coursecomment">'.&mt('Comments').'</a>'; |
|
} else { |
|
$student_row_data .= $student->{$field}; |
|
} |
|
$student_row_data .= '</td>'; |
} |
} |
# |
# |
# Figure out what it is we need to output for this student |
# Figure out what it is we need to output for this student |
Line 444 sub prepare_html_output {
|
Line 457 sub prepare_html_output {
|
undef(@essays); |
undef(@essays); |
} |
} |
} # end of student loop |
} # end of student loop |
|
$r->print('</table>'.$/); |
return; |
return; |
} |
} |
|
|
Line 931 sub prepare_csv_output {
|
Line 945 sub prepare_csv_output {
|
time.'_'.rand(1000000000).'.csv'; |
time.'_'.rand(1000000000).'.csv'; |
unless ($outputfile = Apache::File->new('>/home/httpd'.$filename)) { |
unless ($outputfile = Apache::File->new('>/home/httpd'.$filename)) { |
$r->log_error("Couldn't open $filename for output $!"); |
$r->log_error("Couldn't open $filename for output $!"); |
$r->print('<div class="LC_error">' |
$r->print( |
.&mt('Problems occurred in writing the CSV file. ' |
'<p class="LC_error">' |
.'This error has been logged. ' |
.&mt('Problems occurred in writing the CSV file.') |
.'Please alert your LON-CAPA administrator.') |
.' '.&mt('This error has been logged.') |
.'</div>'); |
.' '.&mt('Please alert your LON-CAPA administrator.') |
|
.'</p>' |
|
); |
$outputfile = undef; |
$outputfile = undef; |
} |
} |
# |
# |
Line 1081 sub CreateInterface {
|
Line 1097 sub CreateInterface {
|
foreach ('HTML','Excel','CSV') { |
foreach ('HTML','Excel','CSV') { |
$output_selector .= ' <option value="'.lc($_).'"'; |
$output_selector .= ' <option value="'.lc($_).'"'; |
if ($env{'form.output'} eq lc($_)) { |
if ($env{'form.output'} eq lc($_)) { |
$output_selector .= ' selected '; |
$output_selector .= ' selected="selected"'; |
} |
} |
$output_selector .='>'.&mt($_).'</option>'.$/; |
$output_selector .='>'.&mt($_).'</option>'.$/; |
} |
} |
Line 1090 sub CreateInterface {
|
Line 1106 sub CreateInterface {
|
## Environment variable initialization |
## Environment variable initialization |
my $Str = ''; |
my $Str = ''; |
$Str .= &Apache::lonhtmlcommon::breadcrumbs('Student Submission Reports'); |
$Str .= &Apache::lonhtmlcommon::breadcrumbs('Student Submission Reports'); |
$Str .= '<p>'; |
$Str .= '<br />'; |
$Str .= &Apache::loncommon::start_data_table(); |
$Str .= &Apache::loncommon::start_data_table(); |
$Str .= &Apache::loncommon::start_data_table_header_row(); |
$Str .= &Apache::loncommon::start_data_table_header_row(); |
$Str .= '<th>'.&mt('Sections').'</th>'; |
$Str .= '<th>'.&mt('Sections').'</th>'; |
$Str .= '<th>'.&mt('Groups').'</th>'; |
$Str .= '<th>'.&mt('Groups').'</th>'; |
|
$Str .= '<th>'.&mt('Student Data').&Apache::loncommon::help_open_topic("Chart_Student_Data").'</th>'; |
$Str .= '<th>'.&mt('Access Status').'</th>'; |
$Str .= '<th>'.&mt('Access Status').'</th>'; |
# $Str .= '<th>'.&mt('Output as [_1]',$output_selector).'</th>'; |
|
$Str .= '<th>'.&mt('Options').'</th>'; |
$Str .= '<th>'.&mt('Options').'</th>'; |
$Str .= '<th>'.&mt('Output Format').'</th>'; |
$Str .= '<th>'.&mt('Output Format').'</th>'; |
$Str .= &Apache::loncommon::end_data_table_header_row(); |
$Str .= &Apache::loncommon::end_data_table_header_row(); |
Line 1110 sub CreateInterface {
|
Line 1126 sub CreateInterface {
|
$Str .= &Apache::lonstatistics::GroupSelect('Group','multiple',5); |
$Str .= &Apache::lonstatistics::GroupSelect('Group','multiple',5); |
$Str .= '</td>'; |
$Str .= '</td>'; |
# |
# |
|
$Str .= '<td align="center">'."\n"; |
|
$Str .= &Apache::lonstatistics::StudentDataSelect('StudentData','multiple', 5,undef); |
|
$Str .= '</td>'; |
|
# |
$Str .= '<td align="center">'; |
$Str .= '<td align="center">'; |
$Str .= &Apache::lonhtmlcommon::StatusOptions(undef,undef,5); |
$Str .= &Apache::lonhtmlcommon::StatusOptions(undef,undef,5); |
$Str .= '</td>'; |
$Str .= '</td>'; |
Line 1144 sub CreateInterface {
|
Line 1164 sub CreateInterface {
|
} |
} |
$prob_status_checkbox .= 'value="true" />'; |
$prob_status_checkbox .= 'value="true" />'; |
# |
# |
$Str .= '<td align="right" valign="top">'. |
$Str .= |
'<label><b>'. |
'<td valign="top">' |
&mt('Show problem [_1]',$prob_checkbox).'</b></label><br />'. |
.'<label>' |
'<label><b>'. |
.$prob_checkbox.&mt('Show problem') |
&mt('Show correct answers [_1]',$ans_checkbox).'</b></label><br />'. |
.'</label><br />' |
'<label><b>'. |
.'<label>' |
&mt('Show all submissions [_1]',$all_sub_checkbox). |
.' '.$ans_checkbox.&mt('Show correct answers') |
'</b></label><br />'. |
.'</label><br />' |
'<label><b>'. |
.'<label>' |
&mt('Show problem grading [_1]',$prob_status_checkbox). |
.$all_sub_checkbox.&mt('Show all submissions') |
'</b></label><br />'. |
.'</label><br />' |
'</td>'; |
.'<label>' |
|
.$prob_status_checkbox.&mt('Show problem grading') |
|
.'</label>' |
|
.'</td>'; |
# |
# |
$Str .= '<td align="center" valign="top">'.$output_selector.'</td>'; |
$Str .= '<td align="center" valign="top">'.$output_selector.'</td>'; |
# |
# |
Line 1167 sub CreateInterface {
|
Line 1190 sub CreateInterface {
|
'<input type="text" name="stats_status"' |
'<input type="text" name="stats_status"' |
.' size="60" value="" readonly="readonly" />') |
.' size="60" value="" readonly="readonly" />') |
.'</span></p>'; |
.'</span></p>'; |
$Str .= '</p>'; |
|
## |
## |
return $Str; |
return $Str; |
} |
} |