<?php require_once 'forAllPages.php'; require_once 'moduleservices.php'; $_POST['moduleID'] = "OHIRA1001"; $_POST['categoryID'] = "1"; $moduleServices = new ModuleServices(); if (isset($_POST['createQuestion'])) { $moduleServices->createMCQQuestion(); } if (isset($_POST['deleteQuestion'])) { $moduleServices->deleteSelectedMCQQuestions(); } if (isset($_POST['updateQuestion'])) { $moduleServices->updateSelectedMCQQuestion(); } $category = $moduleServices->getCategoryByID($_POST['categoryID']); $questionList = $moduleServices->getQuestionsFromCategory($category); include 'header.partial.php'; ?> <div class="" style="padding:0;margin-left:-40px; margin-top:-20px"> <h1 class="pinkfont qnman" style="font-size:80px;"> Questions Management </h1> <h1 class="blackfont bluebg modcod"> <?php print $category->moduleID . ' : ' . $category->title; ?> </h1>
<?php require_once 'forAllPages.php'; require_once 'moduleservices.php'; $moduleServices = new ModuleServices(); $categoryListing = $moduleServices->getModuleCategories($_GET['moduleID']); include 'header.partial.php'; ?> <h2 class="sub-header"> <?php print $_GET['moduleID']; ?> </h2> <div class="table-responsive"> <table class="table"> <thead> <tr> <th style="width:30%"> Category Name </th> <th style="width:70%"> Description </th> </tr> </thead> <tbody> <?php foreach ($categoryListing as $category) { ?>
<?php require_once 'forAllPages.php'; require_once 'statisticservices.php'; require_once 'moduleservices.php'; $statsService = new StatisticServices(); $moduleService = new ModuleServices(); $categoryList = $moduleService->getAllCategories(); if (isset($_SESSION['email'])) { $finalStats = array(); $allStatsResults = $statsService->getStatisticsForEmail($_SESSION['email']); foreach ($allStatsResults as $row) { if (!isset($finalStats[$row['categoryID']])) { $finalStats[$row['categoryID']] = array(); $finalStats[$row['categoryID']]['pass'] = 0; $finalStats[$row['categoryID']]['fail'] = 0; } if ($row['answer'] == 1) { $finalStats[$row['categoryID']]['pass'] += 1; } else { if ($row['answer'] == 0) { $finalStats[$row['categoryID']]['fail'] += 1; } } } } include 'header.partial.php'; ?> <h2 class="sub-header"> Statistics </h2>
<?php require_once 'forAllPages.php'; require_once 'moduleservices.php'; $moduleServices = new ModuleServices(); $category = $moduleServices->getCategoryByID($_POST['categoryID']); include 'header.partial.php'; ?> <h1 class="page-header quiz-header" id="quiz-header" draggable="false"> <?php print $category->moduleID . ':'; ?> </h1> <h1 class="page-header quiz-subheader" id="quiz-subheader" draggable="false"> <?php print $category->title; ?> </h1> <a class="btn btn-default btn-primary start" id="normal-start" onclick="startPractice()">Practice</a> <a class="btn btn-default btn-primary start" id="quiz-start" onclick="startQuiz()">Quiz!</a> <div id="question-area"> </div> <div hidden id="categoryID"><?php print $category->categoryID; ?> </div> <div hidden id="questionID">0</div> <div hidden id="questionType"><?php
<?php require_once 'forAllPages.php'; require_once 'moduleservices.php'; $moduleServices = new ModuleServices(); $moduleListing = $moduleServices->getModuleListing(); include 'header.partial.php'; ?> <h2 class="sub-header"> Modules </h2> <div class="table-responsive"> <table class="table table"> <thead> <tr> <th style="width:15%"> Module Code </th> <th style="width:20%"> Title </th> <th style="width:65%"> Description </th> </tr> </thead> <tbody> <?php foreach ($moduleListing as $module) {