moodle-local_purgequestioncategory's People
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".
Usability: "Top" is not a valid category
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: Better handle edge case when there is no question to be moved
As @mchurchward noticed on the plugin page, when there is no question in the question banks, the UI does not give any hint to the user on what to do. It would be nice to display something like "There is no question to be purged" or so.
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.
Typo: unerstand
The "unerstand" should read "understand".
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.