Issue Details (XML | Word | Printable)

Key: MDL-12389
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Nicolas Connault
Reporter: Tim Hunt
Votes: 0
Watchers: 1
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Select/deselect all items links on grade_export_form.php

Created: 29/Nov/07 10:51 PM   Updated: 04/Dec/07 06:38 PM
Return to search
Component/s: Gradebook
Affects Version/s: 1.9
Fix Version/s: 1.9, 2.0

Participants: Nicolas Connault and Tim Hunt
Security Level: None
Resolved date: 04/Dec/07
Affected Branches: MOODLE_19_STABLE
Fixed Branches: MOODLE_19_STABLE, MOODLE_20_STABLE


 Description  « Hide
Doing this probably involves enhancements to formslib. From skype:

[14:43:15] Tim Hunt says: Petr/Nic, on the grade export form, should we have Select all/Deselect all links in the Grade items to be included section?
[14:44:02] Petr Skoda (skodak) says: the select all/none is not yet part of formslib I think
[14:44:20] Petr Skoda (skodak) says: changes in cvs, please update
[14:44:55] Nicolas Connault says: Mhh I could imagine an extra param to the advcheckbox element constructor: $select_group
[14:45:02] Tim Hunt says: Yes, but there is a very generic JS function for doing it in the Moodle libraries, outside formslib, so it would not be hard to add. Maybe I should just stick the idea in the tracker for now.
[14:45:51] Petr Skoda (skodak) says: I implemented something similar in the new coruse reset - it resets the form completely and fills it with some defaults based on clicked button
[14:46:26] Nicolas Connault says: Then a "select all/ select none" links combo element, named after the $select_group
[14:46:40] Nicolas Connault says: this way you could have several multi-selection groups of checkboxes on one page
[14:46:44] Petr Skoda (skodak) says: yes Nicolas - that sounds good
[14:46:54] Tim Hunt says: Yep, that sounds like a good design.
[14:47:18] Tim Hunt says: Alternatively, a single form control that implements a list of checkbox items.
[14:47:27] Nicolas Connault says: I'll take care of it if you want to write and assign the issue
[14:47:35] Petr Skoda (skodak) says: I want more time for all these nice ideas! :@
[14:47:47] Tim Hunt says: OK, I'll file an issue and assign it to Nic.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Nicolas Connault added a comment - 03/Dec/07 02:10 PM
The proposed implementation:

$form->addElement('advcheckbox', 'item1', 'label for item 1', array('param1' => 'value1'), 'group1');
$form->addElement('advcheckbox', 'item2', 'label for item 2', array('param1' => 'value1'), 'group1');
$form->addElement('advcheckbox', 'item3', 'label for item 3', array('param1' => 'value1'), 'group1');
$form->addElement('multitick', 'group1');
$form->setDefault('group1', false);


Tim Hunt added a comment - 03/Dec/07 06:30 PM
Remind me, how does this compare to the interface for radio button sets.

Nicolas Connault added a comment - 04/Dec/07 06:38 PM
The implementation has changed a fair bit but it is now working really nicely, and is still very easy to use: http://docs.moodle.org/en/Development:lib/formslib.php_add_checkbox_controller