/** * @param array $user_data result of api_get_user_info() * @param null $start_date * @param null $duration * @param string $ip Optional. The user IP * @return string */ public function show_exercise_result_header($user_data, $start_date = null, $duration = null, $ip = null) { $array = array(); if (!empty($user_data)) { $array[] = array('title' => get_lang('Name'), 'content' => $user_data['complete_name']); $array[] = array('title' => get_lang('Username'), 'content' => $user_data['username']); if (!empty($user_data['official_code'])) { $array[] = array('title' => get_lang('OfficialCode'), 'content' => $user_data['official_code']); } } // Description can be very long and is generally meant to explain // rules *before* the exam. Leaving here to make display easier if // necessary /* if (!empty($this->description)) { $array[] = array('title' => get_lang("Description"), 'content' => $this->description); } */ if (!empty($start_date)) { $array[] = array('title' => get_lang('StartDate'), 'content' => $start_date); } if (!empty($duration)) { $array[] = array('title' => get_lang('Duration'), 'content' => $duration); } if (!empty($ip)) { $array[] = array('title' => get_lang('IP'), 'content' => $ip); } $html = '<div class="question-result">'; $html .= Display::page_header(Display::return_icon('test-quiz.png', get_lang('Result'), null, ICON_SIZE_MEDIUM) . ' ' . $this->exercise . ' : ' . get_lang('Result')); $html .= Display::description($array); $html .= "</div>"; return $html; }
/** * @param array $user_data result of api_get_user_info() * @param null $start_date * @param null $duration * @return string */ public function show_exercise_result_header($user_data, $start_date = null, $duration = null) { $array = array(); if (!empty($user_data)) { $array[] = array('title' => get_lang("Name"), 'content' => $user_data['complete_name']); $array[] = array('title' => get_lang("Username"), 'content' => $user_data['username']); if (!empty($user_data['official_code'])) { $array[] = array('title' => get_lang("OfficialCode"), 'content' => $user_data['official_code']); } } // Description can be very long and is generally meant to explain // rules *before* the exam. Leaving here to make display easier if // necessary /* if (!empty($this->description)) { $array[] = array('title' => get_lang("Description"), 'content' => $this->description); } */ if (!empty($start_date)) { $array[] = array('title' => get_lang("StartDate"), 'content' => $start_date); } if (!empty($duration)) { $array[] = array('title' => get_lang("Duration"), 'content' => $duration); } $html = Display::page_header(Display::return_icon('quiz_big.png', get_lang('Result')) . ' ' . $this->exercise . ' : ' . get_lang('Result')); $html .= Display::description($array); return $html; }
$table_user = Database::get_main_table(TABLE_MAIN_USER); $sql = "UPDATE {$table_user} SET picture_uri = '{$new_picture}' WHERE user_id = " . api_get_user_id(); $result = Database::query($sql); } } } } $user_info = UserManager::get_user_info_by_id(api_get_user_id()); $social_left_content = SocialManager::show_social_menu('home'); $usergroup = new UserGroup(); $social_right_content = '<div class="span5">'; $social_right_content .= '<div class="well_border">'; $social_right_content .= '<h3>' . get_lang('ContactInformation') . '</h3>'; $list = array(array('title' => get_lang('Name'), 'content' => api_get_person_name($user_info['firstname'], $user_info['lastname'])), array('title' => get_lang('Email'), 'content' => $user_info['email'])); // Current user information $social_right_content .= '<div>' . Display::description($list) . '</div>'; $social_right_content .= ' <div class="form-actions"> <a class="btn" href="' . api_get_path(WEB_PATH) . 'main/auth/profile.php"> ' . get_lang('EditProfile') . ' </a> </div> </div>'; if (api_get_setting('allow_skills_tool') == 'true') { $social_right_content .= '<div class="well_border">'; $skill = new Skill(); $ranking = $skill->get_user_skill_ranking(api_get_user_id()); $url = api_get_path(WEB_CODE_PATH) . 'social/skills_ranking.php'; $ranking_url = Display::url(sprintf(get_lang('YourSkillRankingX'), $ranking), $url, array('class' => 'btn')); $skills = $skill->get_user_skills(api_get_user_id(), true); $social_right_content .= '<h3>' . get_lang('Skills') . '</h3>';
$socialRightContent = '<div class="span5">'; $socialRightContent .= '<div class="well_border">'; $socialRightContent .= '<h3>' . get_lang('ContactInformation') . '</h3>'; $list = array( array( 'title' => get_lang('Name'), 'content' => api_get_person_name( $user_info['firstname'], $user_info['lastname'] ) ), array('title' => get_lang('Email'), 'content' => $user_info['email']), ); // information current user $socialRightContent .= '<div>' . Display::description($list) . '</div>'; $editProfileUrl = api_get_path(WEB_CODE_PATH) . 'auth/profile.php'; if (api_get_setting('sso_authentication') === 'true') { $subSSOClass = api_get_setting('sso_authentication_subclass'); $objSSO = null; if (!empty($subSSOClass)) { require_once api_get_path(SYS_CODE_PATH) . 'auth/sso/sso.' . $subSSOClass . '.class.php'; $subSSOClass = 'sso' . $subSSOClass; $objSSO = new $subSSOClass(); } else { $objSSO = new sso(); }