Minor - format code

pull/2539/head
jmontoyaa 8 years ago
parent 91b3f7ac50
commit aa0a4ab43e
  1. 2
      main/admin/statistics/index.php
  2. 4
      main/course_home/2column.php
  3. 6
      main/course_home/3column.php
  4. 2
      main/course_home/activity.php
  5. 8
      main/course_home/course_home.php
  6. 2
      main/course_home/vertical_activity.php
  7. 2
      main/course_info/maintenance_coach.php
  8. 1
      main/course_progress/index.php
  9. 4
      main/course_progress/layout.php
  10. 1
      main/course_progress/thematic.php
  11. 9
      main/coursecopy/copy_course_session.php
  12. 2
      main/exercise/exercise.php
  13. 1
      main/inc/lib/formvalidator/FormValidator.class.php

@ -124,7 +124,7 @@ switch ($report) {
[
'name' => 'url',
'index' => 'url',
'width' => '180',
'width' => '120',
'align' => 'left',
],
[

@ -86,11 +86,8 @@ if (api_is_allowed_to_edit(null, true) && !api_is_coach()) {
$content .= get_lang('CourseAdminOnly');
$content .= "</span>";
$content .= "<table width=\"100%\">";
$content .= CourseHome::show_tool_2column(TOOL_COURSE_ADMIN);
/* INACTIVE TOOLS - HIDDEN (GREY) LINKS */
$content .= "<tr><td colspan=\"4\"><hr style='color:\"#4171B5\"' noshade=\"noshade\" size=\"1\" /></td></tr>\n".
"<tr>\n".
"<td colspan=\"4\">\n".
@ -104,7 +101,6 @@ if (api_is_allowed_to_edit(null, true) && !api_is_coach()) {
}
/* Tools for platform admin only */
if (api_is_platform_admin() && api_is_allowed_to_edit(null, true) && !api_is_coach()) {
$content .= '<div class="platformadminview">
<span class="viewcaption">'.get_lang('PlatformAdminOnly').'</span>

@ -58,7 +58,11 @@ if (api_is_allowed_to_edit(null, true)) {
$sql = "SELECT * FROM $TBL_ACCUEIL WHERE c_id = $course_id AND id=$id";
$result = Database::query($sql);
$tool = Database::fetch_array($result);
$tool_name = @htmlspecialchars($tool['name'] != '' ? $tool['name'] : $tool['link'], ENT_QUOTES, api_get_system_encoding());
$tool_name = @htmlspecialchars(
$tool['name'] != '' ? $tool['name'] : $tool['link'],
ENT_QUOTES,
api_get_system_encoding()
);
if ($tool['img'] != 'external.gif') {
$tool['link'] = api_get_path(WEB_CODE_PATH).$tool['link'];
}

@ -135,7 +135,6 @@ if ($session_id === 0 && api_is_course_admin() && api_is_allowed_to_edit(null, t
}
} else {
$tools = CourseHome::get_tools_category(TOOL_STUDENT_VIEW);
$isDrhOfCourse = CourseManager::isUserSubscribedInCourseAsDrh(
api_get_user_id(),
api_get_course_info()
@ -174,7 +173,6 @@ if ($session_id === 0 && api_is_course_admin() && api_is_allowed_to_edit(null, t
if ($isDrhOfCourse) {
$drhTool = CourseHome::get_tools_category(TOOL_DRH);
$blocks[] = ['content' => CourseHome::show_tools_category($drhTool)];
}
}

@ -39,17 +39,15 @@ $(document).ready(function(){
$(".btn-show-thematic").show(); //show using class
$("#pross").fadeToggle(); //Not working collapse for Chrome
});
$("#thematic-hide").click(function(){
$(".btn-show-thematic").hide(); //show using class
$(".btn-hide-thematic").show();
$("#pross").fadeToggle(); //Not working collapse for Chrome
});
});
$(document).ready(function() {
$(".make_visible_and_invisible").attr("href", "javascript:void(0);");
$(".make_visible_and_invisible > img").click(function () {
make_visible = "visible.gif";
make_invisible = "invisible.gif";
path_name = $(this).attr("src");
@ -172,7 +170,6 @@ if (!isset($coursesAlreadyVisited[$course_code])) {
$autoLaunchWarning = '';
$showAutoLaunchLpWarning = false;
$course_id = api_get_course_int_id();
$lpAutoLaunch = api_get_course_setting('enable_lp_auto_launch');
$session_id = api_get_session_id();
if (!empty($lpAutoLaunch)) {
@ -307,8 +304,6 @@ $tool_table = Database::get_course_table(TABLE_TOOL_LIST);
$temps = time();
$reqdate = "&reqdate=$temps";
/* MAIN CODE */
/* Introduction section (editable by course admins) */
$content = Display::return_introduction_section(
TOOL_COURSE_HOMEPAGE,
@ -322,7 +317,6 @@ $content = Display::return_introduction_section(
/* SWITCH TO A DIFFERENT HOMEPAGE VIEW
the setting homepage_view is adjustable through
the platform administration section */
if (!empty($autoLaunchWarning)) {
$show_message .= Display::return_message(
$autoLaunchWarning,

@ -71,14 +71,12 @@ if (api_is_allowed_to_edit(null, true) && !api_is_coach()) {
}
$my_list = CourseHome::get_tools_category(TOOL_AUTHORING);
$blocks[] = [
'title' => get_lang('Authoring'),
'content' => CourseHome::show_tools_category($my_list),
];
$my_list = CourseHome::get_tools_category(TOOL_INTERACTION);
$blocks[] = [
'title' => get_lang('Interaction'),
'content' => CourseHome::show_tools_category($my_list),

@ -23,7 +23,7 @@ if ($sessionsCopy !== 'true') {
api_not_allowed(true);
}
Display :: display_header($nameTools);
Display::display_header($nameTools);
echo Display::page_subheader(
Display::return_icon(

@ -18,7 +18,6 @@ require_once 'thematic_controller.php';
// current section
$this_section = SECTION_COURSES;
$current_course_tool = TOOL_COURSE_PROGRESS;
// protect a course script

@ -14,7 +14,7 @@ api_protect_course_script(true);
// Header
$tool = TOOL_COURSE_PROGRESS;
Display :: display_header('');
Display::display_header('');
// Introduction section
Display::display_introduction_section($tool);
@ -26,4 +26,4 @@ Event::event_access_tool($tool);
echo $content;
// Footer
Display :: display_footer();
Display::display_footer();

@ -129,7 +129,6 @@ if ($action == 'thematic_list') {
$list['content'] = Security::remove_XSS($thematic['content'], STUDENT);
$list['display_orden'] = $thematic['display_order'];
$list['active'] = $thematic['active'];
$my_thematic_id = $thematic['id'];
$session_star = '';

@ -111,7 +111,13 @@ function display_form()
// origin
$html .= '<label class="col-sm-2 control-label">'.get_lang('OriginCoursesFromSession').': </label>';
$html .= '<div class="col-sm-5">'.make_select_session_list('sessions_list_origin', $sessions, ['onchange' => 'javascript: xajax_search_courses(this.value,\'origin\');']).'</div>';
$html .= '<div class="col-sm-5">';
$html .= make_select_session_list(
'sessions_list_origin',
$sessions,
['onchange' => 'javascript: xajax_search_courses(this.value,\'origin\');']
);
$html .= '</div>';
$html .= '<div class="col-sm-5" id="ajax_list_courses_origin">';
$html .= '<select id="origin" class="form-control" name="SessionCoursesListOrigin[]" ></select>';
$html .= '</div></div>';
@ -179,7 +185,6 @@ function search_courses($id_session, $type)
// Build select for destination sessions where is not included current session from select origin
if (!empty($id_session)) {
$sessions = SessionManager::get_sessions_list([], ['name', 'ASC']);
$select_destination .= '<select name="sessions_list_destination" class="form-control" onchange = "javascript: xajax_search_courses(this.value,\'destination\');">';
$select_destination .= '<option value = "0">-- '.get_lang('SelectASession').' --</option>';
foreach ($sessions as $session) {

@ -135,7 +135,7 @@ if ($is_allowedToEdit && !empty($choice) && $choice == 'exportqti2') {
rmdir($temp_zip_dir);
exit; //otherwise following clicks may become buggy
} else {
$errorXmlExport = Display :: return_message(get_lang('ErrorWritingXMLFile'), 'error');
$errorXmlExport = Display::return_message(get_lang('ErrorWritingXMLFile'), 'error');
}
}

@ -1688,7 +1688,6 @@ EOT;
return $this->addElement('UserAvatar', $name, $label, ['image_size' => $imageSize, 'sub_title' => $subtitle]);
}
/**
* @param string $url page that will handle the upload
* @param string $inputName

Loading…
Cancel
Save