[Building Sakai] Skin Selector in Test and Quizzes

Paul Lukasewych plukasew at uwo.ca
Fri Jun 7 13:38:27 PDT 2013


I have always thought using images for math equations was clunky at best. 
Images typically don't scale well, it can be difficult to copy and paste the 
equation, it can be difficult to align them properly with the rest of your 
content, and you require some kind of editor to create/edit them.

Our faculty have stated that they don't want to use any kind of WYSIWYG 
editor, they all know TeX and just want to write and edit TeX equations like 
any other text. They have specifically asked for MathJax support.

SInce fMath address a lot of the shortcomings of traditional image-based 
solutions, I think both options can be valid. However, MathJax requires less 
of the end user. You don't need any plugins (ie. Flash) to properly view the 
equations, and you don't need a special editor to create images. You just type 
in TeX anywhere you would type in other text.

Paul Lukasewych
Applications Development Team
Information Technology Services
Support Services Building
Western University
(519) 661-2111 x80513
plukasew at uwo.ca

On June 7, 2013 11:09:21 Keli Sato Amann wrote:
> For those who are or thinking of using MathJax, is there a particular reason
> why you think this is better than preserving math as images?
> 
> We were thinking about getting this started this summer on supporting math
> equations, and was talking with our developers about MathJax but I didn't
> know about fMath plugin possibility. I was planning to do some
> investigation into advantages and disadvantages of each (including user
> experience), but if anyone has any thoughts I'd appreciate hearing them.
> 
> Keli Amann
> User Experience Specialist
> Academic Computing Services, Stanford University.
> 
> ----- Original Message -----
> From: "Philip Contractor McCullick, GDIT" <pcmccull at nps.edu>
> To: "Paul Lukasewych" <plukasew at uwo.ca>
> Cc: sakai-dev at collab.sakaiproject.org
> Sent: Monday, June 3, 2013 9:18:49 AM
> Subject: Re: [Building Sakai] Skin Selector in Test and Quizzes
> 
> 
> 
> 
> 
> We limited it to the Test & Quizzes because we had scripts that instructors
> could add for other pages. The Test & Quizzes was stripping out our scripts
> from the instructor input boxes. We preferred added the scripts to only the
> pages that needed it, because the MathJax processing is fairly heavy and
> was rarely needed.
> 
> 
> 
> Thanks,
> 
> Phil
> 
> 
> 
> ___________________________________
> 
> Philip McCullick, Media Development Manager
> 
> General Dynamics Information Technology
> 
> Supporting the Center for Educational Design, Development, and Distribution
> (CED3)
> 
> Naval Postgraduate School
> 
> (831) 656-2443
> 
> Description: Description: Description: CED3_Logo_Master_eMail
> 
> 
> 
> 
> 
> 
> 
> 
> 
> From: Paul Lukasewych [mailto:plukasew at uwo.ca]
> Sent: Monday, June 03, 2013 8:43 AM
> To: McCullick, Philip Contractor, GDIT
> Cc: sakai-dev at collab.sakaiproject.org
> Subject: Re: [Building Sakai] Skin Selector in Test and Quizzes
> 
> 
> 
> Thanks Phil, this should be helpful. Is there a particular reason why you
> limited it to just Tests & Quizzes? I can see Mathjax being useful in other
> tools as well.
> 
> 
> 
> 
> 
> Paul Lukasewych
> 
> Applications Development Team
> 
> Information Technology Services
> 
> Support Services Building
> 
> Western University
> 
> (519) 661-2111 x80513
> 
> plukasew at uwo.ca
> 
> 
> 
> On June 3, 2013 15:29:12 McCullick, Philip Contractor, GDIT wrote:
> 
> Hi Paul,
> 
> 
> 
> For the math skin, we used the portal.xslt file to include MathJax only on
> the Tests & Quizzes pages. The Sakai headscripts.js makes an optional call
> to postIframeResize() if the method exists in the parent. So we used that
> callback to put the MathJax script into the quiz iframe each time it loads
> a page. It does have to scan the entire page for Latex tokens, so only
> classes that use a lot of complex Math use this skin.
> 
> 
> 
> The area we changed in the portal.xslt is inside of
> 
> <xsl:template name="tool">
> 
>> 
> <div class="portletMainWrap">
> 
> <xsl:choose>
> 
>> 
> </ xsl:choose>
> 
> The following xslt/JavaScript code was put here.
> 
> 
> 
> Here is the code we added:
> 
> <!— Check for the Test & Quizzes tool -->
> 
> <xsl:if test="contains($tool/toolHelp, 'samigo')">
> 
> <!— Add a hidden input for the mainframe's id so scripts can point at it -->
> 
> <input type="hidden" id="mainFrameId">
> 
> <xsl:attribute name="value">
> 
> <xsl:value-of select="$tool/escapedId"/>
> 
> </xsl:attribute>
> 
> </input>
> 
> 
> 
> <script type="text/javascript">
> 
> // <![CDATA[
> 
> var mainFrameID = document.getElementById("mainFrameId").value;
> 
> var mathJaxLocation = "/library/js";
> 
> 
> 
> //headscripts.js calls the postIframeResize method after resizing finishes
> 
> function postIframeResize() {
> 
> var script =
> document.getElementById(mainFrameID).contentWindow.document.createElement("
> script");
> 
> script.type = "text/javascript";
> 
> script.src = mathJaxLocation + "/MathJax/MathJax.js?config=default"; // use
> the location of your MathJax folder
> 
> var config = 'MathJax.Hub.Startup.onload();';
> 
> 
> 
> if (window.opera) {
> 
> script.innerHTML = config;
> 
> } else {
> 
> script.text = config;
> 
> }
> 
> document.getElementById(mainFrameID).contentWindow.document.getElementsByTag
> Name("head")[0].appendChild(script);
> 
> }
> 
> //]]>
> 
> 
> 
> </script>
> 
> </xsl:if>
> 
> 
> 
> 
> 
> Hope that helps,
> 
> Phil
> 
> 
> 
> ___________________________________
> 
> Philip McCullick, Media Development Manager
> 
> General Dynamics Information Technology
> 
> Supporting the Center for Educational Design, Development, and Distribution
> (CED3)
> 
> Naval Postgraduate School
> 
> (831) 656-2443
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> From: sakai-dev-bounces at collab.sakaiproject.org [
> mailto:sakai-dev-bounces at collab.sakaiproject.org ] On Behalf Of Paul
> Lukasewych Sent: Friday, May 31, 2013 7:45 AM
> To: sakai-dev at collab.sakaiproject.org ; Help Desk
> Subject: Re: [Building Sakai] Skin Selector in Test and Quizzes
> 
> 
> 
> I'm interested in the NPS Mathjax solution, so if anyone from NPS can
> provide more details that would be great.
> 
> 
> 
> Paul Lukasewych
> 
> Applications Development Team
> 
> Information Technology Services
> 
> Support Services Building
> 
> Western University
> 
> (519) 661-2111 x80513
> 
> plukasew at uwo.ca
> 
> 
> 
> On May 31, 2013 10:32:51 Matthew Jones wrote:
> 
> In 2.9 (or 2.8 if you enable manually add it to CKEditor and upgrade
> textarea) there is support for for the fMath plugin (SAK-23266) which
> allows a user to import a latex file or latex plain text. This would
> probably be the easiest for instructors.
> 
> 
> 
> And I agree with Steve, most likely that specific local skin does something
> special to load up mathjax only for those sites that manually enable it. We
> didn't ever add Mathjax system wide because by default it has to either
> parse everything (which slows down the browsing experience) or has to parse
> specific div classes (which instructors wouldn't know about and nobody ever
> wrote a WYSIWYG editor plugin for).
> 
> 
> 
> On Fri, May 31, 2013 at 10:15 AM, Steve Swinsburg <
> steve.swinsburg at gmail.com > wrote:
> 
> Hi Paul,
> 
> 
> 
> The Skin selector tool is here:
> 
> https://source.sakaiproject.org/contrib/edia/skin-manager/
> 
> 
> 
> Though I dont think you need that for what you want, that document is
> specific to NPS and presumably the naval_math skin has the config for the
> math editor. So what you really want is to install the math editor.
> 
> 
> 
> cheers,
> 
> Steve
> 
> 
> 
> On Fri, May 31, 2013 at 8:49 PM, Paul Wando Mungai < paulwando at gmail.com >
> wrote:
> 
> Hi All,
> 
> 
> 
> We are trying to incorporate the Skin Selector into the Tests and Quizzes so
> that users can use Latex Math equations. We found this document that
> outlines the steps to accomplish this:
> 
> 
> 
> http://faculty.nps.edu/dl/tools/math_tool/MathTool_tutorial.pdf
> 
> 
> 
> However, we cannot find the tool source code, or configuration steps for
> this.


More information about the sakai-dev mailing list