Minor: Format code

pull/4376/head
Angel Fernando Quiroz Campos 3 years ago
parent 76eb407e4b
commit e2aa282c0d
  1. 2
      main/gradebook/lib/be/category.class.php
  2. 16
      main/gradebook/lib/be/evaluation.class.php
  3. 45
      main/inc/lib/skill.lib.php
  4. 1
      main/inc/lib/template.lib.php

@ -815,8 +815,6 @@ class Category implements GradebookItem
/**
* Show message about the resource having been deleted.
*
* @param string $courseCode
*
* @return string|bool
*/
public function show_message_resource_delete(string $courseCode)

@ -924,6 +924,14 @@ class Evaluation implements GradebookItem
}
}
/**
* Gets the skills related to this item from the skill_rel_item table.
*/
public function getSkillsFromItem(): string
{
return Skill::getSkillRelItemsToString(ITEM_TYPE_GRADEBOOK_EVALUATION, $this->get_id());
}
/**
* @param array $result
*
@ -989,12 +997,4 @@ class Evaluation implements GradebookItem
return $targets;
}
/**
* Gets the skills related to this item from the skill_rel_item table
*/
public function getSkillsFromItem(): string
{
return Skill::getSkillRelItemsToString(ITEM_TYPE_GRADEBOOK_EVALUATION, $this->get_id());
}
}

@ -2584,11 +2584,7 @@ class Skill extends Model
}
/**
* @param SkillRelItem $skillRelItem
* @param SkillRelItemRelUser $skillRelItemRelUser
* @param bool $addHeader
*
* @return string
*/
public static function getUserSkillStatusLabel(SkillRelItem $skillRelItem, SkillRelItemRelUser $skillRelItemRelUser = null, bool $addHeader = true, int $userId = 0): string
{
@ -2615,14 +2611,8 @@ class Skill extends Model
/**
* Attach a list of skills (skill_rel_item) potentially assigned to a user to the given form.
*
* @param FormValidator $form
* @param int $typeId see ITEM_TYPE_* constants
* @param int $itemId
* @param int $userId
* @param int $resultId
* @param bool $addHeader Whether to show the 'Skills' title for this block
*
* @return void
* @param int $typeId see ITEM_TYPE_* constants
* @param bool $addHeader Whether to show the 'Skills' title for this block
*/
public static function addSkillsToUserForm(FormValidator $form, int $typeId, int $itemId, int $userId, int $resultId = 0, bool $addHeader = false): void
{
@ -2699,13 +2689,8 @@ class Skill extends Model
* to the given form, with AJAX action on click to save the assignment.
* Assigned skills appear in a different colour.
*
* @param int $typeId see ITEM_TYPE_* constants
* @param int $itemId
* @param int $userId
* @param int $resultId
* @param bool $addHeader Whether to show the 'Skills' title for this block
*
* @return string
* @param int $typeId see ITEM_TYPE_* constants
* @param bool $addHeader Whether to show the 'Skills' title for this block
*/
public static function getAddSkillsToUserBlock(int $typeId, int $itemId, int $userId, int $resultId = 0, bool $addHeader = false): string
{
@ -2990,10 +2975,11 @@ class Skill extends Model
}
/**
* Builds a list of skills attributable to this course+session in a checkbox input list for FormValidator
* @param FormValidator $form
* @param $courseId
* @param int $sessionId
* Builds a list of skills attributable to this course+session in a checkbox input list for FormValidator.
*
* @param $courseId
* @param int $sessionId
*
* @return array
*/
public static function setSkillsToCourse(FormValidator $form, $courseId, $sessionId = 0)
@ -3028,12 +3014,13 @@ class Skill extends Model
}
/**
* Show a list of skills attributable to this course+session in a checkbox input list for FormValidator
* @param FormValidator $form
* @param $skills
* @param $courseId
* @param $sessionId
* @param array $selectedSkills
* Show a list of skills attributable to this course+session in a checkbox input list for FormValidator.
*
* @param $skills
* @param $courseId
* @param $sessionId
* @param array $selectedSkills
*
* @return HTML_QuickForm_Element|HTML_QuickForm_group
*/
public static function skillsToCheckbox(FormValidator $form, $skills, $courseId, $sessionId, $selectedSkills = [])

@ -466,6 +466,7 @@ class Template
$this->assign('show_course_shortcut', $courseToolBar);
$this->assign('show_course_navigation_menu', $show_course_navigation_menu);
}
/**
* Sets an extra class for the main cm-content div.
* To use, give a new row to $htmlContentExtraClass like so: `$htmlContentExtraClass[] = 'feature-item-user-skill-on';`

Loading…
Cancel
Save