The default user id for $USER in the phpunit test is 0. I need it to be a privileged user such as admin so as to test certain privileged actions. In the test I've set $USER->id = 2 which seems to work. Is there a better/recommended way for achieving the same effect?
Discussions started by Itamar Tzadok
Because even in a cms not every course is a course. Sometimes it's just a placeholder for stuff. Othertimes the cms is not used for courses at all. But the browser's url shows .../course/view.php...
So I created a soft link to course/ and hacked moodle_url __construct to replace 'course/' with 'whateverworksforme/'. And it seems to work for me. Of whateverworksforme, any coded url that is not passed through moodle_url (bad code) will still show .../course/view.php...
If this feature is desired by others too I can open a tracker issue. The alternate name could be set in config. And if there is a better approach to implement that please share.
So, when a user clicks on the visible link of the hidden category in the navbar the user is notified: Sorry, but you do not currently have permissions to do that (See hidden categories).
What's the point of that?
If I hide a category then the user should not see a link to it to begin with. What am I missing?
222+ and hence may be refactored away in 2.3, so just a note until I have the opportunity to test it on 2.3.
The break point is when section 0 is placed at the bottom rather than at the top. Items which are d&d from section 0 to other sections are copied rather than moved, that is, the sequence of section 0 is not adjusted. Items which are d&d from other sections into section 0 are duplicated in the (DB) sequence of section 0.
Consider for example module subplugins such as a Database module field. This subplugin has no designated plugin type in pluginlib and hence falls under the general type plugintype_general. But plugintype_general is empty and the parent plugintype_base offers only minimal means of plugin management. In particular it doesn't offer plugin settings.
Is there a good reason for that, or is there API underway?
After all, there is no limit to the possible plugin and subplugin types in moodle and there should be some means for managing them (uninstall, settings, etc.).