Assistance Required for Implementing Admissions Test Feature in Gibbon

My team and I are currently working on developing a new feature for the Gibbon school management system, specifically aimed at enhancing the admissions process.
This feature, named “Admissions Test,” includes functionalities for managing admissions tests and their associated questions.
#Feature Overview:

  1. Admissions Tests Management:
  • Ability to create, edit, and delete admissions tests.
  • Fields include test name, description, active status, and file upload allowance.
  1. Admissions Test Questions Management:
  • Ability to add, edit, and delete questions for each admissions test.
  • Fields include question text, type (Multiple Choice, True/False, Short Answer), grade level, section, and question order.

Database Tables:

We have created two new tables in the database:

  1. gibbonAdmissionTest
  2. gibbonAdmissionTestQuestion
    These tables are linked with a foreign key relationship to manage the test questions associated with each admissions test.

Issue:

Despite successfully creating the necessary tables and implementing the required code files, we have encountered an issue with granting permissions to system administrators to use this new feature. The permissions for managing admissions tests and their questions are not appearing in the roles and permissions interface.

Error Message:

When attempting to access the feature, we receive the following error message:

Warning: require_once(../../[gibbon.php](http://gibbon.php/)): Failed to open stream: No such file or directory in modules/admissionTests/[admissionTests_manage.php](http://admissiontests_manage.php/) on line 34
Uncaught Exception: Error - Failed opening required '../../[gibbon.php](http://gibbon.php/)' (include_path='.:/opt/alt/php83/usr/share/pear:/opt/alt/php83/usr/share/php:/usr/share/pear:/usr/share/php')
Line 34 in modules/admissionTests/[admissionTests_manage.php](http://admissiontests_manage.php/)
Line 87 in src/View/[View.php](http://view.php/)
Line 478 in src/View/[Page.php](http://page.php/)
Line 722 in [index.php](http://index.php/)

Actions Taken:

  1. Added Tables: Created gibbonAdmissionTest and gibbonAdmissionTestQuestion tables with the necessary schema.
  2. Implemented Code Files: Developed the necessary PHP files for managing admissions tests and their questions.
  3. Manifest File: Updated the [manifest.php](http://manifest.php/) file to include the new permissions.
  4. Permissions Insert: Executed SQL queries to insert the new permissions into the gibbonAction table.

Request:

We would greatly appreciate your guidance on resolving the following issues:

  1. Ensuring that the permissions for managing admissions tests and questions appear correctly in the roles and permissions interface.
  2. Correcting the file inclusion error to ensure the proper functionality of the feature.

Thank you for your time and support.
We look forward to your valuable input to help us successfully integrate this new feature into the Gibbon system.
Best regards,
Bachar AlMohammad AlKhalaf
AY TeamLeader
+963-947075410
Ugarit Virtual School

Hi Bachar, welcome to the Gibbon community. My apologies for the delay in a response, as your post came in during our summer break in HK.

It looks like you’ve already made some great headway getting your new module created. I’d be happy to offer some suggestions here, and you’d also be welcome to join our developer Slack channel, just email support@gibbonedu.org to let us know if you’d like to join.

From the error, it appears you may be using the include '../../gibbon.php'; on a user-facing page, which may be the source of the error. Since Gibbon runs user-facing pages through index.php, all of the required files are included by default. Only the process pages will require the gibbon.php include to bootstrap them.

For permissions, there are two levels to them: one is the action which goes in the gibbonAction table, and determines what shows up in Gibbon menus. Then, a gibbonPermission entry determines which roles have permission to that action. After adding an action to the database, when you use User Admin > Manage Permissions, you can click the checkboxes, which will add permissions to these actions.