-
Notifications
You must be signed in to change notification settings - Fork 486
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
Conversation
….11.x in Chamilo 2 - refs BT#22063
…param - refs BT#22063
…ogress reminder - refs BT#22063
@@ -0,0 +1,256 @@ | |||
<?php | |||
|
|||
declare(strict_types=1); |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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')] |
There was a problem hiding this comment.
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')] |
There was a problem hiding this comment.
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)] |
There was a problem hiding this comment.
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)] |
There was a problem hiding this comment.
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')] |
There was a problem hiding this comment.
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')] |
There was a problem hiding this comment.
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')] |
There was a problem hiding this comment.
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.
Code Climate has analyzed commit a3e1121 and detected 42 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
No description provided.