joshblevins
Member
Settings
List: Courses Instructed (this is also joined to enrolled students.
Condition:
$myDb = JFactory::getDbo();
$myQuery = $myDb->getQuery(true);
// loop through the data array, which is split into groups
foreach ($data as $group) {
// loop through each group, which is split into rows
foreach ($group as $row) {
// for each row, grab the expiration date and calculate the difference in days between it and "now"
$complete= 'enrolled_studcourses_instructed___statusents___completed';
$status = ''courses_instructed___status';
if($complete == 0 || $status == 0){
return 'You have courses that need completed';
}
}
}
I am trying to evaluate if the enrolled_student has completed the course and if not send a email advising the student has a course that is incomplete. If the courses_status is 0 or Open.
When I run the above code I get no errors however no updates or email and I should return 1 row or email.
List: Courses Instructed (this is also joined to enrolled students.
Condition:
$myDb = JFactory::getDbo();
$myQuery = $myDb->getQuery(true);
// loop through the data array, which is split into groups
foreach ($data as $group) {
// loop through each group, which is split into rows
foreach ($group as $row) {
// for each row, grab the expiration date and calculate the difference in days between it and "now"
$complete= 'enrolled_studcourses_instructed___statusents___completed';
$status = ''courses_instructed___status';
if($complete == 0 || $status == 0){
return 'You have courses that need completed';
}
}
}
I am trying to evaluate if the enrolled_student has completed the course and if not send a email advising the student has a course that is incomplete. If the courses_status is 0 or Open.
When I run the above code I get no errors however no updates or email and I should return 1 row or email.