Open nadavkav opened 8 years ago
What does it look like when it happens?
And what else do I need to do besides the config? As clearly that is indicating some markup to the PHP scripting engine. Is there anything else to add in the actual layout file?
It seems like they are using the class just for getting to the div and moving it to the bottom https://github.com/moodlerooms/moodle-theme_snap/blob/master/javascript/snap.js#L112-L129
Here is how it looks:
The JS moves the xdebug-error from the head of the page to the footer, which is nicer and more easy to read. (as the top main toolbar always hides some of the php errors)
Thanks Nadav. Ok, title changed from JS to PHP as that's what the error message does. All the code does is move the error messages from one place to another and leaves an alert with link at the top. Also has extra code for xdebug when being used. Tricky to test as I've never got xdebug working.
How can you work without xdebug? I do not know if I could figure out Moodle without it. (The grades, backup, quiz, ...)
error_log(print_r($thing, true));
Seriously? no line by line debug to see the change in variable values? no function call stack? no drilling into classes and arrays? no way
print_r does objects and arrays. a structured walkthrough does the call stack / any error. Change in variable values by reading the code.
Looking at again, this: https://github.com/moodlerooms/moodle-theme_snap/blob/master/config.php#L26-L31 is a server side session thing and nothing to do with the JS and moving the debug message.
No idea of how much time would take to implement and test. Open for negation and reasoning why this should be done.
Well... the code moved (since the time I linked to it on master) Here is the correct piece of code: https://github.com/moodlerooms/moodle-theme_snap/blob/master/config.php#L34-L39
How about this... https://github.com/moodlerooms/moodle-theme_snap/blob/master/config.php#L26-L31