WIP: Extra Fields: Informes específicos por entidad y por autor

Show / hide student list
BT#17648
-
refs
#3461
pull/3462/head
carlos alvarado 5 years ago
parent f4156354a7
commit 760be693b1
  1. 28
      main/inc/lib/myspace.lib.php

@ -1341,17 +1341,20 @@ class MySpace
//icons for show and hode //icons for show and hode
$iconAdd = Display::return_icon('add.png', get_lang('ShowOrHide'), '', ICON_SIZE_SMALL); $iconAdd = Display::return_icon('add.png', get_lang('ShowOrHide'), '', ICON_SIZE_SMALL);
$iconRemove = Display::return_icon('error.png', get_lang('howOrHide'), '', ICON_SIZE_SMALL); $iconRemove = Display::return_icon('error.png', get_lang('howOrHide'), '', ICON_SIZE_SMALL);
$teacherNameTemp = '';
foreach ($data as $teacherName => $reportData) { foreach ($data as $teacherName => $reportData) {
foreach ($reportData as $lpName => $row) {
$listLp = $reportData;
$table .= "<tr>".
"<td>$teacherName</td>";
foreach ($listLp as $lpName => $row) {
$hiddenField = 'student_show_'.$index; $hiddenField = 'student_show_'.$index;
$hiddenFieldS = 'student_show_'.$index.'_'; $hiddenFieldLink = 'student_show_'.$index.'_';
$table .= "<td>$lpName</td>". $printTeacherName = ($teacherName == $teacherNameTemp) ? '' : $teacherName;
"<td>".$row['students']."</td><td>". $teacherNameTemp = $teacherName;
"<a href='#$hiddenField' id='$hiddenFieldS' onclick='showHideStudent(\"$hiddenField\")'>". $table .=
"<tr>".
"<td>$printTeacherName</td>".
"<td>$lpName</td>".
"<td>".$row['students']."</td>".
"<td>".
"<a href='#!' id='$hiddenFieldLink' onclick='showHideStudent(\"$hiddenField\")'>".
"<div class='icon_add'>$iconAdd</div>". "<div class='icon_add'>$iconAdd</div>".
"<div class='icon_remove hidden'>$iconRemove</div>". "<div class='icon_remove hidden'>$iconRemove</div>".
"</a>". "</a>".
@ -1360,10 +1363,11 @@ class MySpace
$table .= $student['complete_name']."<br>"; $table .= $student['complete_name']."<br>";
} }
$index += 1; $index += 1;
$table .= "</div>"; $table .= "</div>".
"</td>".
"</tr>";
} }
$table .= "</td>". $table .= "";
"</tr>";
} }
$table .= "</tbody>". $table .= "</tbody>".
"</table>". "</table>".

Loading…
Cancel
Save