diff --git a/main/inc/lib/add_course.lib.inc.php b/main/inc/lib/add_course.lib.inc.php index fbb585ef87..8d357be805 100755 --- a/main/inc/lib/add_course.lib.inc.php +++ b/main/inc/lib/add_course.lib.inc.php @@ -88,7 +88,7 @@ class AddCourse * @return int 0 * @assert (null,null) === false */ - public static function prepare_course_repository($course_repository, $course_code) + public static function prepare_course_repository($course_repository) { $perm = api_get_permissions_for_new_directories(); $perm_file = api_get_permissions_for_new_files(); @@ -369,15 +369,14 @@ class AddCourse /** * Sorts pictures by type (used?) * @param array List of files (sthg like array(0=>array('png'=>1))) - * @param string File type * @param string $type * @return array The received array without files not matching type * @assert (array(),null) === array() */ public static function sort_pictures($files, $type) { - $pictures = array(); - foreach ($files as $key => $value) { + $pictures = []; + foreach ($files as $value) { if (isset($value[$type]) && $value[$type] != '') { $pictures[][$type] = $value[$type]; } @@ -424,13 +423,8 @@ class AddCourse $TABLESETTING = Database::get_course_table(TABLE_COURSE_SETTING); $TABLEGRADEBOOK = Database::get_main_table(TABLE_MAIN_GRADEBOOK_CATEGORY); $TABLEGRADEBOOKLINK = Database::get_main_table(TABLE_MAIN_GRADEBOOK_LINK); - - $visible_for_all = 1; $visible_for_course_admin = 0; - $visible_for_platform_admin = 2; - /* Course tools */ - Database::query( "INSERT INTO $tbl_course_homepage (c_id, id, name, link, image, visibility, admin, address, added_tool, target, category, session_id) VALUES ($course_id, 1, '".TOOL_COURSE_DESCRIPTION."','course_description/','info.gif','".self::string2binary( diff --git a/main/inc/lib/course.lib.php b/main/inc/lib/course.lib.php index 21d0675522..56fb20894c 100755 --- a/main/inc/lib/course.lib.php +++ b/main/inc/lib/course.lib.php @@ -6409,7 +6409,7 @@ class CourseManager { $authorId = empty($authorId) ? api_get_user_id() : (int) $authorId; - AddCourse::prepare_course_repository($courseInfo['directory'], $courseInfo['code']); + AddCourse::prepare_course_repository($courseInfo['directory']); AddCourse::fill_db_course( $courseInfo['real_id'], $courseInfo['directory'], diff --git a/main/inc/lib/formvalidator/Element/DateTimePicker.php b/main/inc/lib/formvalidator/Element/DateTimePicker.php index 70f99924c1..1b06e5b967 100755 --- a/main/inc/lib/formvalidator/Element/DateTimePicker.php +++ b/main/inc/lib/formvalidator/Element/DateTimePicker.php @@ -130,9 +130,7 @@ class DateTimePicker extends HTML_QuickForm_text public function getTemplate($layout) { $size = $this->getColumnsSize(); - $id = $this->getAttribute('id'); $value = $this->getValue(); - if (empty($size)) { $sizeTemp = $this->getInputSize(); if (empty($size)) { @@ -154,10 +152,6 @@ class DateTimePicker extends HTML_QuickForm_text } } - if (!empty($value)) { - $value = api_format_date($value, DATE_TIME_FORMAT_LONG_24H); - } - switch ($layout) { case FormValidator::LAYOUT_INLINE: return ' diff --git a/main/inc/lib/sortable_table.class.php b/main/inc/lib/sortable_table.class.php index b6236e2b74..efe96a9312 100755 --- a/main/inc/lib/sortable_table.class.php +++ b/main/inc/lib/sortable_table.class.php @@ -369,8 +369,6 @@ class SortableTable extends HTML_Table { $empty_table = false; if ($this->get_total_number_of_items() == 0) { - $cols = $this->getColCount(); - //$this->setCellAttributes(1, 0, 'style="font-style: italic;text-align:center;" colspan='.$cols); $message_empty = api_xml_http_response_encode(get_lang('TheListIsEmpty')); $this->setCellContents(1, 0, $message_empty); $empty_table = true; @@ -396,12 +394,9 @@ class SortableTable extends HTML_Table '; // @todo This also must be moved - // Show only navigations if there are more than 1 page $my_pager = $this->get_pager(); - $html .= '