Skip to content

Commit

Permalink
Internal - Format code, fix set user id
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed Sep 28, 2020
1 parent c92a0c1 commit 95f6075
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 22 deletions.
2 changes: 1 addition & 1 deletion public/main/exercise/exercise.class.php
Expand Up @@ -6056,7 +6056,7 @@ public function showExerciseResultHeader(
if ($saveUserResult) {
$trackConfirmation = new TrackEExerciseConfirmation();
$trackConfirmation
->setUserId($trackExerciseInfo['exe_user_id'])
->setUser(api_get_user_entity($trackExerciseInfo['exe_user_id']))
->setQuizId($trackExerciseInfo['exe_exo_id'])
->setAttemptId($trackExerciseInfo['exe_id'])
->setQuestionsCount($questionsCount)
Expand Down
7 changes: 3 additions & 4 deletions public/main/gradebook/lib/be/category.class.php
Expand Up @@ -873,13 +873,12 @@ public function is_course()
/**
* Calculate the score of this category.
*
* @param int $studentId student id (default: all students - then the average is returned)
* @param $type
* @param int $studentId (default: all students - then the average is returned)
* @param string $type
* @param string $course_code
* @param int $session_id
*
* @return array (score sum, weight sum)
* or null if no scores available
* @return array (score sum, weight sum) or null if no scores available
*/
public function calc_score(
$studentId = null,
Expand Down
2 changes: 1 addition & 1 deletion public/main/gradebook/lib/be/evaluation.class.php
Expand Up @@ -513,7 +513,7 @@ public function is_valid_score($score)
* Calculate the score of this evaluation.
*
* @param int $studentId (default: all students who have results for this eval - then the average is returned)
* @param string $type (best, average, ranking)
* @param string $type (best, average, ranking)
*
* @return array (score, max) if student is given
* array (sum of scores, number of scores) otherwise
Expand Down
3 changes: 1 addition & 2 deletions public/main/gradebook/lib/be/exerciselink.class.php
Expand Up @@ -116,8 +116,7 @@ public function has_results()
/**
* Get the score of this exercise. Only the first attempts are taken into account.
*
* @param int $studentId student id (default: all students who have results -
* then the average is returned)
* @param int $studentId (default: all students who have results then the average is returned)
* @param string $type
*
* @return array (score, max) if student is given
Expand Down
2 changes: 1 addition & 1 deletion public/main/gradebook/lib/be/surveylink.class.php
Expand Up @@ -131,7 +131,7 @@ public function has_results()
* Calculate score for a student (to show in the gradebook).
*
* @param int $studentId
* @param string $type Type of result we want (best|average|ranking)
* @param string $type Type of result we want (best|average|ranking)
*
* @return array|null
*/
Expand Down
26 changes: 13 additions & 13 deletions public/main/gradebook/lib/fe/displaygradebook.php
Expand Up @@ -244,19 +244,19 @@ public static function display_header_reduce_flatview($catobj, $showeval, $showl
/**
* Displays the header for the gradebook containing the navigation tree and links.
*
* @param Category $catobj
* @param int $showtree '1' will show the browse tree and naviation buttons
* @param $selectcat
* @param bool $is_course_admin
* @param bool $is_platform_admin
* @param FormValidator $simple_search_form
* @param bool $show_add_qualification Whether to show or not the link to add a new qualification
* (we hide it in case of the course-embedded tool where we have only one
* per course or session)
* @param bool $show_add_link Whether to show or not the link to add a new item inside
* the qualification (we hide it in case of the course-embedded tool
* where we have only one qualification per course or session)
* @param array $certificateLinkInfo
* @param Category $catobj
* @param int $showtree '1' will show the browse tree and naviation buttons
* @param $selectcat
* @param bool $is_course_admin
* @param bool $is_platform_admin
* @param FormValidator $simple_search_form
* @param bool $show_add_qualification Whether to show or not the link to add a new qualification
* (we hide it in case of the course-embedded tool where we have
* only one per course or session)
* @param bool $show_add_link Whether to show or not the link to add a new item inside
* the qualification (we hide it in case of the course-embedded tool
* where we have only one qualification per course or session)
* @param array $certificateLinkInfo
*/
public static function header(
$catobj,
Expand Down

0 comments on commit 95f6075

Please sign in to comment.