[sage-support] Re: using cell server with moodle (problem with script balise)
I'm running into the same problem with Wordpress. When I switch their TinyMCE editor between Text and Visual modes, it will add in those tags. My solution is to edit only in Text mode (the Sage boxes are invisible anyway in Visual mode, which is complicating things). See http://matroidunion.org/?p=301 . Incidentally, there seem to be some issues with the new maximize button that appeared today. Sometimes after clicking it, I have several maximize buttons in view. Anyway, back to the topic. If moodle has a text-mode editor, then that might be your best bet. I just tried Jason's suggestion for only using the CDATA thing directly, but switching to Visual made TinyMCE eat up my entire code. When trying to preview, the closing tag ]] was visible as a line of Sage code. It'd be nice if the cell server got an option to ignore the // ![CDATA[ and // ]] bits… Another issue I'm having is that Wordpress will convert empty lines into a /pp pair. But that seems to be beyond the control of the Cell Server. I think we need a proper Wordpress plugin to get everything working flawlessly. Cheers, Stefan. -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/groups/opt_out.
[sage-support] Re: using cell server with moodle (problem with script balise)
I follow the suggestion of Jason and remove the script tag div class=sage 1+2 /div and it works. By the way, in moodle the html editor has a raw mode. However as pointed by Stefan, as soon as I return to the visual mode, the editor add the [CDATA[ stuff around the script balise. As far as I understand, it seams to be the norm to protect the data from the browser. It would thus be interesting that the cell server got an option to ignore the // ![CDATA[and // ]] bit as suggest by Stefan. Finally using div class=sage![CDATA[ 1+2 ]] /div does not work with moodle Thanks, Marc -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/groups/opt_out.
[sage-support] Re: using cell server with moodle (problem with script balise)
On 11/13/13 2:49 PM, mbuffa...@gmail.com wrote: I follow the suggestion of Jason and remove the script tag div class=sage 1+2 /div and it works. By the way, in moodle the html editor has a raw mode. However as pointed by Stefan, as soon as I return to the visual mode, the editor add the [CDATA[ stuff around the script balise. As far as I understand, it seams to be the norm to protect the data from the browser. It would thus be interesting that the cell server got an option to ignore the // ![CDATA[and // ]] bit as suggest by Stefan. Finally using div class=sage![CDATA[ 1+2 ]] /div does not work with moodle Thanks for reporting back. Does this work? (i.e., does TinyMCE correctly escape the ''? div class=sage if 12: print 'hi' /div Thanks, Jason -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/groups/opt_out.
[sage-support] Re: using cell server with moodle (problem with script balise)
On 11/13/13 1:43 PM, Stefan van Zwam wrote: I'm running into the same problem with Wordpress. When I switch their TinyMCE editor between Text and Visual modes, it will add in those tags. My solution is to edit only in Text mode (the Sage boxes are invisible anyway in Visual mode, which is complicating things). See http://matroidunion.org/?p=301 . Incidentally, there seem to be some issues with the new maximize button that appeared today. Sometimes after clicking it, I have several maximize buttons in view. I noticed that and fixed it maybe 12 hours ago (it was a bug in how we were doing z-ordering). Does it still happen? Anyway, back to the topic. If moodle has a text-mode editor, then that might be your best bet. I agree. If you are using TinyMCE, TinyMCE will likely convert all to lt; and all to amp;, so you maybe be able to just use the divs and not worry about the script tags. Of course, inserting divs into TinyMCE might be a bit tricky. I just tried Jason's suggestion for only using the CDATA thing directly, but switching to Visual made TinyMCE eat up my entire code. When trying to preview, the closing tag ]] was visible as a line of Sage code. It'd be nice if the cell server got an option to ignore the // ![CDATA[ and // ]] bits… If we can figure out a way to not have those bits, that would be best, of course. Another issue I'm having is that Wordpress will convert empty lines into a /pp pair. But that seems to be beyond the control of the Cell Server. I think we need a proper Wordpress plugin to get everything working flawlessly. Or a TinyMCE plugin. Thanks, Jason -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/groups/opt_out.
[sage-support] Re: using cell server with moodle (problem with script balise)
Yes the html editor in moodle escape i.e. div class=sage if 12: print 'hi' /div is converted automatically div class=sageif 1lt;2: print 'hi' /div however the code in written with one line, i.e. I am unable to insert multi-lines using only div Moreover string enclosed with does nor work (single quote works) At the moment I use it just to initialise the cell with a simple statement, and it works but to initialize the cell with more complex code, I had to find another solution. Regards Marc -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/groups/opt_out.
[sage-support] Re: using cell server with moodle (problem with script balise)
I had the very same problem with Moodle2.0 My solution is not to wite an html document inside Moodle. Rather, what I do is write the .html file externally, with Kompozer, then in Moodle i upload that external file. I don'n know if this works if, for instance you want to tak profit of the structured lessons of Moodle, but at least the entire file works pretty well, it opens in the Moodle page itself. Regards, JC El miércoles, 13 de noviembre de 2013 19:28:23 UTC-5, mbuf...@gmail.com escribió: Yes the html editor in moodle escape i.e. div class=sage if 12: print 'hi' /div is converted automatically div class=sageif 1lt;2: print 'hi' /div however the code in written with one line, i.e. I am unable to insert multi-lines using only div Moreover string enclosed with does nor work (single quote works) At the moment I use it just to initialise the cell with a simple statement, and it works but to initialize the cell with more complex code, I had to find another solution. Regards Marc -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/groups/opt_out.
[sage-support] Re: using cell server with moodle (problem with script balise)
On 11/12/13 3:59 PM, mbuffa...@gmail.com wrote: I am trying to insert sage cell inside moodle page, in order to use sage for online course. I found the idea behind sage cell and ipython wonderful for online course, but I have a problem. I am using moodle 2.4 and insert the html code from http://aleph.sagemath.org/static/about.html. In particular, I insert the following code div class=sage script type=text/x-sage1+2/script /div in the HTML editor of moodle. However, the html editor transform the code in order to be XML compatible using CDATA as div class=sage script type=text/x-sage// ![CDATA[ 1+2 // ]]/script /div This result in a SAGE cell, but with a wrong input // ![CDATA[ 1+2 // ]] Has anybody try to include sage cell inside dynamic moodel page and how? I haven't heard of someone doing this. That's cool that you're trying. The only purpose for the script tag is to let you use and instead of lt; and amp;. Does the end result have to be an XHTML page? You might be able to just use the XML CDATA thing directly: div class=sage![CDATA[ 1+2 ]] /div You can also just use a div, but then you need to make sure any are done with lt; and any are amp;, like: div class=sage x=0 if x lt; 1: print x /div On the other hand, is there a way in the html editor to edit the raw html? Then hopefully you can insert the div and script tags like normal, and the editor won't mess with them. Thanks, Jason -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/groups/opt_out.