Skip to content

Exercise: Use c_quiz_rel_question.destination for success/failure navigation - refs #6180 #6184

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

Merged
merged 2 commits into from
Apr 2, 2025

Conversation

christianbeeznest
Copy link
Contributor

No description provided.

@@ -323,6 +345,29 @@
$objQuestion->updateWeighting($questionWeighting);
$objQuestion->save($objExercise);

if (HOT_SPOT_DELINEATION == $answerType) {
Copy link

Choose a reason for hiding this comment

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

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

/**
* Add adaptive scenario selector fields (success/failure) to the question form.
*/
private function addAdaptiveScenarioFields(FormValidator $form, array $questionList)
Copy link

Choose a reason for hiding this comment

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

Method addAdaptiveScenarioFields has 69 lines of code (exceeds 25 allowed). Consider refactoring.

@@ -146,6 +147,29 @@
$objQuestion->updateWeighting($questionWeighting);
$objQuestion->save($objExercise);

if (HOT_SPOT_DELINEATION == $answerType) {
Copy link

Choose a reason for hiding this comment

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

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

@@ -117,4 +119,41 @@ public static function getLangVariables()
'DelineationStatus1' => get_lang('Use right-click to close the delineation'),
];
}

public function getScenarioDestination(int $exerciseId): array
Copy link

Choose a reason for hiding this comment

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

Method getScenarioDestination has 28 lines of code (exceeds 25 allowed). Consider refactoring.

Copy link

codeclimate bot commented Apr 2, 2025

Code Climate has analyzed commit aa3120f and detected 4 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 2
Duplication 2

View more on Code Climate.

@ywarnier ywarnier merged commit 5299ad5 into chamilo:master Apr 2, 2025
1 of 8 checks passed
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.

2 participants