sandra

About

Username
sandra
Joined
Visits
2,558
Last Active
Roles
Administrator
Points
503
Preferred Name
Sandra
  • Custom Alerts on Student Profile

    Hi Victoria,

    As luck would have it I was asked for the exact same change recently for two of the schools I help support. Our solution was to use the Day Type option to add types for Full, Distance, and Hybrid (for their use-cases). Then, we added a purple D tag to the student alerts for any student that was not Full. Here's the code, which you can add to functions.php around line 1046:
     // Get Person Data
            try {
                $dataPersonField = array('gibbonPersonID' => $gibbonPersonID);
                $sqlPersonField = 'SELECT fields, dayType FROM gibbonPerson WHERE gibbonPersonID=:gibbonPersonID LIMIT 1';
                $resultPersonField = $connection2->prepare($sqlPersonField);
                $resultPersonField->execute($dataPersonField);
            } catch (PDOException $e) {}
    
            $rowPersonField = ($resultPersonField->rowCount() > 0) ? $resultPersonField->fetch() : [];
    
    
            // Day-type Options
            $dayTypeOptions = getSettingByScope($connection2, 'User Admin', 'dayTypeOptions');
            if (!empty($dayTypeOptions) && !empty($rowPersonField['dayType']) && $rowPersonField['dayType'] != 'Full') {
                $alerts[] = [
                    'highestLevel'    => __('Day Type'),
                    'highestColour'   => '7f67a2',
                    'highestColourBG' => 'ebdcf9',
                    'tag'             => __('D'),
                    'title'           => sprintf(__('Day Type: %1$s'),$rowPersonField['dayType']),
                    'link'            => './index.php?q=/modules/Students/student_view_details.php&gibbonPersonID='.$gibbonPersonID,
                ];
            }
    
    Hope this helps! If there's enough interest, maybe we can make it into a core setting.
    adminmeierromEinsteinSchool
  • Add Value in Dropdown Box

    Hi vishalr,

    I've taken a look at the relationship options and I think these would be good options to add to Gibbon. The goal for emergency contacts is to list people who are not already parents or family members listed in Gibbon, so grandparents would be a good option to have.

    I've made this change in the v21 development branch, which you can see here: https://github.com/GibbonEdu/core/commit/19efcc276d2502a93b08a2a206fb330e2bc77ccc You can apply the change to your own install by making the same code changes to src/Forms/FormFactory.php

    Thanks!
    meierromvishalr
  • Database table structure in gibbon

    Gibbon is not using transactions yet, as Ross mentioned we've recently switched from MyISAM to InnoDB and transactions were not previously supported. There are limitations to transactions for parts of the system like running updates (transactions implicitly commit when making table alterations), but there are other areas of the system we hope to eventually add transactions to.
    rthunoli