Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Progressive Disclosure Implementation: Difference between revisions

From MoodleDocs
mNo edit summary
Line 33: Line 33:


''Please fill in, copying information as necessary from [[Development_talk:Progressive_Disclosure#Examples]]'', specifying the Moodle version(s) where this information applies.
''Please fill in, copying information as necessary from [[Development_talk:Progressive_Disclosure#Examples]]'', specifying the Moodle version(s) where this information applies.
== Search and Advanced search of forums ==
Change to another page with further options if the user clicks "advanced search".
* Simple search: the "search forum" form http://moodle.org/mod/forum/view.php?id=737
** Simple search results (with link to advanced search): http://moodle.org/mod/forum/search.php?search=sweet&id=5
*** Advanced search form:http://moodle.org/mod/forum/search.php?id=5&user=&userid=0&forumid=0&subject=&phrase=&words=&fullwords=&notwords=&dateto=0&datefrom=0&showform=1
**** (Advanced search results: http://moodle.org/mod/forum/search.php?id=5&words=not&phrase=any&notwords=&fullwords=&hfromday=1&hfrommonth=1&hfromyear=1&hfromhour=1&hfromminute=1&htoday=1&htomonth=1&htoyear=1&htohour=1&htominute=1&forumid=0&subject=&user=)
== Search options ==
Roles UI (Moodle 2.0). Javascript implementation. When "Search options" is clicked, reveals three checkboxes. Go to a module, such as a forum, in a course, click Update module, click Check permissions. URL of form is /admin/roles/check.php?contextid=X .

Revision as of 14:06, 25 June 2009

Implementation instructions for Progressive Disclosure

Note: This page is a work-in-progress. Feedback and suggested improvements are welcome. Please join the discussion on moodle.org or use the page comments.

To give new developers a head start, add advice here on how to implement the recommended elements. (Of course, the APIs should be good enough to not require lots of extra code.)

As an usability practitioner, the implementation pages like this are where I am hoping to have developers have a play: there is probably some documentation available already about how to implement many of these things, but the developers who are already 'in' know how to find it best.

So add links to appropriate places - or if need be, implementation pages like this are perfect placeholders to put also new information about how to implement the recommended moodle UI elements. --Olli Savolainen 22:20, 3 June 2009 (UTC)


Simple progressive disclosure in a form

the form before pressing the "show advanced" button
the form after pressing the "show advanced" button

This will store the information in a session, about in which state the form was left, so if you press the 'Show advanced' button once, you will see the advanced controls shown anytime you come back to the form.

How to access this screen

  • Create a quiz in a course, and open it. The configuration form will be shown
  • Alternatively, open an existing quiz as a teacher and press the "Update this quiz" button

Address of this example in your Moodle

Assuming the quiz in question has the module id of 2, the address is:

/course/modedit.php?update=2&return=1

(add a link here to an actual demo installation? if so, that would have to keep its urls forever, i.e. probably have a moodle version installed that doesn't get upgraded)


The location of the code for this implementation

Please fill in location(s) in either http://cvs.moodle.org/ or in the code cross-reference (the latter is probably more useful), specifying the Moodle version where this information applies.

Implementation How-to

This example uses Moodle Formslib. Moodle remembers the state the form was left in (in the user_preferences table) when the user leaves the page and restores its state when the user returns to it.

Please fill in, copying information as necessary from Development_talk:Progressive_Disclosure#Examples, specifying the Moodle version(s) where this information applies.


Search and Advanced search of forums

Change to another page with further options if the user clicks "advanced search".

Search options

Roles UI (Moodle 2.0). Javascript implementation. When "Search options" is clicked, reveals three checkboxes. Go to a module, such as a forum, in a course, click Update module, click Check permissions. URL of form is /admin/roles/check.php?contextid=X .