|
@@ -665,6 +665,8 @@ $userGroups = $userGroupManager->getNameListByUser(
|
|
|
<tr>
|
|
|
<td><?php echo get_lang('OnLine'); ?></td>
|
|
|
<td><?php echo $online; ?></td>
|
|
|
+
|
|
|
+
|
|
|
</tr>
|
|
|
<?php
|
|
|
if (!empty($course_code)) {
|
|
@@ -690,6 +692,118 @@ $userGroups = $userGroupManager->getNameListByUser(
|
|
|
</tr>
|
|
|
<?php
|
|
|
}
|
|
|
+
|
|
|
+ // Ofaj
|
|
|
+ $bossList = Usermanager::getStudentBossList($student_id);
|
|
|
+ echo '<tr><td>';
|
|
|
+ echo get_lang('StudentBoss').' : ';
|
|
|
+ foreach ($bossList as $boss) {
|
|
|
+ $bossInfo = api_get_user_info($boss['boss_id']);
|
|
|
+ if ($bossInfo) {
|
|
|
+ echo $bossInfo['complete_name_with_username'].'<br />';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ echo '</td></tr>';
|
|
|
+
|
|
|
+ echo '<tr><td>';
|
|
|
+ echo get_lang('Language').' : ';
|
|
|
+ $languageId = api_get_language_id($user_info['language']);
|
|
|
+ if ($languageId) {
|
|
|
+ $languageInfo = api_get_language_info($languageId);
|
|
|
+ echo $languageInfo['original_name'];
|
|
|
+ }
|
|
|
+ echo '</td></tr>';
|
|
|
+
|
|
|
+ $startDate = UserManager::get_extra_user_data_by_field(
|
|
|
+ $user_info['user_id'],
|
|
|
+ 'datedebutstage'
|
|
|
+ );
|
|
|
+
|
|
|
+ $endDate = UserManager::get_extra_user_data_by_field(
|
|
|
+ $user_info['user_id'],
|
|
|
+ 'datefinstage'
|
|
|
+ );
|
|
|
+
|
|
|
+ $extraField = new ExtraField('user');
|
|
|
+ $extraFieldInfoStart = $extraField->get_handler_field_info_by_field_variable(
|
|
|
+ 'datedebutstage'
|
|
|
+ );
|
|
|
+
|
|
|
+ $extraFieldInfoEnd = $extraField->get_handler_field_info_by_field_variable(
|
|
|
+ 'datefinstage'
|
|
|
+ );
|
|
|
+
|
|
|
+ echo '<tr><td>';
|
|
|
+ echo $extraFieldInfoStart['display_text'].' : ';
|
|
|
+ if (isset($startDate['datedebutstage'])) {
|
|
|
+ echo $startDate['datedebutstage'];
|
|
|
+ }
|
|
|
+ echo '</td></tr>';
|
|
|
+
|
|
|
+ echo '<tr><td>';
|
|
|
+ echo $extraFieldInfoEnd['display_text'].' : ';
|
|
|
+ if (isset($endDate['datefinstage'])) {
|
|
|
+ echo $endDate['datefinstage'];
|
|
|
+ }
|
|
|
+ echo '</td></tr>';
|
|
|
+
|
|
|
+ /** @var ExtraFieldSavedSearch $saved */
|
|
|
+ $search = [
|
|
|
+ 'user' => $student_id,
|
|
|
+ ];
|
|
|
+
|
|
|
+ $items = $em->getRepository('ChamiloCoreBundle:ExtraFieldSavedSearch')->findBy($search);
|
|
|
+ $listVariables = [
|
|
|
+ 'ecouter',
|
|
|
+ 'lire',
|
|
|
+ 'ecrire',
|
|
|
+ 's_exprimer_oralement_en_continu',
|
|
|
+ 'participer_a_une_conversation',
|
|
|
+ ];
|
|
|
+
|
|
|
+ $extraField = new ExtraField('session');
|
|
|
+
|
|
|
+ if ($items) {
|
|
|
+ /** @var ExtraFieldSavedSearch $item */
|
|
|
+ foreach ($items as $item) {
|
|
|
+ $variable = $item->getField()->getVariable();
|
|
|
+ if (in_array($variable, $listVariables)) {
|
|
|
+ $extraFieldInfo = $extraField->get_handler_field_info_by_field_variable($variable);
|
|
|
+ if ($extraFieldInfo) {
|
|
|
+ echo '<tr><td>';
|
|
|
+ $options = $extraFieldInfo['options'];
|
|
|
+ $optionValues = array_column($options, 'display_text', 'option_value');
|
|
|
+ //var_dump($optionValues);
|
|
|
+ echo $extraFieldInfo['display_text'].' : ';
|
|
|
+ $answers = $item->getValue();
|
|
|
+ $list = [];
|
|
|
+ if (is_array($answers)) {
|
|
|
+ foreach ($answers as $answer) {
|
|
|
+ $list[] = $optionValues[$answer];
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ foreach ($options as $option) {
|
|
|
+ $answers = trim($answers, '.');
|
|
|
+ $answers = str_replace('-', '_', $answers);
|
|
|
+
|
|
|
+ if ($option['option_value'] != api_underscore_to_camel_case($answers)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ $list[] = $option['display_text'];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ echo '<ul><li>';
|
|
|
+ echo implode('</li><li>', $list);
|
|
|
+ echo '</li></ul>';
|
|
|
+
|
|
|
+ echo '</td></tr>';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
// Display timezone if the user selected one and if the admin allows the use of user's timezone
|
|
|
$timezone = null;
|
|
|
$timezone_user = UserManager::get_extra_user_data_by_field(
|
|
@@ -800,6 +914,18 @@ $userGroups = $userGroupManager->getNameListByUser(
|
|
|
echo '</td></tr>';
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ $icon = ' '.Display::url(
|
|
|
+ get_lang('Generate'),
|
|
|
+ api_get_self().'?action=generate_certificate&student='.$student_id.'&cidReq='.$course_code.'&course='.$course_code,
|
|
|
+ ['class' => 'btn btn-primary btn-xs']
|
|
|
+ );
|
|
|
+
|
|
|
+ echo '<tr>
|
|
|
+ <td align="right">';
|
|
|
+ echo get_lang('Certificate').' </td> <td align="left">'.$icon;
|
|
|
+ echo '</td></tr>';
|
|
|
+
|
|
|
?>
|
|
|
</tbody>
|
|
|
</table>
|