version 1.6, 2006/06/01 19:21:22
|
version 1.14, 2014/02/26 16:01:56
|
Line 69 sub build_grading_analysis_page {
|
Line 69 sub build_grading_analysis_page {
|
my @students = @Apache::lonstatistics::Students; |
my @students = @Apache::lonstatistics::Students; |
# |
# |
if (@students < 1 && exists($env{'form.firstrun'})) { |
if (@students < 1 && exists($env{'form.firstrun'})) { |
$r->print('<h2>There are no students in the sections/groups selected</h2>'); |
$r->print( |
|
'<p class="LC_info">' |
|
.&mt('There are no students in the sections/groups selected.') |
|
.'</p>'); |
} |
} |
# |
# |
#my @cache_button_HTML = |
#my @cache_button_HTML = |
Line 120 sub build_grading_analysis_page {
|
Line 123 sub build_grading_analysis_page {
|
$env{'form.problemchoice'}.'" />'); |
$env{'form.problemchoice'}.'" />'); |
# |
# |
if (! defined($current_problem->{'resource'})) { |
if (! defined($current_problem->{'resource'})) { |
$r->print('resource is undefined'); |
$r->print('<p class="LC_error">'.&mt('resource is undefined').'</p>'); |
} else { |
} else { |
my $resource = $current_problem->{'resource'}; |
my $resource = $current_problem->{'resource'}; |
$r->print('<h1>'.$resource->compTitle.'</h1>'); |
$r->print('<h1>'.$resource->compTitle.'</h1>'); |
Line 130 sub build_grading_analysis_page {
|
Line 133 sub build_grading_analysis_page {
|
if ($resource->is_task()) { |
if ($resource->is_task()) { |
&task_analysis($r,$resource,\@students); |
&task_analysis($r,$resource,\@students); |
} else { |
} else { |
$r->print('<h2>Analysis of '.$resource->src().' is not supported</h2>'); |
$r->print( |
|
'<p class="LC_warning">' |
|
.&mt('Analysis of [_1] is not supported.',$resource->src()) |
|
.'</p>'); |
} |
} |
} |
} |
$r->print('<hr />'); |
$r->print('<hr />'); |
Line 149 sub build_grading_analysis_page {
|
Line 155 sub build_grading_analysis_page {
|
|
|
sub task_analysis { |
sub task_analysis { |
my ($r,$problem,$students) = @_; |
my ($r,$problem,$students) = @_; |
my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin |
my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin($r,scalar(@$students)); |
($r,'Student Answer Compilation Status', |
|
'Student Answer Compilation Progress', scalar(@$students), |
|
'inline',undef,'Statistics','stats_status'); |
|
my %graders; |
my %graders; |
foreach my $student (@$students) { |
foreach my $student (@$students) { |
my $sname = $student->{'username'}; |
my $sname = $student->{'username'}; |
Line 176 sub task_analysis {
|
Line 179 sub task_analysis {
|
} |
} |
|
|
&Apache::lonhtmlcommon::Increment_PrgWin($r,\%prog_state, |
&Apache::lonhtmlcommon::Increment_PrgWin($r,\%prog_state, |
&mt('last student')); |
'last student'); |
|
|
} |
} |
|
|
Line 197 sub task_analysis {
|
Line 200 sub task_analysis {
|
} |
} |
close($outputfile); |
close($outputfile); |
$r->print('<br />'. |
$r->print('<br />'. |
'<a href="'.$filename.'">'.&mt('Your csv file.')."</a>\n"); |
'<a href="'.$filename.'">'.&mt('Your CSV file.')."</a>\n"); |
} elsif ($env{'form.output'} eq 'excel') { |
} elsif ($env{'form.output'} eq 'excel') { |
my ($excel_workbook,$excel_sheet,$filename,$format,$rows_output) = |
my ($excel_workbook,$excel_sheet,$filename,$format,$rows_output) = |
&init_excel_output($r); |
&init_excel_output($r); |
Line 218 sub task_analysis {
|
Line 221 sub task_analysis {
|
} else { |
} else { |
$r->print(&Apache::loncommon::start_data_table()); |
$r->print(&Apache::loncommon::start_data_table()); |
$r->print(&Apache::loncommon::start_data_table_header_row(). |
$r->print(&Apache::loncommon::start_data_table_header_row(). |
'<th>Name (username)</th><th>Grades Assigned</th>'. |
'<th>'.&mt('Name (username)').'</th><th>'.&mt('Grades Assigned').'</th>'. |
&Apache::loncommon::end_data_table_header_row() ); |
&Apache::loncommon::end_data_table_header_row() ); |
foreach my $line (@output) { |
foreach my $line (@output) { |
$r->print(&Apache::loncommon::start_data_table_row(). |
$r->print(&Apache::loncommon::start_data_table_row(). |
Line 274 sub init_excel_output {
|
Line 277 sub init_excel_output {
|
$format->{'h3'}); |
$format->{'h3'}); |
|
|
$excel_sheet->write($header_row,$cols_output++, |
$excel_sheet->write($header_row,$cols_output++, |
'Compiled on '.localtime(time),$format->{'h3'}); |
&mt('Compiled on [_1]',&Apache::lonlocal::locallocaltime(time)), |
|
$format->{'h3'}); |
$cols_output = 0; |
$cols_output = 0; |
foreach my $field ('Grader Name','Username','Grades Assigned') { |
foreach my $field ('Grader Name','Username','Grades Assigned') { |
$excel_sheet->write($description_row,$cols_output++,$field, |
$excel_sheet->write($description_row,$cols_output++,&mt($field), |
$format->{'bold'}); |
$format->{'bold'}); |
} |
} |
return ($excel_workbook,$excel_sheet,$filename,$format,$rows_output); |
return ($excel_workbook,$excel_sheet,$filename,$format,$rows_output); |
Line 297 sub create_interface {
|
Line 301 sub create_interface {
|
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 309 sub create_interface {
|
Line 313 sub create_interface {
|
$str .= '<tr>'; |
$str .= '<tr>'; |
$str .= '<td align="center"><b>'.&mt('Sections').'</b></td>'; |
$str .= '<td align="center"><b>'.&mt('Sections').'</b></td>'; |
$str .= '<td align="center"><b>'.&mt('Groups').'</b></td>'; |
$str .= '<td align="center"><b>'.&mt('Groups').'</b></td>'; |
$str .= '<td align="center"><b>'.&mt('Enrollment Status').'</b></td>'; |
$str .= '<td align="center"><b>'.&mt('Access Status').'</b></td>'; |
$str .= '<td>'.&mt('<b>Output as</b> [_1]',$output_selector).'</td>'; |
$str .= '<td>'.&mt('[_1]Output as[_2] [_3]','<b>',$output_selector,'</b>').'</td>'; |
$str .= '</tr>'."\n"; |
$str .= '</tr>'."\n"; |
## |
## |
## |
## |
Line 327 sub create_interface {
|
Line 331 sub create_interface {
|
$str .= '</td>'; |
$str .= '</td>'; |
# |
# |
$str .= '<td>'; |
$str .= '<td>'; |
## |
|
$str .= '<nobr><label>'.&mt('Status: [_1]', |
|
'<input type="text" '. |
|
'name="stats_status" size="60" value="" />' |
|
). |
|
'</label></nobr>'; |
|
$str .= '</td>'; |
$str .= '</td>'; |
## |
## |
## |
## |