General plugins (Local): Question Filters

local_question_filters
Maintained by Picture of andreas riepl andreas riepl
This plugin enables additional search option within questions in large question banks
20 sites
5 downloads
6 fans

This is a simple local script that enhances the question bank with following search fields:

question name: text is searched within a title
question text: text is searched within a text
default mark: operators like  < > = >= and <= can be used to filter questions with certain marks.

This block is for Moodle 2.2 and higher, it will not work for versions below 2011120500

1) Save the zip file somewhere onto your local computer and extract all the files
2) Transfer the folder qustion_filter to the local-directory of Moodle
3) Log in as 'administrator' and click on the 'Home' link

Screenshots

Screenshot #0

Contributors

Picture of andreas riepl
andreas riepl (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Anthony Borrow
    Wed, 21 Jan 2015, 8:19 AM
    Andreas - Before we move forward with the review, I would like to make sure that we have the meta-data. Please review https://docs.moodle.org/dev/Plugin_contribution_checklist#Meta-data, update the entry, and then re-schedule this for review. For now, I am going to mark this plugin as needing more wok until we get these issues resolved. Thanks for your patience with the review and approval process. Peace - Anthony
  • Picture of andreas riepl
    Thu, 22 Jan 2015, 3:14 AM
    Hello Anthony, sorry about that, I had the information filled in but parts of it got lost - anyway I updated again, hope this works now, regards Andreas
  • Anthony Borrow
    Fri, 23 Jan 2015, 2:14 AM
    Thanks Andreas, could you also fill in the Tracker url. Peace - Anthony
  • Picture of andreas riepl
    Fri, 23 Jan 2015, 4:37 AM
    done! cheers, Andreas
  • Anthony Borrow
    Fri, 23 Jan 2015, 2:00 PM
    Thanks Andreas. I was able to install the plugin and did some simple testing. In looking at the code, I was curious about classes/question_bank_column.php - you do not seem to be using it. Was that just something from testing? From the UI, I am missing where you can save, list and delete filters. I see that you are creating a table to store some information in but I'm missing how it is actually used. Also, in the lib.php there seems to be some unusual code:
    function local_question_filters_question_bank_column_types($question_bank_view) {
    echo 'z'; exit;
    Could you help me to better understand the purpose of what is happening? I want to make sure that there are not any unnecessary files included in the zip and from what I can tell the classes folder is not needed but I may have been overlooking something. Peace -Anthony
  • Picture of andreas riepl
    Fri, 6 Feb 2015, 4:24 PM
    hi anthony,

    question_bank_column.php and the function local_question_filters_question_bank_column_types
    where just for testing, i deleted those.

    the table local_question_filters is storing the current filter settings for a question.
    it is used in the lib.php

    the plugin actually also contains custom scripts which we do not want to publish. everything can be found on github: https://github.com/gtn/moodle_question_filters/tree/master

    the main function of the module is to easily find questions in large question-pools using logic:
    it enhances the question bank with following search fields:
    question name: text is searched within a title
    question text: text is searched within a text
    default mark: operators like < > = >= and <= can be used to filter questions with certain marks.

    regards,
    Andreas
  • Anthony Borrow
    Sun, 5 Apr 2015, 3:28 AM
    Andreas - I like the additional functionality and I was able to test it; however, I noticed some hard coded German phrases in lib.php that you can fix up pretty easily by using get_string calls for the labels. For example,

    $return .= html_writer::label('Fragetitel', 'filter_name');

    Let's make Fragtitel translatable. You may just want to use questionname, questiontext, and defaultmark from lang/en/question.php rather than creating extra strings.

    For now, I am going to mark this plugin as needing more work until we get these issues resolved. Thanks for you patience with the review and approval process. Peace - Anthony
  • Picture of David Mudrák
    Wed, 6 May 2015, 7:52 PM

    The description contains This block is for Moodle 2.7+ versions, it will not work for versions below 2011120500 You probably meant "... for Moodle 2.2 and higher". Can we please have this fixed yet?

  • Picture of andreas riepl
    Thu, 21 May 2015, 9:22 PM
    Hello David, it is fixed, regards Andreas
  • Picture of David Mudrák
    Fri, 22 May 2015, 3:09 AM

    Thanks Andreas. You are cleared to land now, welcome to the Plugins directory!

  • Picture of Lee Taesang
    Thu, 26 Jan 2017, 7:25 PM
    Will it be updated to 3.1 of moodle ?
  • Picture of andreas riepl
    Fri, 27 Jan 2017, 1:29 AM
    it should work with moodle 3.1, regards andreas
Please login to post comments