Lots of great work there, but ...
+ public function show_only_fake_blocks($setting=true) {
+ $this->fakeblocksonly = true;
}
Should use $setting, not true, and seems to have a whitespace problem with the }
moodle/lib/navigationlib.php @@ -2685,23 +2692,10 @@
Should not require_once($CFG->dirroot.'/question/editlib.php'); surely it only needs questionlib.php. If that is not the case, fix it so that it does only need questionlib.php
question_extend_settings_navigation copies-and-pastes way too much code from somewhere. In particular, using optional param there is just evil. I think that question_extend_settings_navigation should only take a $context or $contextid parameter, in addition to $questionbank.
I also think that $questionbank is a bad name for this argument. It is a navigation node, not a question bank.
$PAGE->set_pagelayout('admin'); in mod/quiz/edit.php must be wrong. (It may possibly be that admin layout is badly named, or it may be this line that needs to change.)
$PAGE->set_title($pagetitle.": ".$quiz->name); in mod/quiz/edit.php. Why are we concatenating strings like this?
Don't require questionlib.php at the top of mod/quiz/lib.php. That includes all sorts of crap, and so hurts performance. Do it in quiz_extend_settings_navigation
Hmm. That makes me wonder whether question_extend_settings_navigation should be in questionlib.php, or somewhere else like navigationlib.php
$PAGE->set_pagelayout('standard'); in question/category.php (and a couple of other places). Is that really necessary? Why isn't that the default?
+ $filename = $CFG->dirroot."/mod/$cm->modname/tabs.php";
+ if (file_exists($filename)) {
+ include($filename);
}
(in various questionbank scripts) Why did you keep that bit? I vote for just getting rid of it.
(So far, I have just reviewed the code. I have not yet applied the patch and tested it. Having found the above issues, I will wait for a second patch before testing.)
Thank you very much for doing this.
The references in question bank for paging (page 1,2 ,3 NEXT, SHOW ALL) don't have a return url so the link does not work due to the filtering of valid addresses.
also
Notice: Undefined variable: paging in C:\moodle\moodle\site\moodle_head\question\editlib.php on line 1303
which invalidates the related code
if ($paging) { $paging = substr($paging, 0, strrpos($paging, '</div>')); $paging .= "<br />$showall</div>"; } else { $paging = "<div class='paging'>$showall</div>"; }
echo $paging;