Sagecell not running in moodle pages

120 views
Skip to first unread message

Modlo Eugene

unread,
Jul 10, 2015, 6:10:04 AM7/10/15
to sage-s...@googlegroups.com
Hi everyone!
Trying to use sagecell in moodle pages. A few month ago everything was fine, but now, after accepting the terms of service i see only rounding circle at right side of cell. 

moodle page with sagecell: http://vtutor.ccjournals.eu/mod/page/view.php?id=927 (use guest access)
Thanks!

Andrey Novoseltsev

unread,
Jul 10, 2015, 3:04:44 PM7/10/15
to sage-s...@googlegroups.com
On Friday, 10 July 2015 04:10:04 UTC-6, Modlo Eugene wrote:
Hi everyone!
Trying to use sagecell in moodle pages. A few month ago everything was fine, but now, after accepting the terms of service i see only rounding circle at right side of cell. 

moodle page with sagecell: http://vtutor.ccjournals.eu/mod/page/view.php?id=927 (use guest access)
Thanks!

Thanks a lot for providing an example! The console complains about
ReferenceError: SockJS is not defined
and
ReferenceError: CodeMirror is not defined
which is a bit puzzling for my limited JS skills. I'll try to track it down over the weekend and next week.

Andrey

Volker Braun

unread,
Jul 11, 2015, 4:47:14 AM7/11/15
to sage-s...@googlegroups.com
The relevant error is:

Uncaught Error: Mismatched anonymous define() module: function (CodeMirror) {...


This is probably because CodeMirror insists on defining an anonymous module in the presence of requirejs, you might get away with just deleting the 

  else if (typeof define == "function" && define.amd) // AMD
    return define([], mod);


TL;DR: JS does not have some feature (in this case: modules) so there are 5 different and mutually incompatible ways to do it. All of them broken in funny ways...

Jason Grout

unread,
Jul 11, 2015, 12:15:14 PM7/11/15
to sage-s...@googlegroups.com
On 7/11/15 04:47, Volker Braun wrote:
> TL;DR: JS does not have some feature (in this case: modules) so there
> are 5 different and mutually incompatible ways to do it. All of them
> broken in funny ways...

Luckily, es6 javascript has modules, so hopefully at least some of the
funny things will be corrected in the near future:

http://www.2ality.com/2014/09/es6-modules-final.html

Thanks,

Jason


Sergey Semerikov

unread,
Aug 17, 2015, 6:59:08 AM8/17/15
to sage-support
Is there any good news on embedding sage cells into Moodle pages?

Thanks!
Sergey
Reply all
Reply to author
Forward
0 new messages