Giter Site home page Giter Site logo

moodle-local_purgequestioncategory's People

Contributors

vadimonus avatar

Stargazers

 avatar

Watchers

 avatar  avatar

moodle-local_purgequestioncategory's Issues

questions disappear

in "Confirm question category purge" the first prompt specifies "Please choose another category to move them to". So it's expected that questions are moved to the chosen category. Instead, all questions simply disappear

Plugins guardians - capability checking needs to be added.

I believe you should be testing the capability 'local/purgequestioncategory:purgecategory' in all of your main level scripts, such as "category.php". While you check for them in the library functions that add the links to the navigation menus, the scripts could be called directly from the web URL. Therefore I think you need to check that capability there as well.
As a test, I added the capability "moodle/question:managecategory" to a student at a course level, and accessed "/local/purgequestioncategory/category.php?cmid=xx" direct. Instead of getting a permissions error, the function through a coding error. Testing for the "purgecategory" capability at the top of this script would resolve that.
Since this is a top-level callable script, you should also check for login.
These comments also apply to "confirm.php".

Plugins guardians - undefined variable

With the plugin installed, if I access a non-quiz activity, I get an undefined variable warning thrown (with developer debugging on) as follows:
"Notice: Undefined variable: questionbank in /[moodleroot]/local/purgequestioncategory/lib.php on line 86"

Usability: Why do I have to select another category?

Use case: I just imported dozens of questions by mistake. I have not added them to any quiz yet. When attempting to purge the imported category, I am forced to select another category to move questions to:

The category 'GCSE Computing categories' contains 141 questions (some of them may be old, hidden,
questions that are still in use in some existing quizzes). Please choose another category to move them
to.

This is confusing because I do not want to move the questions. I want to delete them.

I understand that the tool can not delete used questions. But I would expect it detects such a need and asks for the target category only if needed.

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.