Coder Social home page Coder Social logo

marxjohnson / moodle-block_quickfindlist Goto Github PK

View Code? Open in Web Editor NEW
6.0 9.0 15.0 57 KB

Moodle block providing a quick method of searching users

Home Page: http://moodle.org/mod/data/view.php?d=13&rid=2200

PHP 61.55% JavaScript 8.51% CSS 1.06% Gherkin 28.88%

moodle-block_quickfindlist's Issues

PATCH - No longer MySQL specific

This fixes some MySQL-specific and erroneous quoting, so it now runs on other RDMS systems such as Microsoft SQL Server. More specifically:

Bound parameters are not quoted, as the binding handles that (uses ?, not "?").

String literals use single quotes, double quotes are for identifiers (MySQL accepts backticks for identifiers):
http://www.savage.net.au/SQL/sql-2003-2.bnf.html#character%20string%20literal

Use Moodle's $DB->sql_concat rather than MySQL-specific CONCAT()

sensei-hacker@e708c80

Moodle 4 support

Hi,
Could you please add support for Moodle 4?
Even if the current version of the plugin would work on Moodle 4, an official support would be great.

Thanks even for considering it :-)

moodle 3.2

could you develop the block for moodle ver 3.2

Add thumbnails to results

From http://tracker.moodle.org/browse/CONTRIB-2759

This block along with the quick find block are really useful to our users.
Upon discussion with a colleague I thought I would float a couple of things that we think would make the blocks even better:
...
2) When returning results to include a small thumbnail of the user next to their name

I'm not a php coder so am not sure how feasible or practical these enhancements would be to implement.

can't search by idnumber

We put the students idnumber on the mdl_user idnumber field and it's useful to be able to search for students by this number.

below is a patch that enables this - it includes knocking out accounts from search with a lastname of 'Guardian' as we use this to create guardian access accounts for our students

git://gist.github.com/3175344.git

get_context_instance() deprecated since, use context_xxxx::instance() instead.

master (Moodle 2.6DEV) throws this warning:

get_context_instance() is deprecated, please use context_xxxx::instance() instead.

In deprecatedlib.php, I see get_context_instance has been deprecated since 2.2.

On line #97 of blocks/quickfindlist/block_quickfindlist.php, change:

$context_system = get_context_instance(CONTEXT_SYSTEM);

to:

$context_system = context_system::instance();

use permission is only checked in system context

As reported by Alan Woerner

The issue Alan describes occurs as the has_capability call in get_content uses the system context, not the current instance context. This is partly due to laziness, but also partly down to security as the block potentially searches all users in the system. Extra permissions checking may need to be implemented to ensure that a user only sees results for users that they are allowed to know about.

Quickfindlist updates for 4.x

On a 4.4 site, getting the following errors:
pix_url is deprecated. Use image_url for images and pix_icon for icons.
line 1949 of /lib/outputlib.php: call to debugging()
line 126 of /blocks/quickfindlist/block_quickfindlist.php: call to theme_config->pix_url()
line 337 of /blocks/moodleblock.class.php: call to block_quickfindlist->get_content()

Renaming pix_url to image_url in the block_quickfindlist.php file gets rid of that error.

When clicking on the block settings, it now throws the following errors (not exactly sure when this started) :
Coding error detected, it must be fixed by a programmer: Property config does not exist
Error code: codingerror

  • line 68 of /blocks/edit_form.php: coding_exception thrown
  • line 45 of /blocks/quickfindlist/edit_form.php: call to block_edit_form->__get()
  • line 139 of /blocks/edit_form.php: call to block_quickfindlist_edit_form->specific_definition()
  • line 217 of /lib/formslib.php: call to block_edit_form->definition()
  • line 73 of /lib/form/classes/dynamic_form.php: call to moodleform->__construct()
  • line 71 of /lib/form/classes/external/dynamic_form.php: call to core_form\dynamic_form->__construct()
  • line ? of unknownfile: call to core_form\external\dynamic_form::execute()
  • line 253 of /lib/external/classes/external_api.php: call to call_user_func_array()
  • line 83 of /lib/ajax/service.php: call to core_external\external_api::call_external_function()

Also, for accessibility purposes, the block throws an accessibility error with accessibility checkers - it is needing an aria label for the text input box.

Thanks for looking at this. Happy to help test.

Strict Standards warning

Strict Standards: Creating default object from empty value in /home/garderief/public_html/blocks/quickfindlist/block_quickfindlist.php on line 201

some non-english characters not recognized

It does not recognize some accented characters from my language (those are correct UTF-8 characters, and there is no such problem on database), for instance š ř č (see example). On the other hand, it correctly "parses" vowels like á ö ... as a, o (I am on Moodle 2.6.7, if it helps)
ignored_char_quickfindlist_input

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.