php js css php js css

Changes

Changes to Page: student-portal-email-test

143069
Today 2:07am
Nocos, John Robertson
Modified page
Can't Undo: The page /student-portal-email-test/ does not currently exist, it may have been moved or deleted. In order to undo this change, you first need to restore the page
143070
Today 2:07am
Nocos, John Robertson
Modified page
Can't Undo: The page /student-portal-email-test/ does not currently exist, it may have been moved or deleted. In order to undo this change, you first need to restore the page
Id:
/student-portal-email-test/
/student-portal-email-test/
Title:
Student Portal Email Test
Student Portal Email Test
Content:
<templates:section>
<h1>Student Portal Email Test</h1>
<p>Enter your content here</p>
</templates:section>
<templates:section>
<h1>Student Portal Email Test</h1>
<p>Enter your content here</p>
</templates:section>
Content Additional:
{"togglable_footerCTA":null,"togglable_memberCTA":"on","togglable_testCTA":null,"togglable_newslettercta":null}
{"togglable_footerCTA":null,"togglable_memberCTA":"on","togglable_testCTA":null,"togglable_newslettercta":null}
Css:

															

														
Js:

															

														
Php Source:
<?php

$arrPost = [];
$arrContacts = [];

sendNewPostEmail($arrPost);

function sendNewPostEmail($arrPost, $arrContacts = [])
{
if (!$arrContacts)
return;

$iCourseId = $arrPost['course_id'];
if (!$arrCourse = \Components\AF\Courses::get($iCourseId))
return;

// Set course title for either collective or private course
if ($arrCourse['course_type'] === 'collective')
{
$arrProduct = \Components\Commerce\Products::getIncludingDeleted($arrCourse['product_id']);
$strCourseTitle = $arrProduct['product_title'] ?? null;
} else
$strCourseTitle = $arrCourse['course_code'];

$strSubject = 'There\'s a new post for your ' . $strCourseTitle . ' class';
$strTemplatePageId = '/admin/af/courses/posts/email-templates/post-new/';

$iPostId = $arrPost['post_id'];

// Attachments
$arrAttachmentsData = [];
if ($arrAttachments = \Components\AF\Courses\Posts::attachmentsGet($iPostId))
{
$arrAttachmentsData['shared_folder_name'] = 'courses_posts_' . $iPostId; // Correspondence shared attachments folder

foreach ($arrAttachments as $strAttachment)
$arrAttachmentsData['attachments'][] = \Components\AF\Courses\Posts::getPrivateMediaDir() . $iPostId . '/' . $strAttachment;
}


// Build vars
$arrVariables = [
'course' => $arrCourse,
'post' => $arrPost,
'post_contact' => \Components\Customers\Contacts::get($arrPost['contact_id']),
'post_contact_title' => \Components\AF\Courses\Posts::renderTitleForContact($arrPost['contact_id'], $arrCourse['course_id']),
'course_title' => $strCourseTitle,
// 'media_attachments' => $arrMediaAttachments
];


// Send email notification
foreach ($arrContacts as $arrContact)
{
\Components\AF\StudentPortal::sendMail($arrContact, $strSubject, $strTemplatePageId, $arrVariables, $arrAttachmentsData);
}
}

?>
<?php

$arrPost = [];
$arrContacts = [];

sendNewPostEmail($arrPost);

function sendNewPostEmail($arrPost, $arrContacts = [])
{
if (!$arrContacts)
return;

$iCourseId = $arrPost['course_id'];
if (!$arrCourse = \Components\AF\Courses::get($iCourseId))
return;

// Set course title for either collective or private course
if ($arrCourse['course_type'] === 'collective')
{
$arrProduct = \Components\Commerce\Products::getIncludingDeleted($arrCourse['product_id']);
$strCourseTitle = $arrProduct['product_title'] ?? null;
} else
$strCourseTitle = $arrCourse['course_code'];

$strSubject = 'There\'s a new post for your ' . $strCourseTitle . ' class';
$strTemplatePageId = '/admin/af/courses/posts/email-templates/post-new/';

$iPostId = $arrPost['post_id'];

// Attachments
$arrAttachmentsData = [];
if ($arrAttachments = \Components\AF\Courses\Posts::attachmentsGet($iPostId))
{
$arrAttachmentsData['shared_folder_name'] = 'courses_posts_' . $iPostId; // Correspondence shared attachments folder

foreach ($arrAttachments as $strAttachment)
$arrAttachmentsData['attachments'][] = \Components\AF\Courses\Posts::getPrivateMediaDir() . $iPostId . '/' . $strAttachment;
}


// Build vars
$arrVariables = [
'course' => $arrCourse,
'post' => $arrPost,
'post_contact' => \Components\Customers\Contacts::get($arrPost['contact_id']),
'post_contact_title' => \Components\AF\Courses\Posts::renderTitleForContact($arrPost['contact_id'], $arrCourse['course_id']),
'course_title' => $strCourseTitle,
// 'media_attachments' => $arrMediaAttachments
];


// Send email notification
foreach ($arrContacts as $arrContact)
{
\Components\AF\StudentPortal::sendMail($arrContact, $strSubject, $strTemplatePageId, $arrVariables, $arrAttachmentsData);
}
}

?>
Accept Child 404:
0
0
Search Title:

															

														
Search Title Prefix:

															

														
Search Description:

															

														
Search Keywords:

															

														
Search Noindex:
0
0
Search Nofollow:
0
0
Search Change Frequency:

															

														
Search Priority:
0.5
0.5
Search Canonical Override:

															

														
Is Offline:
1
1
Is Hidden In Navigation:
1
1
Is Hidden In Sitemap:
1
1
Security New:
0
0
Security Contact Mode:

															

														
Security Contact Squeeze Viewlimit:

															

														
Security Contact Require Login:

															

														
Security Contact Groups:

															

														
Security Condition Id:

															

														
Security Heading:

															

														
Security Description:

															

														
Other Fields:

															

														
Order:
11
11
Parent Id:
/
/
Contact Id:
0
0
Design Id:
0
0
Header Functions:

															

														
Header Category:

															

														
Is Domain:
0
0
Post Category Id: