Skip to content

Commit f8f5ef4

Browse files
committed
[smarcet]
* fixed summit speakers query ( added moderators)
1 parent 790fe28 commit f8f5ef4

2 files changed

Lines changed: 15 additions & 6 deletions

File tree

summit/code/infrastructure/active_records/Summit.php

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,20 +1273,30 @@ public function getEventFromSchedule($event_id)
12731273

12741274
public function Speakers($only_published = true)
12751275
{
1276-
$id = $this->ID;
1276+
$id = $this->ID;
12771277
$filter = intval($only_published) ? "AND E.Published = 1 " : "";
1278-
$dl = new DataList('PresentationSpeaker');
1278+
$dl = new DataList('PresentationSpeaker');
12791279

12801280
$dl = $dl->leftJoin('Member', ' Member.ID = PresentationSpeaker.MemberID')
12811281
->where("EXISTS
12821282
(
1283-
SELECT E.ID FROM SummitEvent E
1283+
SELECT 1 FROM SummitEvent E
12841284
INNER JOIN Presentation P ON E.ID = P.ID
12851285
INNER JOIN Presentation_Speakers PS ON PS.PresentationID = P.ID
12861286
WHERE E.SummitID = {$id}
12871287
{$filter}
12881288
AND PS.PresentationSpeakerID = PresentationSpeaker.ID
1289-
)");
1289+
)
1290+
OR
1291+
EXISTS
1292+
(
1293+
SELECT 1 FROM SummitEvent E
1294+
INNER JOIN Presentation ON Presentation.ID = E.ID
1295+
WHERE E.SummitID = {$id}
1296+
AND Presentation.ModeratorID = PresentationSpeaker.ID
1297+
{$filter}
1298+
)
1299+
");
12901300

12911301
return $dl;
12921302
}
@@ -1667,7 +1677,6 @@ public function getNiceVotingEnd($timezone_name = 'UTC'){
16671677
*/
16681678
public function getExcludedTracksForPublishedPresentations()
16691679
{
1670-
16711680
return array_values($this->ExcludedCategoriesForAcceptedPresentations()->getIDList());
16721681
}
16731682

summit/code/models/managers/SpeakerSecondBreakoutAnnouncementSenderManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public function send(ISummit $current_summit, $batch_size)
105105
);
106106

107107
$speakers_notified = 0;
108-
108+
echo "found {$count} speakers with published events on summit {$summit_id}".PHP_EOL;
109109
foreach ($speakers as $speaker) {
110110

111111
if (!$speaker instanceof IPresentationSpeaker) continue;

0 commit comments

Comments
 (0)