Programming 103
Time N/A

Difficulty Outrageous
Prerequisites Data Structures
Programming 102
Departments Human Technologies
Authors Ross Parker
Groupings Individual
Pairs
Minimum Year Group None

Blurb

Now that you have some programming basics, it is time to put it to good use by designing and building your own open source Gibbon module. Remember, this is an outrageously difficult unit.

License

This work is shared under the following license: Creative Commons BY-SA-NC

Outline

The Pitch
Why should I bother learning this?
  • Gibbon is your system: make it better!
  • Think about something that you, or other students, would love to have in Gibbon.
  • And then build it.
Resources
What is needed to run this unit?
  • Laptop
  • Internet access
  • Web server software (e.g. MAMP)
  • Text editor (e.g. TextWrangler, Atom)
  • Firefox, the browser with the best developer tools.
Interdisciplinary Links
Do not try and force this. What areas of other subjects might this reflect and/discuss language. For IB, links with ToK.
  • ...
Teacher Reflection
What was successful? What needs changing? Alternative Assessments and Lesson Ideas? What other Differentiation Ideas/Plans could be used?
  • This has worked well in ENF, so a good chance to make it available to other keen students. It is very difficult.
Credits
Any CC attribution, thanks, credit, etc.

This page requires you to be logged in to access it. Please login and try again.
Your Gibbon
The Pitch

  • Gibbon is your system: make it better!
  • Think about something that you, or other students, would love to have in Gibbon.
  • And then build it.

Killer Module
Ideas!
  • Before you start coding your Gibbon module, you need to come up with an idea for what it is going to do.
  • What you need to find is something:
    • People want to use.
    • Does not already exist in Gibbon.
    • Is within your power to build.
  • An example would be a Glossary module, where students can store words that they find useful, along with a link and definition. Terms in the glossary would be organised by course or department and year group, allowing students to use it for studying.
  • What is it that you want Gibbon to do?
  • Don't move on until you have a firm idea on this.
Setting Up Your Dev Environment
Getting Ready
  • When software developers work, they use a development (or dev) environment. This includes the software needed to write and run the project they are working on.
  • Gibbon is web-based, and so you need to turn your computer into a web server. There are many ways to install these servers, and it will depend on what type of computer you are using
    • To install the stack of software necessary for web development and website deployment, refer to this document.
Installing Gibbon
Getting Ready
  • With your dev environment ready, you can now install Gibbon by doing the following:
    • Download and unzip Gibbon from gibbonedu.org, making sure to get the Cutting Edge code instead of the stable release.
    • Move the unzipped version of Gibbon to /Applications/MAMP/htdocs on your computer.
    • Point your web browser to http://localhost, and you should be able to access your Gibbon installation.
    • Follow the on screen instructions to install Gibbon, setting:
      • Database name to anything you like (avoid spaces, capitals, etc)
      • Database username to root (this is Linux-speak for super user or admin)
      • Database password to root (this is the default for MAMP, and not very secure)
      • Opt to include demo data, as this will make it easier to use the system.
      • Opt to use the Cutting Edge code during the installation.
  • Once the installation is completed, use the link provided to get back to your Gibbon install's login screen.
  • Make sure you can login to your new system.
Starting Your Module
Hands On
  • A Gibbon module is a set of files contained in a folder.
  • You can download the official Gibbon starter module to help you get started.
  • The starter module contains the following files:
    • CHANGEDB.php – stores database changes for each version of the module, used in upgrades.
    • CHANGELOG.txt – list of changes per version
    • css/module.css – CSS file loaded up by the core for the module, allowing for per-module styling
    • img – a space to store any images for the module
    • index.php – a sample landing page. Replace isModuleAvailable() with isActionAvailable() if you want to test for access to a specific action rather than the whole system.
    • js/module.js – JavaScript file loaded up by the core for the module, allowing for per-module scripting
    • manifest.php – used to install the software, creates all actions, permissions, tables, settings, etc
    • moduleFunctions.php – a place for any module-specific PHP functions
    • version.php – the version number for the code (as opposed to the database version number, the difference between is used in the upgrade progress).
  • You will want to edit at least the ones in red in order to get your file off the ground.
  • Make sure the folder containing your module has the same name you give the file in manifest.php
  • Insert your module folder into your Gibbon installation in the /modules folder.
  • Log in to Gibbon and go to Admin > System Admin > Manage Modules. Your module should be listed here, and you should be able to install it.
  • After installing, your module should appear in the main menu bar.
  • Now...to make your module do something.
Building It
Hands On
  • Your module will probably need the following if it is to be useful:
    • Actions - these say who can do what
    • PHP files - these contain the code that make things happen
    • Database tables - these are where your data will be stored. Convention says your table names should start with the name of your module in camel case.
      • So, for example, a module called Awesome Stuff with a table storing stuff, would be called awesomeStuffStuff. Makes sense!
  • Your module may also want to hook into the core system (e.g. make something appear in the student profile).
  • For installing your module, you will need to keep manifest.php up to date.
  • For updating your module, you will need to keep CHANGEDB.php up to date, but it need not include the first first (which cannot, by definition, be updated).
  • Other than this advice, you will need to use trial and error to see what you can do.
  • Make sure to check any of the Gibbon core code for inspiration: it is all open source, so you can copy and paste as much as you like.
  • Good luck!

Share It!
Finishing Up
  • Your module files should have the same GNU GPL license in place that the original files came with: this means your module is open source.
  • Sign up to GitHub and create a repository for your module.
  • Use the GitHub desktop app to sync your module to your repository (aka repo).
  • Submit the link to your repo as evidence of your learning in this unit.
There are no records to display.
Powered by Gibbon v27.0.00dev

Founded by Ross Parker at ICHK Secondary | Built by Ross Parker, Sandra Kuipers and the Gibbon community
Copyright © Gibbon Foundation 2010-2024 | Gibbon™ of Gibbon Education Ltd. (Hong Kong)
Created under the GNU GPL | Credits | Translators | Support