Note: You are currently viewing documentation for Moodle 4.0. Up-to-date documentation for the latest stable version of Moodle may be available here: Voice/GsocFormslibExercise.

Development:Voice/GsocFormslibExercise: Difference between revisions

From MoodleDocs
No edit summary
 
No edit summary
Line 1: Line 1:
{{Voice}}
{{Moodle 2.0}}
# '''Write a form using the [http://moodle.cvs.sourceforge.net/moodle/moodle/lib/formslib.php?view=markup Formslib class] and its  [[Development:lib/formslib.php|documentation]].'''
# '''Write a form using the [http://moodle.cvs.sourceforge.net/moodle/moodle/lib/formslib.php?view=markup Formslib class] and its  [[Development:lib/formslib.php|documentation]].'''
## '''Date limit''': 8th April 2007
## '''Date limit''': 8th April 2007

Revision as of 08:21, 2 April 2007

Template:Voice Template:Moodle 2.0

  1. Write a form using the Formslib class and its documentation.
    1. Date limit: 8th April 2007
    2. There should be two files: example.php and example_form.php
      1. example.php: It should invoke the form the first time called. If the form is the caller, then just present the parameters and their values on screen (to test if it has worked).
      2. example_form.php: The form itself. It should be a class that extends "moodleform" from "formslib.php". Note that this file should not be invoked from the browser.
    3. The form should have the next fields
      1. name: max 20 chars, obligatory
      2. password: max 20 chars, it should be presented with asterisks, obligatory
      3. comment: textfield, max 250 chars, optional
    4. You can use the next examples (and all you can find) from the Moodle CVS:
      1. http://moodle.cvs.sourceforge.net/moodle/moodle/login/signup.php?view=markup
      2. http://moodle.cvs.sourceforge.net/moodle/moodle/login/signup_form.php?view=markup
      3. http://moodle.cvs.sourceforge.net/moodle/moodle/login/change_password.php?view=markup
      4. http://moodle.cvs.sourceforge.net/moodle/moodle/login/change_password_form.php?view=markup
      5. http://moodle.cvs.sourceforge.net/moodle/moodle/login/forgot_password.php?view=markup
      6. http://moodle.cvs.sourceforge.net/moodle/moodle/login/forgot_password_form.php?view=markup
    5. FAQ
      1. Do I have to install the whole Moodle? No, just use the formslib.php file and any other if needed.
      2. Do I need any tools? You can use any tools as you need. In the project we will work probably with Eclipse and phpEclipse, although it can be discussed.
      3. Can I strip down the formslib.php file so it doesn´t have any references to other Moodle files? Yes you can, although you should state somewhere the changes so I can see them.
      4. Do it needs to work? Well, let´s just say that if it works, it gets more points. :)
      5. Where do I find the Moodle CVS? Here is the Moodle CVS
    6. At the end, you can either send me the files with two screenshots of them running (the first time called and second time called) or you can set it up in your webserver so I can see them running, plus a zip or tar.gz file with the files so I can download them.