Rename function - refs BT#9092

1.10.x
Angel Fernando Quiroz Campos 11 years ago
parent c934c83fbe
commit 308bc5edad
  1. 6
      main/gradebook/lib/be/category.class.php
  2. 2
      plugin/advanced_subscription/src/AdvancedSubscriptionPlugin.php

@ -1661,7 +1661,7 @@ class Category implements GradebookItem
// A student always sees only the teacher's repartition // A student always sees only the teacher's repartition
$scoretotal_display = $scoredisplay->display_score($scoretotal, SCORE_DIV_PERCENT); $scoretotal_display = $scoredisplay->display_score($scoretotal, SCORE_DIV_PERCENT);
if (!self::userIsApprovedInCourse($user_id, $cats_course[0])) { if (!self::userFinishedCourse($user_id, $cats_course[0])) {
return false; return false;
} }
@ -1812,12 +1812,12 @@ class Category implements GradebookItem
} }
/** /**
* Check whether a user has been approved in a course by its gradebook * Check whether a user has finished a course by its gradebook
* @param int $userId The user ID * @param int $userId The user ID
* @param \Category $category The gradebook category * @param \Category $category The gradebook category
* @return boolean * @return boolean
*/ */
public static function userIsApprovedInCourse($userId, \Category $category) public static function userFinishedCourse($userId, \Category $category)
{ {
$courseEvaluations = $category->get_evaluations($userId, true); $courseEvaluations = $category->get_evaluations($userId, true);
$courseLinks = $category->get_links($userId, true); $courseLinks = $category->get_links($userId, true);

@ -1337,7 +1337,7 @@ class AdvancedSubscriptionPlugin extends Plugin implements HookPluginInterface
if ( if (
count($courseCategories) > 0 && count($courseCategories) > 0 &&
Category::userIsApprovedInCourse($userId, $courseCategories[0]) Category::userFinishedCourse($userId, $courseCategories[0])
) { ) {
$numberOfApprovedCourses++; $numberOfApprovedCourses++;
} }

Loading…
Cancel
Save