diff --git a/psalm.xml b/psalm.xml index ab7e12b808..98cbe00c3d 100644 --- a/psalm.xml +++ b/psalm.xml @@ -100,7 +100,6 @@ - diff --git a/public/main/admin/settings.lib.php b/public/main/admin/settings.lib.php index f53424b508..b55ee75fb9 100644 --- a/public/main/admin/settings.lib.php +++ b/public/main/admin/settings.lib.php @@ -1312,55 +1312,6 @@ function deleteTemplate($id) echo Display::return_message(get_lang('Template deleted'), 'confirm'); } -/** - * Returns the list of timezone identifiers used to populate the select - * This function is called through a call_user_func() in the generate_settings_form function. - * - * @return array List of timezone identifiers - * - * @author Guillaume Viguier - * - * @since Chamilo 1.8.7 - */ -function select_timezone_value() -{ - return api_get_timezones(); -} - -/** - * Returns an array containing the list of options used to populate the gradebook_number_decimals variable - * This function is called through a call_user_func() in the generate_settings_form function. - * - * @return array List of gradebook_number_decimals options - * - * @author Guillaume Viguier - */ -function select_gradebook_number_decimals() -{ - return ['0', '1', '2']; -} - -/** - * Get the options for a select element to select gradebook default grade model. - * - * @return array - */ -function select_gradebook_default_grade_model_id() -{ - $grade_model = new GradeModel(); - $models = $grade_model->get_all(); - $options = []; - $options[-1] = get_lang('none'); - - if (!empty($models)) { - foreach ($models as $model) { - $options[$model['id']] = $model['name']; - } - } - - return $options; -} - /** * @param array $settings * @param array $settings_by_access_list diff --git a/public/main/announcements/index.html b/public/main/announcements/index.html deleted file mode 100644 index 0984898605..0000000000 --- a/public/main/announcements/index.html +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/public/main/auth/index.html b/public/main/auth/index.html deleted file mode 100644 index c6159a7297..0000000000 --- a/public/main/auth/index.html +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/public/main/create_course/add_course.php b/public/main/create_course/add_course.php index 9b4b33db83..b3f2e67814 100644 --- a/public/main/create_course/add_course.php +++ b/public/main/create_course/add_course.php @@ -55,11 +55,6 @@ $htmlHeadXtra[] = ''; -/*$interbreadcrumb[] = [ - 'url' => api_get_path(WEB_PATH).'user_portal.php', - 'name' => get_lang('My courses'), -];*/ - // Displaying the header. $tool_name = $course_validation_feature ? get_lang('Create a course request') : get_lang('Add a new course'); diff --git a/public/main/inc/lib/lp_item.lib.php b/public/main/inc/lib/lp_item.lib.php deleted file mode 100644 index f07b27886c..0000000000 --- a/public/main/inc/lib/lp_item.lib.php +++ /dev/null @@ -1,148 +0,0 @@ - 0 && $in_id > 0) { - $item_view_table = Database::get_course_table(TABLE_LP_ITEM); - $sql = "SELECT * FROM $item_view_table - WHERE - iid=".intval($in_id); - - $res = Database::query($sql); - $data = Database::fetch_array($res); - if (Database::num_rows($res) > 0) { - //$this->c_id = $data['c_id']; - $this->id = $data['iid']; - $this->lp_id = $data['lp_id']; - $this->item_type = $data['item_type']; - $this->ref = $data['ref']; - $this->title = $data['title']; - $this->description = $data['description']; - $this->path = $data['path']; - $this->min_score = $data['min_score']; - $this->max_score = $data['max_score']; - $this->mastery_score = $data['mastery_score']; - $this->parent_item_id = $data['parent_item_id']; - $this->previous_item_id = $data['previous_item_id']; - $this->next_item_id = $data['next_item_id']; - $this->display_order = $data['display_order']; - $this->prerequisite = $data['prerequisite']; - $this->parameters = $data['parameters']; - $this->launch_data = $data['launch_data']; - $this->max_time_allowed = $data['max_time_allowed']; - $this->terms = $data['terms']; - $this->search_did = $data['search_did']; - $this->audio = $data['audio']; - } - } - } - - /** - * Update in database. - */ - public function update() - { - $table = Database::get_course_table(TABLE_LP_ITEM); - if ($this->c_id > 0 && $this->id > 0) { - $sql = "UPDATE $table SET - lp_id = '".intval($this->lp_id)."' , - item_type = '".Database::escape_string($this->item_type)."' , - ref = '".Database::escape_string($this->ref)."' , - title = '".Database::escape_string($this->title)."' , - description = '".Database::escape_string($this->description)."' , - path = '".Database::escape_string($this->path)."' , - min_score = '".Database::escape_string($this->min_score)."' , - max_score = '".Database::escape_string($this->max_score)."' , - mastery_score = '".Database::escape_string($this->mastery_score)."' , - parent_item_id = '".Database::escape_string($this->parent_item_id)."' , - previous_item_id = '".Database::escape_string($this->previous_item_id)."' , - next_item_id = '".Database::escape_string($this->next_item_id)."' , - display_order = '".Database::escape_string($this->display_order)."' , - prerequisite = '".Database::escape_string($this->prerequisite)."' , - parameters = '".Database::escape_string($this->parameters)."' , - launch_data = '".Database::escape_string($this->launch_data)."' , - max_time_allowed = '".Database::escape_string($this->max_time_allowed)."' , - terms = '".Database::escape_string($this->terms)."' , - search_did = '".Database::escape_string($this->search_did)."' , - audio = '".Database::escape_string($this->audio)."' - WHERE c_id=".$this->c_id." AND id=".$this->id; - Database::query($sql); - } - } - - /** - * Create extra field for learning path item. - * - * @param string $variable - * @param int $fieldType - * @param string $displayText - * @param string|null $default Optional. - * @param bool $changeable Optional. - * @param bool $visibleToSelf Optional. - * @param bool $visibleToOthers Optional. - * - * @return bool|int - */ - public static function createExtraField( - $variable, - $fieldType, - $displayText, - $default = null, - $changeable = false, - $visibleToSelf = false, - $visibleToOthers = false - ) { - $extraField = new ExtraField('lp_item'); - $params = [ - 'variable' => $variable, - 'field_type' => $fieldType, - 'display_text' => $displayText, - 'default_value' => $default, - 'changeable' => $changeable, - 'visible_to_self' => $visibleToSelf, - 'visible_to_others' => $visibleToOthers, - ]; - - return $extraField->save($params); - } -}