8000 Course: Add support for resource sequencing in course and session views - refs rna-22586 by christianbeeznest · Pull Request #6330 · chamilo/chamilo-lms · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Course: Add support for resource sequencing in course and session views - refs rna-22586 #6330

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

christianbeeznest
Copy link
Contributor

No description provided.

* @param {number=} sessionId - Optional session ID.
* @returns {Promise<{ available: boolean, nextCourse: object|null }>}
*/
getNextCourse: async (courseId, sessionId = 0) => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 2 locations. Consider refactoring.

8000
return $result;
}

private function checkRequirementsOrDependentsForUser(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method checkRequirementsOrDependentsForUser has 63 lines of code (exceeds 25 allowed). Consider refactoring.

);
}

private function getRequirementsOrDependents(int $resourceId, int $resourceType, string $itemType): array
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method getRequirementsOrDependents has 36 lines of code (exceeds 25 allowed). Consider refactoring.

return $result;
}

private function checkRequirementsOrDependentsForUser(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function checkRequirementsOrDependentsForUser has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring.

);
}

private function getRequirementsOrDependents(int $resourceId, int $resourceType, string $itemType): array
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function getRequirementsOrDependents has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.

Copy link
codeclimate bot commented Jun 3, 2025

Code Climate has analyzed commit 05c2357 and detected 7 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 5
Duplication 2

View more on Code Climate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0