Skip to content

Commit

Permalink
Tracking: Total student into lp report
Browse files Browse the repository at this point in the history
BT#17648 - refs #3461
  • Loading branch information
carlangas159 committed Aug 28, 2020
1 parent aae0ac6 commit 4a0ec89
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main/inc/lib/myspace.lib.php
Expand Up @@ -1130,6 +1130,7 @@ public static function displayResumeLP(
$tableHtml = '';
$tblExtraField = Database::get_main_table(TABLE_EXTRA_FIELD);
$tblExtraFieldValue = Database::get_main_table(TABLE_EXTRA_FIELD_VALUES);
$tblCourse = Database::get_main_table(TABLE_MAIN_COURSE);
$query = "
SELECT
item_id AS lp_id,
Expand All @@ -1150,7 +1151,6 @@ public static function displayResumeLP(
AND (s.value != '' OR s.value IS NOT NULL)
";
$queryResult = Database::query($query);
$tblCourse = TABLE_MAIN_COURSE;
$data = [];
while ($row = Database::fetch_array($queryResult, 'ASSOC')) {
$lp_id = (int) $row['lp_id'];
Expand Down Expand Up @@ -1207,6 +1207,7 @@ public static function displayResumeLP(
$teacherNameTemp = '';
foreach ($data as $teacherName => $reportData) {
$lpCount = 0;
$totalStudent = 0;
foreach ($reportData as $lpName => $row) {
$hiddenField = 'student_show_'.$index;
$hiddenFieldLink = 'student_show_'.$index.'_';
Expand All @@ -1225,6 +1226,7 @@ public static function displayResumeLP(
"<div id='$hiddenField' class='hidden'>";
foreach ($row['studentList'] as $student) {
$table .= $student['complete_name']."<br>";
$totalStudent += 1;
}
$index++;
$lpCount++;
Expand All @@ -1236,7 +1238,7 @@ public static function displayResumeLP(
"<tr>".
"<td></td>".
"<td><strong>".get_lang('LearnpathsTotal')." $lpCount</strong></td>".
"<td></td>".
"<td><strong>$totalStudent</strong></td>".
"<td></td>".
"</tr>";
}
Expand Down

0 comments on commit 4a0ec89

Please sign in to comment.