Coder Social home page Coder Social logo

moodle-qtype_template's Introduction

Question type template

A simple question type template.

It is a copy of the shortanswer question type with everything unnecessary removed and :

  • countback grading
  • hints
  • question text
  • no grading implemented at all
  • no input controls at all in question as yet
  • it doesn't install any new tables

###Who should use

This is one alternative start for devloping a question type plug in and is working code as is. Although it doesn't do any actual grading or collect student input at all.

Depending on what type of question plug in you want to develope it might be good to either :

  • use one of the existing question types that is doing something similar to what you want to do as a base, copy that, have fun deleting no longer needed code and you then have a template to start from.
  • or if possible to avoid code duplication it is better to extend existing classes, particularly for the question type and question classes. There are quite a few examples of queston types that do this at https://github.com/moodleou/. for example classes in ddimageortext and ddmarker both inherit from common code in ddimageortext and those inherit code from the gapselect question type
  • or this code might help start you off.

###Installation

####Installation Using Git

To install using git for the latest version (the master branch), type this command in the root of your Moodle install:

git clone git://github.com/jamiepratt/moodle-qtype_TEMPLATE.git question/type/TEMPLATE
echo '/question/type/TEMPLATE' >> .git/info/exclude

####Installation From Downloaded zip file

Alternatively, download the zip from :

unzip it into the question/type folder, and then rename the new folder to TEMPLATE.

####Doesn't get installed as long as it is called TEMPLATE

You can keep a copy of the template in Moodle in the question/type/ folder and as long as it is called TEMPLATE the plug in will be ignored.

###Use

  • Copy or rename the module directory to YOURQTYPENAME.
  • Replace all occurances of YOURQTYPENAME in files with the new name for your question type.
  • Rename files that have YOURQTYPENAME replacing YOURQTYPENAME with the new name for your question type.
  • Replace '@copyright THEYEAR YOURNAME (YOURCONTACTINFO)' with something like @copyright 2013 Jamie Pratt ([email protected])
  • See http://docs.moodle.org/dev/Question_types for more info on how to create a question type plug in. Please add to it where you can.

moodle-qtype_template's People

Contributors

jamiepratt avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.