Moodle 2.9.4 - Whiteboard not showing for students. (WORKAROUND)

Moodle 2.9.4 - Whiteboard not showing for students. (WORKAROUND)

by Sam Mudle -
Number of replies: 2

WORKAROUND: Changed the whiteboard to use Flash rather than Literally Canvas.js seems to fix the problem.

Poodll Version: 2.8.5(Build 2015121106)

Assignment Pluggin Version: 1.5.9 (Build 2015121101)

Moodle Version 2.9.4

I created a whiteboard assignment.  When students go to add submission, they get a blank screen with a SAVE PICTURE at the bottom. It looks like there's a big space for the whiteboard, just nothing shows.

I think it's having trouble locating the jquery library.

I opened Firefox debugger and it says

ReferenceError: $ is not defined
DrawingBoard.Control.extend()
drawingboard.min.js:1
<anonymous>
drawingboard.min.js:1
drawingboard.min.js:1:13293
TypeError: $ is undefined
DrawingBoard.Board()
drawingboard.min.js:1
M.filter_poodll.loaddrawingboard()
module.js:1
<anonymous>
view.php:167
e._notify()
yui_combo.php:9
e._use/T()
yui_combo.php:9
e.Loader.prototype._finish()
yui_combo.php:16
e.Loader.prototype._onSuccess()
Average of ratings: -
In reply to Sam Mudle

Re: Moodle 2.9.4 - Whiteboard not showing for students. (WORKAROUND)

by Justin Hunt -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

OK, these whiteboard issues go on. I think I know whats causing that. I will look at the assignment and see if I can't fix it. It probably affects a few of the other plugins too.

In reply to Justin Hunt

Re: Moodle 2.9.4 - Whiteboard not showing for students. (WORKAROUND)

by Justin Hunt -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

The problem here is that jquery is not loaded (as you noted) and DrawingBoard needs it. The PoodLL filter, question and assignment submission can't load JQuery reliably because the page head has already been printed. 

LiterallyCanvas works via an AMD module so its ok, or at least it should be. I will wrap DrawingBoard in an AMD module sometime soon, but I just can't promise when that will be.

The workaround, until I can get onto this,  is 

i) to use Literally Canvas or the PoodLL Whiteboard (flash)

ii) to add the call to load jquery in your site admin's "appearance->additional html->within HEAD" section.

<script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
(But really this is not a great solution because it can lead to problems with other plugins that require jquery that are loaded on the same page )