$details = $poll->getPollDetails('ALL'); $result["poll"][$i] = $details; } break; case "respond": //@session_start(); //echo $_POST['pollid']; exit(); $poll = new Poll($_POST["pollid"]); //$result = $poll->getPollDetails('ALL'); $response = $poll->respond($_POST["option"]); $result["responseStatus"] = $response; break; case "addDiscussionTopic": //@session_start(); $course1 = new course($_POST["courseid"], PRESENT_YEAR, PRESENT_SEM); $result = $course1->addDiscussionTopic($_POST["subject"]); break; case "addDiscussionResponse": //@session_start(); $course1 = new Course($_POST["courseid"], PRESENT_YEAR, PRESENT_SEM); $result = $course1->addDiscussionResponse($_POST["response"], $_POST["topicid"]); break; case "getDiscussionTopics": //@session_start(); $course1 = new Course($_POST["courseId"], PRESENT_YEAR, PRESENT_SEM); $result = $course1->getDiscussionTopics(); break; case "getDiscussionResponse": //@session_start(); $course1 = new Course($_POST["courseId"], PRESENT_YEAR, PRESENT_SEM); $result = $course1->getDiscussionResponse($_POST["topicid"]);