Moodle

As-you-type auto-selection on the assign roles screen. With patch.

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Duplicate
  • Affects Version/s: 1.9.2
  • Fix Version/s: None
  • Component/s: Roles / Access
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE

Description

I've just been adding students to new courses by name and got annoyed at waiting for the server to search all the time, so I've written a small bit of javascript to automatically select the first matching name starting with the search string as the user types. This allows the first name to be partially typed and 'Add' to be clicked without scrolling or waiting for a smaller list.

Patch (roles_assign_html.txt) is against Moodle 1.9.2.+ (20080901) - apply it to /admin/roles/assign.html and add search.js to the /admin/roles directory. Patched assign.html is included too if you want to just overwrite the file.

  1. assign_patch.txt
    23/Sep/08 5:14 PM
    2 kB
    Matt Gibson
  2. assign.html
    23/Sep/08 5:13 PM
    6 kB
    Matt Gibson
  3. search.js
    09/Sep/08 11:01 PM
    1 kB
    Matt Gibson

Issue Links

Activity

Hide
Matt Gibson added a comment -

whoops - it gives an empty user list after submission. Working...

Show
Matt Gibson added a comment - whoops - it gives an empty user list after submission. Working...
Hide
Matt Gibson added a comment -

New version of patched file

Show
Matt Gibson added a comment - New version of patched file
Hide
Matt Gibson added a comment -

new version of search.js

Show
Matt Gibson added a comment - new version of search.js
Hide
Matt Gibson added a comment -

new patch

Show
Matt Gibson added a comment - new patch
Hide
Matt Gibson added a comment -

works now.

Show
Matt Gibson added a comment - works now.
Hide
Matt Gibson added a comment -

Now also clears the search box when 'remove' button is clicked as well as when 'add' is clicked, so that there is always a full list of names to search unless the 'search button' has just been used

Show
Matt Gibson added a comment - Now also clears the search box when 'remove' button is clicked as well as when 'add' is clicked, so that there is always a full list of names to search unless the 'search button' has just been used
Hide
Matt Gibson added a comment -

Updated to fix multiple selections occurring.

Show
Matt Gibson added a comment - Updated to fix multiple selections occurring.
Hide
Matt Gibson added a comment -

Added javascript to focus on the search box when the window loads. Saves a click each time.

Show
Matt Gibson added a comment - Added javascript to focus on the search box when the window loads. Saves a click each time.
Hide
Tim Hunt added a comment -

I am proposing to do MDL-16966, which is a superset of this, so closing this issue. Thanks for the useful suggestion!

Show
Tim Hunt added a comment - I am proposing to do MDL-16966, which is a superset of this, so closing this issue. Thanks for the useful suggestion!

People

Vote (2)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved: