Skip to content

Commit

Permalink
Merge pull request #1138 from hitime1234/master
Browse files Browse the repository at this point in the history
Update MyRadio_Scheduler.php - Fixes the 10 week limit for semesters
  • Loading branch information
JP5457 authored Nov 22, 2023
2 parents c988fa9 + dae0209 commit 1976b7b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Classes/ServiceAPI/MyRadio_Scheduler.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,10 @@ public static function getScheduleConflicts($term_id, $time)
{
self::initDB();
$conflicts = [];
$start_day = (new MyRadio_Term($term_id))->getTermStartDate() + ($time['day'] * 86400);
$term = new MyRadio_Term($term_id);
$start_day = $term->getTermStartDate() + ($time['day'] * 86400);
//Iterate over each week
for ($i = 1; $i <= 10; ++$i) {
for ($i = 1; $i <= $term->getTermWeeks(); ++$i) {
$day_start = $start_day + (($i - 1) * 7 * 86400);

//Get the start time
Expand Down

0 comments on commit 1976b7b

Please sign in to comment.