Details
-
Type:
New Feature
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.9.5
-
Fix Version/s: None
-
Component/s: Administration, Usability
-
Labels:None
-
Difficulty:Easy
-
Affected Branches:MOODLE_19_STABLE
Description
In 'Site Administration"[Users][Accounts]-[Browse List of Users],
When we search the user newly, at first we must delete old active filters by pushing "Remove all filters".
We had developed a method to omit this troublesome work by adding new check box.
Let you try the new feature!
Patches for Moodle1.9 are as follows;
(adding one statement and one block, commenting out one statement only!)
(a) user/filters/lib.php
class user_filtering, function user_filtering()
foreach ($fieldnames as $fieldname=>$advanced) {
if ($field = $this->get_field($fieldname, $advanced)) {
$this->_fields[$fieldname] = $field;
}
}
// fist the new filter form
$this->_addform = new user_add_filter_form($baseurl, array('fields'=>$this->_fields, 'extraparams'=>$extraparams));
if ($adddata = $this->_addform->get_data(false)) {
// (Shirai): add from here
if (!empty($adddata->removealladd) && ($adddata->removealladd)) $SESSION->user_filtering = array();
// (Shirai): Add to here
foreach($this->_fields as $fname=>$field) {
$data = $field->check_data($adddata);
if ($data === false) {
continue; // nothing new
}
if (!array_key_exists($fname, $SESSION->user_filtering)) {
$SESSION->user_filtering[$fname] = array();
}
$SESSION->user_filtering[$fname][] = $data;
}
(b) user/filters/user_filter_forms.php
class user_add_filter_form, function definition()
function definition() {
$mform =& $this->_form;
$fields = $this->_customdata['fields'];
$extraparams = $this->_customdata['extraparams'];
$mform->addElement('header', 'newfilter', get_string('newfilter','filters'));
foreach($fields as $ft) { $ft->setupForm($mform); }
// in case we wasnt to track some page params
if ($extraparams) {
foreach ($extraparams as $key=>$value) {
$mform->addElement('hidden', $key, $value);
}
}
// Add button
// (Shirai): comment out this line
// $mform->addElement('submit', 'addfilter', get_string('addfilter','filters'));
// (Shirai): add from here
$objs = array();
$objs[] = &$mform->createElement('submit', 'addfilter', get_string('addfilter', 'filters'));
$objs[] = &$mform->createElement('checkbox', 'removealladd', null, 'Add filter after removing all');
$mform->addElement('group', 'addfiltergrp', '', $objs, ' ', false);
$mform->setDefault('removealladd', '0');
// (Shirai): add from here
// Don't use last advanced state
$mform->setShowAdvanced(false);
}
}
Attachments
-
$i18n.getText("admin.common.words.hide")
- NewInterface_BrowseListsofUser.zip
- 23/Jul/09 6:18 PM
- 13 kB
- Tatsuya Shirai
-
- BrowseListsofUser/filters.php.diff 0.5 kB
- BrowseListsofUser/lib.php.diff 4 kB
- BrowseListsofUser/moodle.org/.../filters.php 2 kB
- BrowseListsofUser/moodle.org/.../lib.php 10 kB
- BrowseListsofUser/.../user_filter_forms.php 2 kB
- BrowseListsofUser/moodle/.../filters.php 2 kB
- BrowseListsofUser/moodle/.../filters/lib.php 12 kB
- BrowseListsofUser/.../user_filter_forms.php 3 kB
- BrowseListsofUser/user_filter_forms.php.diff 2 kB
$i18n.getText("admin.common.words.show")- NewInterface_BrowseListsofUser.zip
- 23/Jul/09 6:18 PM
- 13 kB
- Tatsuya Shirai
-
$i18n.getText("admin.common.words.hide")
- NewUserInterface_BrowseListsofUser_20090727_Shirai.zip
- 27/Jul/09 11:07 AM
- 13 kB
- Tatsuya Shirai
-
- BrowseListsofUser/filters.php.diff 0.5 kB
- BrowseListsofUser/lib.php.diff 4 kB
- BrowseListsofUser/moodle.org/.../filters.php 2 kB
- BrowseListsofUser/moodle.org/.../lib.php 10 kB
- BrowseListsofUser/.../user_filter_forms.php 2 kB
- BrowseListsofUser/moodle/.../filters.php 2 kB
- BrowseListsofUser/moodle/.../filters/lib.php 12 kB
- BrowseListsofUser/.../user_filter_forms.php 3 kB
- BrowseListsofUser/user_filter_forms.php.diff 3 kB
$i18n.getText("admin.common.words.show")- NewUserInterface_BrowseListsofUser_20090727_Shirai.zip
- 27/Jul/09 11:07 AM
- 13 kB
- Tatsuya Shirai
-
$i18n.getText("admin.common.words.hide")
- NewUserInterface_BrowseListsofUser_20091102_Shirai.zip
- 02/Nov/09 5:33 PM
- 13 kB
- Tatsuya Shirai
-
- BrowseListsofUser/BrowseListsofUser.diff 8 kB
- BrowseListsofUser/moodle.org/.../filters.php 2 kB
- BrowseListsofUser/moodle.org/.../lib.php 10 kB
- BrowseListsofUser/.../user_filter_forms.php 2 kB
- BrowseListsofUser/moodle/.../filters.php 2 kB
- BrowseListsofUser/moodle/.../filters/lib.php 12 kB
- BrowseListsofUser/.../user_filter_forms.php 4 kB
$i18n.getText("admin.common.words.show")- NewUserInterface_BrowseListsofUser_20091102_Shirai.zip
- 02/Nov/09 5:33 PM
- 13 kB
- Tatsuya Shirai
-
- ManipulatingActiveFilters.jpg
- 37 kB
- 22/May/09 4:53 PM
-
- NewInterface20090723.jpg
- 88 kB
- 23/Jul/09 6:18 PM
-
- Robb_Filter_suggestion.jpg
- 23 kB
- 24/Dec/09 1:53 PM
Issue Links
| This issue has been marked as being related by: | ||||
| MDL-13912 | Improvements to the search interface of admin's list of users |
|
|
|
Activity
- All
- Comments
- History
- Activity
- Source
- Test Sessions
Hi Anthony.
I think that" the default behavior of hitting the add filter is to add the filter" is nice. I like this.
Especially, on the site has large number of members, the processes to narrow down to a target user from a lot of users is very effective way!
The proposed feature can save the time to wait for reloading the screen after clicking "Remove all filters", not to save the time to click "Remove all filters".
I'm short-tempered^^; then I can not wait for finishing to reload the screen.
I use proposed feature and original add filter feature, the couple of these functions is better for me.
Tatsuya - I am impatient too and understand the benefit of the button to save the time of the page refresh. I've been dabbling with usability issues and was thinking in mouse clicks. Do you think you might be able to work on a patch to implement the behavior I suggested? If so, that would be great but if not just let me know and I'll try to give it a crack. Together I am sure we can come up with something to help move this forward. Peace - Anthony
Okey.
I'll try to upgrade my idea about user interface of active filter based upon your and other person's ideas.
Now I have two plans. The one is a very simple plan, only adding 'search' button. The other one is a more complicated plan.So, we can add filter after searching bulk users and remove all/selected filters before searching without page refresh by using javascript and so on.
Please give me time.I'll try and report it to here.
Anthony,
I've completed implementation of new user interface.
There are two important points;
(1) New feature 'Latest filter' : buffer of last search condition.
(2) Getting rid of 'Remove all filters' button.
Original user interface is based on function (Add, Remove filter),
proposed user interface is based on what user wants to do (Search only).
I prepare three buttons, [Search] [Refinement] [Newly].
[Search] :
Search user according to search condition (=filter), and then add the condition to Latest filter buffer.
[Refinement]: (=Search refinement)
At first add the Latest filter to active filter and then search (and update Latest filter).
[Newly]: (=Search newly)
At first clear all active filters and Latest filter buffer, and then newly search (and update latest filter).
If you want to clear all active filters (as same as pussing 'Remove all filters'), you push 'Newly' button without setting up search conditions. (But, I think that the operation is meaningless)
If you want to clear Latest filter buffer, you push 'Search' button without setting up search conditions. (meaningless too...)
Screenshots and patches are posted.
(Modified)
user/filters/lib.php
user/filters/user_filter_forms.php
and
lang/en_utf8/filters.php
My mother language is japanese.
Then, I can not propose suitable english terms for this user interface.
You can chage the terms (named by me) to the others.
Buttons: [Search], [Refinement], [Newly]
Strings: 'Latest filter:'
All of [Search], [Refinement] and [Newly] perform searching.
Search only, Add to active filter and then Seach, Clear all filtera and then Search.
Please treat them equally.They are brothers.
------
The proposed interface is not the same as your suggestion, sorry!
Oh! Sorry!
I forgot we can set multiple sets of constraints for searching for target users!
Then, we need to prepare latest_filter as latest_filter's'.
Now I expand it, please wait for updating modified version of the codes.
This is a new version.
Latest filter can treat multiple sets of conditions for searching for users.
Thanks for your work on this. I am currently playing catch up on various tracker issues. I look forward to testing your new version once I get caught up. Peace - Anthony
This is a new version.
If there is no active filters, [Newly] button becomes disabled.
Tatsuya - Thanks for the updated version. I am wondering if perhaps this issue has been resolved in Moodle 2.0. As I was flying back to California I was poking around 2.0 a little and remember there being a few search options. Would you mind installing a test instance of Moodle 2.0 and seeing how it is done. I think whatever we do for 1.9 should be consistent with what is coming in 2.0. Peace - Anthony
Now I'm checking Moodle2.0 according as your advice, Anthony. ( I forgot to check Moodle2.0, thanks!)
It seems that there is no changes in Moodle2.0 concerning user filter as compared with Moodle1.9.
I'll probably apply this patches for Moodle2.0, then I'll try this. Please wait a moment!
I think that the logic (from the users standpoint) for the participant page search function needs to be turned on its head. Instead of "Add filter" when there are yet no filters to add one to, the button should be called "New Filter". Then a second button should appear called "Add to current filters" AFTER the initial search. At this point, the box "Active Filters" does not need to have any checkboxes or buttons because there is only one filter in effect, and this filter can be cancelled simply by hitting the "New Filter" button. Only after a second filter is added are the checkboxes and "Removed Selected" button required. See the attached screenshot. "Robb_Filter_Suggestion.jpg.
See my separate comment on how to optimize the participant filtering system to make it more user-friendly.
I like Thomas' suggestion to have a button that resets and uses the current filter. It is nice to be able to build up a filter; it would also be nice to save a set of filters, perhaps under user_preferences. Peace - Anthony
Hi Thomas, Anthony.
At first I had proposed a small change (add one checkbox only).
Then, I had changed the concept of UI. Had you tried the patch?
- I'll probably apply this patches for Moodle2.0, then I'll try this. Please wait a moment!
Oh!!! Sorry. It's my mistake...I did not upload the patch for Moodle2.0 > Anthony.
I 've been using proposed UI (Based on Search operation). I can not back to the original UI (Based on Manipulating active filter). Thomas, please try this patch.
- I'll probably apply this patches for Moodle2.0, then I'll try this. Please wait a moment!
Hello Akira,
Your patch works well but it is for your first idea (shown in the first graphic dated 22 May 2009. I like your second idea better, but there is no code for it (for 1.9). Actually, though there is no need for three buttons. One button called "Search" can always clear any existing filters by default, so you only need one more button called "Refine". The problem with the current Moodle.org system is that it assumes that people will want to add filters. That is the default. In practice, most people will only want to do a single search at a time. Calling the buttons "Search" and "Refine" as you suggest is much more user-friendly than "add filter" and "remove filters" which seems very technical and not easily understandable.
Can you please provide the code for your second idea?
Sorry! I have a poor memory. I meant TATSUYA not Akira!! Gomen, ne!
Don' mind Thomas. Akira is very popular name in Japan (and the title of animation movie
.
> The problem with the current Moodle.org system is that it assumes that people will want to add filters. That is the default. In practice, most people will only want to do a single search at a time
I think so too, you are right.
Search (I call this as Newly; Search only current constraint) and Refine(Add latest constraint to filters, then search by current constraint and filters) is necessary.This suggestion is not so bad. This is one of choise among several concepts of the user interface. (Sorry, no good English...)
What is the difference beween Search and Newly?
If there are 10,000 users in your site.
You will search 1st constraint, then get 500 users.
You'll select 2nd constraint and push 'Refine' buttoon, then get zero users....Oh 2nd constraint is too tight!
Humm, what constraint is more better?
Search (I called) is userful in this situation.
I want to keep active filters and to try some constraint temporarily.
Search (You called, I called as Newly) will clear all stocked active filters.
-------
> Your patch works well but it is for your first idea (shown in the first graphic dated 22 May 2009. I like your second idea better, but there is no code for it (for 1.9).
Did you try the patch uploaded as NewUserInterface_BrowseListsofUser_20091102_Shirai.zip?
If you try this user interface (with three button!), you will like this UI!
Now I'm unpluged from environment for developing moodle until 4th, January, 2010.
Then I can not reply the technical comments, but everytime I'm online (with small note PC or iPod touch with safari), I can read your comments.
Thanks for your comments and have a good new year!
Tatsuya - Thanks for your report, ideas, and patch. I am working with one of the Google Summer of Coders on looking at usability issues. From what I understand, your patch (from the screenshot - not the code which I have not looked at) still requires a mouse click to check the box. I do not see it saving much time for the user as they still have to click. What I would propose is that the default behavior of the filter search is to simply search without saving; however, the default behavior of hitting the add filter is to add the filter. At one point I think there was also a request to add the ability to save filter settings. This would be a user preference but I have not given much thought about how it might actually be implemented. The downside to my approach would be if a user had added a number of filters and then forgot or accidentally just hit enter and lost all of those filters. In any case, this is certainly worth further thought. I've been told that there are a couple of similar issues which I will link together as appropriate. Peace - Anthony