From 549aa678f7d47cae9d63f4208c2bd7a54da3e8d5 Mon Sep 17 00:00:00 2001 From: JoshuaMicallefYBSU <91457812+JoshuaMicallefYBSU@users.noreply.github.com> Date: Sun, 1 Sep 2024 10:52:47 +1000 Subject: [PATCH 1/3] Job Function Updates --- app/Console/Kernel.php | 6 +++--- app/Jobs/DiscordTrainingWeeklyUpdates.php | 2 +- app/Jobs/ProcessMonthlyBreakdown.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 8e4a4f97..1d4be280 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -46,7 +46,7 @@ protected function schedule(Schedule $schedule) $schedule->job(new ProcessRosterInactivity())->daily(); // Monthly Statistics Breakdown - $schedule->job(new ProcessMonthlyBreakdown())->monthlyOn(1, '00:40'); + $schedule->job(new ProcessMonthlyBreakdown())->monthlyOn(1, '00:01'); //Solo cert expiry warning // $schedule->job(new ProcessSoloCertExpiryWarnings())->daily(); @@ -58,10 +58,10 @@ protected function schedule(Schedule $schedule) $schedule->job(new ProcessSessionReminders())->daily(); // Check Training Threads Status (Once per week) - $schedule->job(new DiscordTrainingWeeklyUpdates())->weeklyOn(6, '6:00'); + $schedule->job(new DiscordTrainingWeeklyUpdates())->weeklyOn(6, '00:01'); // Check If Account is Linked - $schedule->job(new DiscordAccountCheck)->weeklyOn(5, '0:30'); + $schedule->job(new DiscordAccountCheck)->weeklyOn(5, '0:01'); //CRONS FOR INACTIVITY EMAILS 2 weeks // $schedule->call(function () { diff --git a/app/Jobs/DiscordTrainingWeeklyUpdates.php b/app/Jobs/DiscordTrainingWeeklyUpdates.php index 4ef689dc..56ac5461 100644 --- a/app/Jobs/DiscordTrainingWeeklyUpdates.php +++ b/app/Jobs/DiscordTrainingWeeklyUpdates.php @@ -128,7 +128,7 @@ public function handle() $avail_message++; // // SendEmbed to ask student to send availability - $discord->sendEmbedInTrainingThread($cid, "Please Provide Availability", 'Hello, <@'.$student->discord_user_id.'> + $discord->sendEmbedInTrainingThread($cid, "Please Provide Availability", 'Hello, <@'.$student->user->discord_user_id.'> As we head into the Weekend, we ask you please provide your availability for next week. Please ensure to tag the `@Instructor` role with all times you are available. Please provide these times in Zulu Format. diff --git a/app/Jobs/ProcessMonthlyBreakdown.php b/app/Jobs/ProcessMonthlyBreakdown.php index bd35af11..cbac49e7 100644 --- a/app/Jobs/ProcessMonthlyBreakdown.php +++ b/app/Jobs/ProcessMonthlyBreakdown.php @@ -52,9 +52,9 @@ public function handle() $message .= "\n**__Top 3 Controllers__**\n"; foreach($top_3 as $t) { if($t->user->discord_user_id === null){ - $message .= "- " . $t->user->fullName('FLC') . " - ".$t->monthly_hours."\n"; + $message .= "- " . $t->user->fullName('FLC') . " - ".$t->monthly_hours." hours\n"; } else { - $message .= "- <@" . $t->user->discord_user_id . "> - ".$t->monthly_hours."\n"; + $message .= "- <@" . $t->user->discord_user_id . "> - ".$t->monthly_hours." hours\n"; } } From 538751d871b66ebae7b70986bd686a93deea6417 Mon Sep 17 00:00:00 2001 From: JoshuaMicallefYBSU <91457812+JoshuaMicallefYBSU@users.noreply.github.com> Date: Sun, 1 Sep 2024 14:22:05 +1000 Subject: [PATCH 2/3] Remove 30min min activity req --- app/Jobs/ProcessRosterInactivity.php | 8 +++++--- app/Jobs/ProcessSessionLogging.php | 4 ++-- resources/views/my/index.blade.php | 3 ++- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/app/Jobs/ProcessRosterInactivity.php b/app/Jobs/ProcessRosterInactivity.php index 77401d40..20280a1b 100644 --- a/app/Jobs/ProcessRosterInactivity.php +++ b/app/Jobs/ProcessRosterInactivity.php @@ -63,9 +63,11 @@ public function handle() // Go through each session to get some information foreach($sessions as $s){ - if($s->duration > 0.49){ - $currency += $s->duration; - } + // if($s->duration > 0.49){ + // $currency += $s->duration; + // } + + $currency += $s->duration; } diff --git a/app/Jobs/ProcessSessionLogging.php b/app/Jobs/ProcessSessionLogging.php index d4a1c4f9..158eb695 100644 --- a/app/Jobs/ProcessSessionLogging.php +++ b/app/Jobs/ProcessSessionLogging.php @@ -170,8 +170,8 @@ public function handle() // Controller is either Certified or In Training if (($rosterMember->certification == 'certified' || $rosterMember->certification == 'training')) { - // Only add hours if more than 30mins - if($currency > 0.49){ + // Only add hours if more than 30mins (Disabled to 01mins until policy update) + if($currency > 0.00){ $rosterMember->currency += $currency; $rosterMember->monthly_hours += $monthly_hours; $rosterMember->save(); diff --git a/resources/views/my/index.blade.php b/resources/views/my/index.blade.php index 35719591..ce6db2f5 100644 --- a/resources/views/my/index.blade.php +++ b/resources/views/my/index.blade.php @@ -370,7 +370,8 @@ class='badge rounded {{ $class }} text-white p-2 shadow-none'>

Your Connections

List of all your Gander Oceanic connections to VATSIM over the last 12 Months.

-

Connections less than 30 minutes are shown in red, and do not count towards Controller Currency.

+ {{--

Connections less than 30 minutes are shown in red, and do not count towards Controller Currency.

--}} +

Connections less than 30 minutes are shown in red.

From ca633b1cc715ce4198ec31cc38138f2be354c42c Mon Sep 17 00:00:00 2001 From: JoshuaMicallefYBSU <91457812+JoshuaMicallefYBSU@users.noreply.github.com> Date: Sun, 1 Sep 2024 14:34:09 +1000 Subject: [PATCH 3/3] Update student.blade.php --- .../views/admin/training/instructing/students/student.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/admin/training/instructing/students/student.blade.php b/resources/views/admin/training/instructing/students/student.blade.php index f202877f..89f7a42e 100644 --- a/resources/views/admin/training/instructing/students/student.blade.php +++ b/resources/views/admin/training/instructing/students/student.blade.php @@ -196,7 +196,7 @@
Position