I have "created" a new activity called dmurl. It is basically the same as the URL module but rather than the entered URL goes to a very specific one with various parameters passed.
Anyway I get the error:
I cannot find any documentation to explain this error. My module/lib.php has the same code as the URL module's but with dmurl inserted as appropriate.
Any thoughts and advice greatly recevied.
Did you forget to include the error?
Or was it really just a blank screen?
Either way, the best solution is often to find the line throwing the error (by turning debugging on to get the full error message, if possible), then use a combination of xdebug + suitable IDE (PHPStorm is my personal favourite for this), to put a breakpoint on the error line and then examine the state of the variables at that point and see what has gone wrong.
OK - that one's easy to answer, as it's my code that's throwing the error.
Drag + drop upload can handle a number of different 'drop' types which are (off the top of my head):
- file (you dragged and dropped a file onto a course page)
- text (you dragged and dropped some selected text onto a course page)
- url (you dragged and dropped a selected URL onto a course page - probably from a browser address bar)
Different plugins can declare that they handle one or more of these types (so, mod_url declares that it can handle 'urls' dropped onto a course page).
It is also possible to declare your own drop types in a plugin (just in case future browser developments introduce new types of things you can drag and drop into the browser).
In this case, you've declared that your plugin handles drops of type 'dmurl', which is not one of the 3 types that Moodle knows about. So you either need to declare that as a custom type, or (much more likely!) you just need to fix it to state that it handles 'url' drops.