Posts made by Ray Morris

> The ball is in your court.

You may not have seen my other thread on that.  I'm passing the ball. It's not likely that I'll be able to write unit tests for Question Bank any time soon.

If there already WERE unit tests and I just needed to add tests for the new feature, I could probably do that.  Since there aren't existing unit tests, I'd need to do everything from scratch, just like other places where I've had to redesign an entire API in order to get a typo fixed.  I'm not going to be able to do that because I'm busy fixing bugs and writing useful new features.

 I have a ton of useful improvements our instructional designers and instructors use if you ever want to integrate them into your code. I've pretty well given up on integration.  A commit is rejected because it doesn't fix the whitespace formatting in other, unrelated code, then when that's added it's rejected because it DOES fix the formatting in the unrelated code.  A function is rejected because it has an object as a parameter ("pass class names, not objects", someone says).  Change it to accept a class name and it's rejected for doing so.  I could deal with that for NEW CODE I'm submitting, but I'm afraid I just don't have time do an entire module like that every time a change is made.  Maybe one day Question Bank will have unit tests and I'll merge some of the cool stuff we're doing, writing unit tests for our stuff.

 

 

 

 

> Yes, tagging seems to solve all my problems, but as you said, there is no way to search for these tags when I want to

> create a quiz and  select questions from a question bank.

 That feature does exist, and we use it.  We also use one which shows the tags in the question bank list.  Unfortunately, neither are in the standard 

Moodle distribution yet. If you have a programmer or very tech-saavy non-programmer on your team, you can help get that integrated into standard Moodle 

by helping with the last step - writing tests which automatically test the new feature.  Your programmer or "near programmer" can also merge the feature 

into your copy of Moodle by pulling it from our git repository.

 

If you don't have a programmer or near-programmer on your team, and don't have any budget to help with the final step, you can vote for these new features

to get integrated.  The vote button is on the left side of these pages:

https://tracker.moodle.org/browse/MDL-40313

https://tracker.moodle.org/browse/MDL-40457

 

 

One of the most-used new features we've written for Moodle is our question search patch. With it, you can build or edit quizzes by filtering questions by tags,

you can search questions and answers for words and phrases, and any other type of searching or filtering needs only a small plugin to define the type of search.  

When editing, you don't have to look through thousands of questions to find the one about radium or whatever, you just type "radium" in the search box and it pulls

up any questions that mention radium. One thing our instructional designers tell us is very handy is that they can use it to find questions with "all of the above"

answers and set those to not be shuffled.

 

This new feature made it to the integration stage to become a part of the standard Moodle distribution, but stalled out on a final step - unit tests 

need to be written. I could use some help with authoring those unit tests because I don't expect that I'll have time to get those written in time.  By "in time", 

I mean before other surrounding code has enough changes that the new feature patch has to be rewritten to match.  If anyone is able to help write some 

Behat or PHPUnit tests we should be able to get this integrated, which should be useful in some way to most people who use Moodle quizzes. 

 

If anyone would like to help get those unit tests ready, or would like to use the feature by pulling the patch manually or through git, the code,

which is working in production for a major university system, can be found here:

https://tracker.moodle.org/browse/MDL-40313

https://github.com/MorrisR2/moodle/commit/a8e37873e34c3f2398c7f18b9c49d48426f4189e

 

Average of ratings: -

At least in the themes I've checked, I don't see a quiz2 class, but I do see .path-mod_quiz.  You could try:

.path-mod-quiz #page-header {

   display: none;

}

 

If that doesn't work, load the page in Chrome, then right click in the header and choose "inspect element".  Check that the header (as a whole) is selected 

in the left pane and you'll see exactly which rules are being applied in the right pane.  It may be that a selector more specific than .path-mod-quiz or .quiz2 is being applied.

 

You may also be interested in:

http://docs.moodle.org/dev/Page_API#Base_theme_page_layouts