Skip to content
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

Internal: Implement LP progress reminder functionality from Chamilo 1.11.x in Chamilo 2 - refs BT#22063 #5832

Merged
merged 16 commits into from
Nov 25, 2024

Conversation

christianbeeznest
Copy link
Contributor

No description provided.

@@ -0,0 +1,256 @@
<?php

declare(strict_types=1);
Copy link

Choose a reason for hiding this comment

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

Add a single space around assignment operators

use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

class LpProgressReminderCommand extends Command
Copy link

Choose a reason for hiding this comment

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

Missing class doc comment


private const NUMBER_OF_DAYS_TO_RESEND_NOTIFICATION = 3;

public function __construct(
Copy link

Choose a reason for hiding this comment

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

Missing function doc comment

private const NUMBER_OF_DAYS_TO_RESEND_NOTIFICATION = 3;

public function __construct(
private CourseRepository $courseRepository,
Copy link

Choose a reason for hiding this comment

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

Line indented incorrectly; expected 4 spaces, found 8


public function __construct(
private CourseRepository $courseRepository,
private CourseRelUserRepository $courseRelUserRepository,
Copy link

Choose a reason for hiding this comment

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

Line indented incorrectly; expected 4 spaces, found 8

private const NUMBER_OF_DAYS_TO_RESEND_NOTIFICATION = 3;

public function __construct(
private readonly CourseRepository $courseRepository,
Copy link

Choose a reason for hiding this comment

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

Line indented incorrectly; expected 4 spaces, found 8


public function __construct(
private readonly CourseRepository $courseRepository,
private readonly CourseRelUserRepository $courseRelUserRepository,
Copy link

Choose a reason for hiding this comment

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

Line indented incorrectly; expected 4 spaces, found 8

public function __construct(
private readonly CourseRepository $courseRepository,
private readonly CourseRelUserRepository $courseRelUserRepository,
private readonly SessionRelCourseRelUserRepository $sessionRelCourseRelUserRepository,
Copy link

Choose a reason for hiding this comment

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

Line indented incorrectly; expected 4 spaces, found 8

private readonly CourseRepository $courseRepository,
private readonly CourseRelUserRepository $courseRelUserRepository,
private readonly SessionRelCourseRelUserRepository $sessionRelCourseRelUserRepository,
private readonly ExtraFieldValuesRepository $extraFieldValuesRepository,
Copy link

Choose a reason for hiding this comment

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

Line indented incorrectly; expected 4 spaces, found 8

private readonly CourseRelUserRepository $courseRelUserRepository,
private readonly SessionRelCourseRelUserRepository $sessionRelCourseRelUserRepository,
private readonly ExtraFieldValuesRepository $extraFieldValuesRepository,
private readonly TrackEDefaultRepository $trackEDefaultRepository,
Copy link

Choose a reason for hiding this comment

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

Line indented incorrectly; expected 4 spaces, found 8

private readonly SessionRelCourseRelUserRepository $sessionRelCourseRelUserRepository,
private readonly ExtraFieldValuesRepository $extraFieldValuesRepository,
private readonly TrackEDefaultRepository $trackEDefaultRepository,
private readonly UserRepository $userRepository,
Copy link

Choose a reason for hiding this comment

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

Line indented incorrectly; expected 4 spaces, found 8

private readonly ExtraFieldValuesRepository $extraFieldValuesRepository,
private readonly TrackEDefaultRepository $trackEDefaultRepository,
private readonly UserRepository $userRepository,
private readonly Environment $twig,
Copy link

Choose a reason for hiding this comment

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

Line indented incorrectly; expected 4 spaces, found 8

private readonly TrackEDefaultRepository $trackEDefaultRepository,
private readonly UserRepository $userRepository,
private readonly Environment $twig,
private readonly TranslatorInterface $translator,
Copy link

Choose a reason for hiding this comment

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

Line indented incorrectly; expected 4 spaces, found 8

private readonly UserRepository $userRepository,
private readonly Environment $twig,
private readonly TranslatorInterface $translator,
private readonly MessageHelper $messageHelper,
Copy link

Choose a reason for hiding this comment

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

Line indented incorrectly; expected 4 spaces, found 8

private readonly Environment $twig,
private readonly TranslatorInterface $translator,
private readonly MessageHelper $messageHelper,
private readonly UrlGeneratorInterface $urlGenerator
Copy link

Choose a reason for hiding this comment

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

Line indented incorrectly; expected 4 spaces, found 8


if (empty($lpItems)) {
$output->writeln('No learning paths with days for completion found.');
return Command::SUCCESS;
Copy link

Choose a reason for hiding this comment

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

Missing blank line before return statement

}

$output->writeln('LP progress reminder process finished.');
return Command::SUCCESS;
Copy link

Choose a reason for hiding this comment

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

Missing blank line before return statement

if ($debugMode) {
echo "No registration date found for user $userId in course $courseId (session ID: $sessionId).\n";
}
return;
Copy link

Choose a reason for hiding this comment

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

Missing blank line before return statement

#[ORM\Index(name: 'course_rel_user_user_id', columns: ['id', 'user_id'])]
#[ORM\Index(name: 'course_rel_user_c_id_user_id', columns: ['id', 'c_id', 'user_id'])]
#[ORM\Entity]
#[ORM\Index(columns: ['id', 'user_id'], name: 'course_rel_user_user_id')]
Copy link

Choose a reason for hiding this comment

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

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.

#[ORM\Index(name: 'course_rel_user_c_id_user_id', columns: ['id', 'c_id', 'user_id'])]
#[ORM\Entity]
#[ORM\Index(columns: ['id', 'user_id'], name: 'course_rel_user_user_id')]
#[ORM\Index(columns: ['id', 'c_id', 'user_id'], name: 'course_rel_user_c_id_user_id')]
Copy link

Choose a reason for hiding this comment

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

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.

#[ORM\Entity]
#[ORM\Index(columns: ['id', 'user_id'], name: 'course_rel_user_user_id')]
#[ORM\Index(columns: ['id', 'c_id', 'user_id'], name: 'course_rel_user_c_id_user_id')]
#[ORM\Entity(repositoryClass: CourseRelUserRepository::class)]
Copy link

Choose a reason for hiding this comment

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

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.

@@ -32,7 +33,7 @@
#[ORM\Index(columns: ['user_id'], name: 'idx_session_rel_course_rel_user_id_user')]
#[ORM\Index(columns: ['c_id'], name: 'idx_session_rel_course_rel_user_course_id')]
#[ORM\UniqueConstraint(name: 'course_session_unique', columns: ['session_id', 'c_id', 'user_id', 'status'])]
#[ORM\Entity]
#[ORM\Entity(repositoryClass: SessionRelCourseRelUserRepository::class)]
Copy link

Choose a reason for hiding this comment

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

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.

#[ORM\Index(name: 'session', columns: ['session_id'])]
#[ORM\Index(name: 'idx_default_user_id', columns: ['default_user_id'])]
#[ORM\Entity]
#[ORM\Index(columns: ['c_id'], name: 'course')]
Copy link

Choose a reason for hiding this comment

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

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.

#[ORM\Index(name: 'idx_default_user_id', columns: ['default_user_id'])]
#[ORM\Entity]
#[ORM\Index(columns: ['c_id'], name: 'course')]
#[ORM\Index(columns: ['session_id'], name: 'session')]
Copy link

Choose a reason for hiding this comment

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

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.

#[ORM\Entity]
#[ORM\Index(columns: ['c_id'], name: 'course')]
#[ORM\Index(columns: ['session_id'], name: 'session')]
#[ORM\Index(columns: ['default_user_id'], name: 'idx_default_user_id')]
Copy link

Choose a reason for hiding this comment

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

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.

Copy link

codeclimate bot commented Nov 22, 2024

Code Climate has analyzed commit a3e1121 and detected 42 issues on this pull request.

Here's the issue category breakdown:

Category Count
Style 33
Clarity 7
Complexity 2

View more on Code Climate.

@NicoDucou NicoDucou merged commit 5a6b213 into chamilo:master Nov 25, 2024
2 of 7 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