Your IP : 216.73.217.79


Current Path : /var/www/cesa.co.za/cesanet/
Upload File :
Current File : /var/www/cesa.co.za/cesanet/index.php

<?php
// ini_set('display_errors', 1);
// error_reporting(E_ALL);

// echo 'Hello!';
// exit;

include("inc_functions.php");

$examObj = new CCEExam($sqlf);
$testStudentIDs = getTestStudentIDs();

if (!isset($_SESSION["StudentID"]) || empty($_SESSION["StudentID"]) || $_SESSION["StudentID"] == null)
    header("Location: /cesanet/login.php");

include_once($_SERVER['DOCUMENT_ROOT'] . "/cesanet/includes/html_begin.php");
?>
<!-- <p>Student No: <?php echo $_SESSION["StudentID"]; ?></p> -->
<?php
//                if (date("Y-m-d") == "2023-02-14") {
if (true) { //(in_array($_SESSION["StudentID"], array(540)) || (date("Y-m-d") == "2024-11-19" && in_array($_SESSION["StudentID"], array(54, 321, 326, 327)))) {
    $upcomingExamList = $examObj->getUpcomingExamListForStudent($_SESSION["StudentID"], $testStudentIDs);
    $markedExamList = $examObj->getMarkedExamListForStudent($_SESSION["StudentID"], $testStudentIDs);
?>
    <!-- <h1>BCE Exams 2026</h1> -->
    <table border=1 cellspacing=0 cellpadding=5 width="50%">
        <!-- <tr>
            <th colspan="2"><b>Module</b></th>
        </tr>
        <tr>
            <td><b>Start Time</b></td>
            <td><b>End Time</b></td>
        </tr> -->
        <!-- <tr>
            <td><a href="exam.php?qid=2" target="_blank"><b>Consulting Engineering Environment & Interpersonal Skills</b></a></td>
            <td>09:00</td>
            <td>10:45</td>
        </tr> -->
        <!-- <tr>
            <td><a href="exam.php?qid=3" target="_blank"><b>Finance</b></a></td>
            <td>09:00</td>
            <td>10:45</td>
        </tr> -->
        <!-- <tr>
            <td><a href="exam.php?qid=4" target="_blank"><b>Law</b></a></td>
            <td>13:30</td>
            <td>15:15</td>
        </tr> -->
        <?php if (count($upcomingExamList) > 0) { ?>
            <?php foreach ($upcomingExamList as $exam) {
                $examIsAccessible = $exam["IsAvailableNow"] || isTestStudent($_SESSION["StudentID"]);
            ?>
                <tr>
                    <td colspan="2">
                        <?php if ($examIsAccessible) { ?>
                            <a href="exam.php?qid=<?php echo intval($exam["Questionnaire_ID"]); ?>" target="_blank"
                            ><h5><?php echo htmlspecialchars($exam["ExamDisplayTitle"]); ?></h5></a>
                        <?php } else { ?>
                            <h5><?php echo htmlspecialchars($exam["ExamDisplayTitle"]); ?></h5>
                        <?php } ?>
                    </td>
                </tr>
                <tr>
                    <td><h6>Starts: <?php echo $exam["StartTimeDisplay"]; ?></h6></td>
                    <td><h6>Ends: <?php echo $exam["EndTimeDisplay"]; ?></h6></td>
                </tr>
            <?php } // foreach ?>
        <?php } else { ?>
            <tr>
                <td colspan="3">No upcoming exams available.</td>
            </tr>
        <?php } ?>
    </table>
    
    <p>
        <b>
            Click the module name to open the exam. You will not be able to access the questions until the start 
            time of the exam.
        </b>
    </p>

    <?php if (false && count($markedExamList) > 0) { ?>
        <details>
            <summary><b>Marked Exams</b></summary>
            <br>
            <table border=1 cellspacing=0 cellpadding=5 width="50%">
                <tr>
                    <th colspan="2"><b>Module</b></th>
                </tr>
                <tr>
                    <td><b>Start Time</b></td>
                    <td><b>End Time</b></td>
                </tr>
                <?php foreach ($markedExamList as $exam) { ?>
                    <tr>
                        <td colspan="2">
                            <a href="exam.php?qid=<?php echo intval($exam["Questionnaire_ID"]); ?>" target="_blank"
                            ><h3><?php echo htmlspecialchars($exam["ExamDisplayTitle"]); ?></h3></a></td>
                    </tr>
                    <tr>
                        <td><h6><?php echo $exam["StartDateDisplay"]; ?></h6></td>
                        <td><h6><?php echo $exam["CloseDateDisplay"]; ?></h6></td>
                    </tr>
                <?php } ?>
            </table>
        </details>
    <?php } ?>
    <p><b>Online Exam Instructions</b></p>
    <p>A list of questions is displayed on the left. Click on any question to read the question, a block is provided for you to type in your answer.</p>
    <p>As you begin answering questions, the status of the question on the left will change to "in progress" or "completed".</p>
    <p>You do not need to complete the questions in order, you may click on any question on the left to move between questions.</p>
    <p>You can save your answer in one of two ways:
    <ul>
        <li>Click "Save as In Progress" to save your changes but label the question "in progress" on the left</li>
        <li>Click "Submit" to save your changes and label the question "completed" on the left</li>
    </ul>
    <p>In case of loss of connectivity, your answers are also auto-saved every 60 seconds as you type.</p>
    <p>If your internet connection is interrupted, or you see a blank screen, refresh the exam screen. 
        If you are linked to a company's VPN, or company network, the company's internet policy might interfere with 
        your exam. If you experience any issues, disconnect form your company's network or VPN and connect via a 
        normal internet connection.
    </p>
    <p>Note: the "completed" / "in progress" status of your questions is only to aid you in managing your time and tracking your progress.</p>
    <ul>
        <li>Questions marked "completed" <u>can still be edited by you</u></li>
        <li>Questions that are left as "in progress" at the end of the exam <u>will still be marked</u>, you do not need to change all the questions to "completed".</li>
    </ul>
    <p><b>Rules:</b>
    <ul>
        <li>105 minutes has been allocated to complete the questions.</li>
        <li>The maximum score is 100 marks.</li>
        <li>You may not copy and paste from any source into the answer block.</li>
    </ul>
    <hr>
<?php
} else {
    header("Location: /cesanet/calendar.php");
}
/*
  ?>
  <h1> Control Panel</h1>
  <?php
  $bCurrentStudent = CurrentStudent();
  if ($bCurrentStudent) {
  ?>
  <h2 class="boldblue">You are enrolled for the following programme:</h2>
  <p><strong>Business of Consulting Engineering (BCE)</strong></p>
  <table width="594" border="0" cellpadding="5" cellspacing="0" class="tablebtmborder">
  <?php
  $sql = "SELECT CCESessions.CCESessionName, CCESessionSchedules.StartDate, CCESessionSchedules.EndDate
  FROM CCESessions, CCESessionSchedules WHERE CCESessions.CCESessionID=CCESessionSchedules.CCESessionID
  AND CCESessionSchedules.StartDate >= '" . date("Y") . "-01-01' ORDER BY StartDate ASC LIMIT 0,3";
  $rec = mysql_query($sql);
  while ($row = mysql_fetch_assoc($rec)) {
  ?>
  <tr>
  <td width="300"><strong><?php echo $row["CCESessionName"]; ?></strong></td>
  <td><?php
  echo date("j M", strtotime($row["StartDate"])) . " - " . date("j M", strtotime($row["EndDate"]));
  ?></td>
  </tr>
  <?php
  }
  ?>
  </table>
  <hr />
  <?php
  }
  ?>
  <h2 class="boldblue">You <?php echo $bCurrentStudent ? "are" : "were"; ?> studying the following modules:</h2>
  <table width="598" border="0" cellpadding="5" cellspacing="0" class="tablebtmborder">
  <tr>
  <td width="300"><strong>Consulting Engineering Environment</strong></td>
  <td><a href="module.php?id=1">Module Information</a><br />
  <a href="library.php#mod1">Reading Library</a><br />

  <a href="modcontact.php?id=1">Send Message</a></td>
  </tr>
  <tr>
  <td><strong>Project Delivery</strong></td>
  <td><a href="module.php?id=2">Module Information</a><br />
  <a href="library.php#mod2">Reading Library</a><br />

  <a href="modcontact.php?id=2">Send Message</a></td>
  </tr>
  <tr>
  <td><strong>Law</strong></td>
  <td><a href="module.php?id=4">Module Information</a><br />
  <a href="library.php#mod4">Reading Library</a><br />

  <a href="modcontact.php?id=4">Send Message</a></td>
  </tr>
  <tr>
  <td><strong>Finance</strong></td>
  <td><a href="module.php?id=3">Module Information</a><br />
  <a href="library.php#mod3">Reading Library</a><br />

  <a href="modcontact.php?id=3">Send Message</a></td>
  </tr>
  </table>
  <?php
 *
 */
include_once($_SERVER['DOCUMENT_ROOT'] . "/cesanet/includes/html_end.php");