Beispiel #1
0
<?php

require $_SERVER["DOCUMENT_ROOT"] . '/vendor/autoload.php';
use SMS\App\Modules\PrepareResult\Controller\PrepareResultController as PrepareResult;
$view = new PrepareResult();
$subjects = $view->getSubjects();
$classes = $view->getClasses();
?>
  <div class="box box-default">
    <div class="box-header with-border">
      <h3 class="box-title">Process students scores</h3>
      <h3 class='pull-right' id="currentInfo">
      </h3>
      <input class="bar" type="range" id="rangeinput" value="4" min="2" max="12"/>
      <div class="box-tools pull-right">
        <button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
        <button class="btn btn-box-tool" data-widget="remove"><i class="fa fa-remove"></i></button>
      </div>
    </div><!-- /.box-header -->
    <div id="BODYCONTENT">
    <form id="StudentForm">
    <div class="box-body">
      <div class="row">
      <div class='col-md-12 FORMSIZE'>
      <div class='form-group'>
       <label>Class Name</label>
        <select class="form-control select2" data-placeholder="Type a name or click the dropdown to begin" style="width: 100%;" name="class">
          <?php 
foreach ($classes as $class) {
    $id = $class[0];
    $name = $class[1];
<?php

require $_SERVER["DOCUMENT_ROOT"] . '/vendor/autoload.php';
use SMS\App\Modules\PrepareResult\Controller\PrepareResultController as PrepareResult;
$view = new PrepareResult();
$subject = $_GET["subject"];
$class = $_GET["class"];
$view->processSubject($subject, $class);
$students = $view->result_processor->getStudentsBySubject($subject, $class);
$studentArray = array();
foreach ($students as $student) {
    $studentArray[] = $view->result_processor->getStudentName($student);
}
$assessments = $view->result_processor->getAssessmentTitle();
echo "<input type='hidden' id='CURRENTSUBJECT' value='" . $subject . "' name='" . $view->result_processor->getSubjectName($subject)["subject_name"] . "'/>";
echo "<input type='hidden' id='CURRENTCLASS' value='" . $class . "' name='" . $view->result_processor->getClassName($class)["class_name"] . "'/>";
?>
<table id="example1" class="table table-bordered">
<thead>
  <tr>
    <th class="success" style="width: 200px !important">Student Name</th>
   <?php 
foreach ($assessments as $assessment) {
    echo "<th class='info'>" . $assessment[1] . " <i class='pull-right badge badge-info'><small>" . $assessment[2] . " marks</small><i></th>";
}
?>
   <th class="active">Total</th>
   <th class="danger">Position</th>
  </tr>
</thead>
<tbody>
<?php

require $_SERVER["DOCUMENT_ROOT"] . '/vendor/autoload.php';
use SMS\App\Modules\PrepareResult\Controller\PrepareResultController as PrepareResult;
$view = new PrepareResult();
$class = $_GET["class"];
$students = $view->processMasterSheet($class);
echo "<input type='hidden' id='CURRENTCLASS' value='" . $class . "' name='" . $view->result_processor->getClassName($class)["class_name"] . "'/>";
?>

<br/><center><h1>PROCESSING COMPLETE</h1></center></br>
<script>
    $("#example1").DataTable();
    var string = 
        "<form class='form-horizontal'>"+
            "<div class='box-body'>"+
              "<div class='form-group has-success'>"+
                "<label for='' class='col-sm-2 control-label'>Class</label>"+
                "<div class='col-sm-4'>"+
                  "<input value='"+$("#CURRENTCLASS").attr("name")+"' class='form-control' disabled='disabled'>"+
                "</div>"+
              "</div>"+
            "</div>"+
          "</form>";
    $("#currentInfo").html(
            string
      );
</script>
<?php

require $_SERVER["DOCUMENT_ROOT"] . '/vendor/autoload.php';
use SMS\App\Modules\PrepareResult\Controller\PrepareResultController as PrepareResult;
$view = new PrepareResult();
$subject = $_GET["subject"];
$class = $_GET["class"];
$students = $view->batchProcessSubject($subject, $class);
echo "<input type='hidden' id='CURRENTCLASS' value='" . $class . "' name='" . $view->result_processor->getClassName($class)["class_name"] . "'/>";
?>

<br/><center><h1>PROCESSING COMPLETE</h1></center></br>
<script>
    $("#example1").DataTable();
    var string = 
        "<form class='form-horizontal'>"+
            "<div class='box-body'>"+
              "<div class='form-group has-success'>"+
                "<label for='' class='col-sm-2 control-label'>Subject</label>"+
                "<div class='col-sm-4'>"+
                  "<input value='"+$("#CURRENTSUBJECT").attr("name")+"' class='form-control' disabled='disabled'>"+
                "</div>"+
                "<label for='' class='col-sm-2 control-label'>Class</label>"+
                "<div class='col-sm-4'>"+
                  "<input value='"+$("#CURRENTCLASS").attr("name")+"' class='form-control' disabled='disabled'>"+
                "</div>"+
              "</div>"+
            "</div>"+
          "</form>";
    $("#currentInfo").html(
            string
Beispiel #5
0
<?php

require $_SERVER["DOCUMENT_ROOT"] . '/vendor/autoload.php';
use SMS\App\Modules\PrepareResult\Controller\PrepareResultController as PrepareResult;
$view = new PrepareResult();
$classes = $view->getClasses();
?>
  <div class="box box-default">
    <div class="box-header with-border">
      <h3 class="box-title">Process Master Sheet</h3>
      <h3 class='pull-right' id="currentInfo">
      </h3>
      <input class="bar" type="range" id="rangeinput" value="4" min="2" max="12"/>
      <div class="box-tools pull-right">
        <button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
        <button class="btn btn-box-tool" data-widget="remove"><i class="fa fa-remove"></i></button>
      </div>
    </div><!-- /.box-header -->
    <div id="BODYCONTENT">
    <form id="StudentForm">
    <div class="box-body">
      <div class="row">
      <div class='col-md-12 FORMSIZE'>
      <div class='form-group'>
       <label>Class Name</label>
        <select class="form-control select2" data-placeholder="Type a name or click the dropdown to begin" style="width: 100%;" name="class">
          <?php 
foreach ($classes as $class) {
    $id = $class[0];
    $name = $class[1];
    echo "<option value='" . $id . "'>" . $name . "</option>";