Example #1
0
// data and variables
// prepare filter fields
$ffst = Student::filterFields();
$fftst = Test::filterFields();
$ffs = array_merge($ffst, $fftst);
// fields we don't need here:
unset($ffs['gender']);
unset($ffs['status']);
// additional fields
$tempStd = new Student();
$ffs['person_id'] = new FilterField($tempStd->person_id);
//$ffs['first_name'] = new FilterField($tempStd->first_name);
//$ffs['last_name'] = new FilterField( $tempStd->last_name);
$ffs['roll_num'] = new FilterField($tempStd->roll_num);
unset($tempStd);
$filterOptions = new FilterOptions($ffs);
$students = $filterOptions->getRecords('Student');
$testObjects = $filterOptions->getRecords('Test');
//pr($filterOptions);
$testRecords = Student::testRecordsAll($students, $testObjects);
?>

<?php 
echo $filterOptions->markup();
?>

<?php 
if ($testObjects && $students && $testRecords) {
    echo "<div id='stReptMainCntnr' class='row'>";
    echo "<div class='col-lg-6 col-lg-offset-3 col-sm-12'>";
    // make tests editable:
Example #2
0
require_once "html_components/clearLogHandler.php";
// must require a classname
if (!isset($_GET['classname'])) {
    show404();
}
// handle heads selection Request
if (isset($_POST['heads'])) {
    foreach ($_POST['heads'] as $key => $value) {
        $heads[] = $key;
    }
    $curPage->saveConfig('heads', $heads);
}
// data and variables
$classname = $_GET['classname'];
// data for filter options:
$filterOptions = new FilterOptions($classname::filterFields());
//pr($filterOptions);
// data for headsToDisplayMarkup.php
$headsToDisplay = $classname::reportHeads();
// data for list_reportMarkup.php
$curPage->saveConfig('pagination', true);
$records = $filterOptions->getRecords($classname);
$visibleHeads = $curPage->getConfig('heads');
if (empty($visibleHeads)) {
    $visibleHeads = $classname::visibleReportHeads();
}
?>

<h2><?php 
echo $currentPageTitle;
?>
Example #3
0
<?php

require_once 'html_components/require_comps_start.php';
?>

<?php 
// handle post requests
require_once "html_components/records_post_handler.php";
// data and variables
$classname = 'Class_attendance_record';
$filterOptions = new FilterOptions(Class_attendance_record::filterFields());
$class = new Clas($filterOptions->filterFields['class_id']->val);
$config = !empty($filterOptions->filterFields['section']->val) ? array('condition' => "section = '" . $filterOptions->filterFields['section']->val . "'") : array();
$students = $class->students($config);
$classAttendanceRecs = $filterOptions->getRecords($classname);
?>

<h2><?php 
echo $currentPageTitle;
?>
</h2>

<?php 
echo $filterOptions->markup();
?>

<?php 
if ($classAttendanceRecs && $students) {
    // prepare heads
    $heads = array('date', 'total_lectures');
    $headArrays = array();
Example #4
0
<?php

require_once 'html_components/require_comps_start.php';
// data for filter options:
$filterOptions = new FilterOptions(Student::filterFields());
$students = $filterOptions->getRecords('Student');
?>

<h2><?php 
echo $currentPageTitle;
?>
</h2>
<?php 
echo $filterOptions->markup();
?>

<?php 
// handle post request
if (isset($_POST['apply'])) {
    //prpost();
    if (!isset($_POST['student_ids'])) {
        $html->echoError("Please select students");
    } elseif (!isset($_POST['months'])) {
        $html->echoError("Please select months");
    } else {
        foreach ($_POST['student_ids'] as $stId) {
            $student = $students[$stId];
            $class = $student->clas();
            foreach ($_POST['months'] as $m) {
                // check if a voucher is already present for that month
                // if not present, add a new fee voucher
Example #5
0
<?php

require_once 'html_components/require_comps_start.php';
?>

<?php 
// handle post requests
require_once "html_components/records_post_handler.php";
// data and variables
$classname = 'Test';
$filterOptions = new FilterOptions($classname::filterFields());
$class = new Clas($filterOptions->filterFields['class_id']->val);
$config = !empty($filterOptions->filterFields['section']->val) ? array('condition' => "section = '" . $filterOptions->filterFields['section']->val . "'") : array();
$students = $class->students($config);
$testObjects = $filterOptions->getRecords($classname);
$testRecords = Student::testRecordsAll($students, $testObjects);
?>

<h2><?php 
echo $currentPageTitle;
?>
</h2>

<?php 
echo $filterOptions->markup();
?>

<?php 
if ($testObjects && $students && $testRecords) {
    // prepare heads
    $heads = array('subject_id', 'syllabus', 'date', 'max_marks');