function getAdminTestResults() { $sql = "SELECT firstName, lastName, courseName, testType,questionResults, marksResults, ExamDate, ExamStatus "; $sql .= " FROM `usercoursetest`, `courses`, `userregistration` WHERE `courses`.idCourses= `usercoursetest`.courseID "; $sql .= " AND `usercoursetest`.userID=`userregistration`.idUserRegistration"; $dbObj = new InteractDatabase(); $json = $dbObj->getJSONData($sql); echo $json; }
function userCourseCourseNameReports() { $sql = "SELECT DISTINCT courseName FROM usercoursetest, userregistration, courses WHERE usercoursetest.userID=userregistration.idUserRegistration AND courses.idCourses=usercoursetest.courseID"; $dbObj = new InteractDatabase(); $json = $dbObj->getJSONData($sql); return $json; }
function getListOfActivatedCourseDetails($userId, $courseId) { $sql = "SELECT * FROM `courseuserview` WHERE `userID`=" . $userId . " AND CourseID=" . $courseId; $dbObj = new InteractDatabase(); $json = $dbObj->getJSONData($sql); return $json; }