$ObjQuiz = new quiz(); if ($d) { $classid = $ObjClass->convertUUIDToClassID($d); $classes = $ObjClass->getClassInformation($classid); $documents = $ObjClass->getClassDocuments($classid); $classActivity = $ObjClass->getClassActivity($classid); $today = date('Y-m-d'); $classDiary = $ObjClass->getClassDiary($classid, $today, $today); // Check if an administrator or owner of the class to b eable to toggle visibility if ($_SESSION['utype'] >= 8 || $ObjAkonga->usernametoid($_SESSION['username']) == $classes['teacherid']) { if ($e == "1") { $visibility = 1; } else { $visibility = 0; } $toggleClass = $ObjClass->toggleClass($classid, $visibility); if ($toggleClass != false) { $responseMsg = "Your class visibility has been changed."; $classes = $ObjClass->getClassInformation($classid); // Reload class information to stop it pulling in the wrong data now it's changed } else { $responseMsg = "Could not toggle visibility at this time"; } } else { $responseMsg = "Sorry you are not the owner or an administrator"; } } else { $classes = $ObjClass->getClassList(); } // create the view for course information require_once 'web/core/class/view.php';