예제 #1
0
}
$a_profs[0] = '-- ' . get_lang('NoManager') . ' --';
while ($a_titulars = Database::fetch_array($q_result_titulars)) {
    $s_username = $a_titulars['username'];
    $s_lastname = $a_titulars['lastname'];
    $s_firstname = $a_titulars['firstname'];
    if (api_get_person_name($s_firstname, $s_lastname) == $s_tutor) {
        $s_selected_tutor = api_get_person_name($s_firstname, $s_lastname);
    }
    $s_disabled_select_titular = '';
    if (!api_is_course_admin()) {
        $s_disabled_select_titular = 'disabled=disabled';
    }
    $a_profs[api_get_person_name($s_firstname, $s_lastname)] = api_get_person_name($s_lastname, $s_firstname) . ' (' . $s_username . ')';
}
$categories = CourseCategoryManager::getCategoriesCanBeAddedInCourse($_course['categoryCode']);
$linebreak = '<div class="row"><div class="label"></div><div class="formw" style="border-bottom:1px dashed grey"></div></div>';
// Build the form
$form = new FormValidator('update_course', 'post', api_get_self() . '?' . api_get_cidreq());
// COURSE SETTINGS
$form->addElement('html', '<div><h3>' . Display::return_icon('settings.png', Security::remove_XSS(get_lang('CourseSettings')), '', ICON_SIZE_SMALL) . ' ' . Security::remove_XSS(get_lang('CourseSettings')) . '</h3><div>');
$image_html = '';
// Display course picture
$course_path = api_get_path(SYS_COURSE_PATH) . $currentCourseRepository;
// course path
if (file_exists($course_path . '/course-pic85x85.png')) {
    $course_web_path = api_get_path(WEB_COURSE_PATH) . $currentCourseRepository;
    // course web path
    $course_medium_image = $course_web_path . '/course-pic85x85.png?' . rand(1, 1000);
    // redimensioned image 85x85
    $image_html = '<div class="row"><label class="col-md-2 control-label">' . get_lang('Image') . '</label> <div class="col-md-8"><img src="' . $course_medium_image . '" /></div></div>';