Пример #1
0
$settingsTools = new SettingsTools();
$sort = 'name';
if (isset($_GET['sort'])) {
    $sort = $_GET['sort'];
}
if (HttpSession::currentUser()->getOrganization()->access_level > 2) {
    $technology = explode('_', $_GET['technology']);
}
//print_r($technology);
if (isset($_GET['batch']) && $_GET['batch'] == "level_2") {
    $batch = "level_2";
    $batchId = $settingsTools->getLevelTwoId();
} else {
    if (isset($_GET['batch']) && $_GET['batch'] == "level_3") {
        $batch = "level_3";
        $batchId = $settingsTools->getLevelThreeId();
    } else {
        if (isset($_GET['batch']) && $_GET['batch'] == "level_1") {
            $batch = "level_1";
            $batchId = $settingsTools->getLevelOneId();
        } else {
            $batch = "level_4";
            $batchId = $settingsTools->getLevelFourId();
        }
    }
}
$students = $studentTools->getStudentViewModels($batchId, $sort, $technology);
/* * *********************Sorting Students*********************************** */
if (isset($_GET['sort']) && $_GET['order_by'] == "gpa") {
    usort($students, "gpa_sort");
} else {
Пример #2
0
                            <td><label for="duration">Duration</label></td>
                            <td><input type="text"  size="10" id="duration" name="duration" placeholder="Optional"> mins<br/></td>
                        </tr>
                        
                        <tr>
                            <td><label for="batch">Target Batches: </label></td>
                            <td>
                                <?php 
$settingsTools = new SettingsTools();
?>
                                <input type="checkbox" name="batch[]" value="<?php 
echo $settingsTools->getLevelFourId();
?>
"> Level 4</input>&nbsp;&nbsp;
                                <input type="checkbox" name="batch[]" value="<?php 
echo $settingsTools->getLevelThreeId();
?>
"> Level 3</input>&nbsp;&nbsp;
                                <input type="checkbox" name="batch[]" value="<?php 
echo $settingsTools->getLevelTwoId();
?>
"> Level 2</input>&nbsp;&nbsp;
                                <input type="checkbox" name="batch[]" value="<?php 
echo $settingsTools->getLevelOneId();
?>
"> Level 1</input>&nbsp;&nbsp;
                            </td>
                        </tr>
						<?php 
if (HttpSession::currentUser()->getOrganization()->access_level > 4) {
    ?>