Fixing CSV report see BT#8490

1.9.x
Julio Montoya 11 years ago
parent 28864e64a2
commit 1759dab8cb
  1. 78
      main/mySpace/myStudents.php

@ -868,12 +868,13 @@ if (empty($_GET['details'])) {
</tr> </tr>
<?php <?php
$csv_content[] = array (); $csv_content[] = array();
$csv_content[] = array ( $csv_content[] = array(
get_lang('Exercices'), get_lang('Exercices'),
get_lang('Score'), get_lang('LearningPath'),
get_lang('Attempts') get_lang('AvgCourseScore'),
); get_lang('Attempts')
);
$t_quiz = Database :: get_course_table(TABLE_QUIZ_TEST); $t_quiz = Database :: get_course_table(TABLE_QUIZ_TEST);
$sql_exercices = "SELECT quiz.title, id FROM " . $t_quiz . " AS quiz $sql_exercices = "SELECT quiz.title, id FROM " . $t_quiz . " AS quiz
@ -898,11 +899,6 @@ if (empty($_GET['details'])) {
$lp_name = '-'; $lp_name = '-';
} }
$lp_name = !empty($lp_name) ? $lp_name : get_lang('NoLearnpath'); $lp_name = !empty($lp_name) ? $lp_name : get_lang('NoLearnpath');
$csv_content[] = array (
$exercices['title'],
$score_percentage . '%',
$count_attempts
);
if ($i % 2) { if ($i % 2) {
$css_class = 'row_odd'; $css_class = 'row_odd';
@ -956,6 +952,14 @@ if (empty($_GET['details'])) {
$data_exercices[$i][] = $exercices['title']; $data_exercices[$i][] = $exercices['title'];
$data_exercices[$i][] = $score_percentage . '%'; $data_exercices[$i][] = $score_percentage . '%';
$data_exercices[$i][] = $count_attempts; $data_exercices[$i][] = $count_attempts;
$csv_content[] = array (
$exercices['title'],
$lp_name,
$score_percentage,
$count_attempts
);
$i++; $i++;
} }
@ -1020,30 +1024,34 @@ if (empty($_GET['details'])) {
$documents = Tracking::count_student_downloaded_documents($student_id, $course_code, $session_id); $documents = Tracking::count_student_downloaded_documents($student_id, $course_code, $session_id);
$uploaded_documents = Tracking::count_student_uploaded_documents($student_id, $course_code, $session_id); $uploaded_documents = Tracking::count_student_uploaded_documents($student_id, $course_code, $session_id);
$csv_content[] = array ( $csv_content[] = array(
get_lang('Student_publication'), get_lang('OtherTools')
$nb_assignments );
);
$csv_content[] = array ( $csv_content[] = array(
get_lang('Messages'), get_lang('Student_publication'),
$messages $nb_assignments
); );
$csv_content[] = array ( $csv_content[] = array(
get_lang('LinksDetails'), get_lang('Messages'),
$links $messages
); );
$csv_content[] = array ( $csv_content[] = array(
get_lang('DocumentsDetails'), get_lang('LinksDetails'),
$documents $links
); );
$csv_content[] = array ( $csv_content[] = array(
get_lang('UploadedDocuments'), get_lang('DocumentsDetails'),
$uploaded_documents $documents
); );
$csv_content[] = array ( $csv_content[] = array(
get_lang('ChatLastConnection'), get_lang('UploadedDocuments'),
$chat_last_connection $uploaded_documents
); );
$csv_content[] = array(
get_lang('ChatLastConnection'),
$chat_last_connection
);
?> ?>
<tr> <tr>
<th colspan="2"><?php echo get_lang('OtherTools'); ?></th> <th colspan="2"><?php echo get_lang('OtherTools'); ?></th>

Loading…
Cancel
Save