WeBWorK Problems

Turning off MathView for a single problem

Turning off MathView for a single problem

by Paul Seeburger -
Number of replies: 8
This is a similar question to my last one, but relating to the MathView editor.

Currently there is a course-wide setting to either have the MathView editor on or off for all problems in the course.

I would like a way to either turn it on for certain problems (if it is set to off course-wide) or to turn it off for certain problems (if it is set to on course-wide).

Thanks!

Paul
In reply to Paul Seeburger

Re: Turning off MathView for a single problem

by Davide Cervone -
I don't think you can control MathView from within the problem. It works by running javascript in the page, and that is inserted into the page outside of the control of the problem. I don't think the code has any hooks to allow you to turn it off if it is loaded, and it would be awkward to get it loaded if it weren't on for the course.

I was not able to test it out very well because MathView doesn't configure MathJax properly and I couldn't get it to run at all. I'll have to post a bug report for that.
In reply to Davide Cervone

Re: Turning off MathView for a single problem

by Sean Fitzpatrick -
I came across this old thread while looking into whether selective use of MathView is possible.
It is a nice feature for some problems, but in other cases it's rather awkward and not particularly desirable: e.g. if the expected answer is numerical, or in cases where students fill out a table or array, like in a matrix.

Is there any way yet to allow for selective use of MathView?
In reply to Davide Cervone

Re: Turning off MathView for a single problem

by Sean Fitzpatrick -
Ryan's solution below works perfectly for me, as long as the problem is written in PGML and not PG.
In reply to Paul Seeburger

Re: Turning off MathView for a single problem

by Ryan Maccombs -
Well you could hide that css class in a particular problem!

In PGML it's

[@ MODES(HTML=>"<style>a.btn.codeshard-btn {display:none; }</style>",TeX=>"") @]*
In reply to Ryan Maccombs

Re: Turning off MathView for a single problem

by Sean Fitzpatrick -
Interesting. Have you tested this?
Where in the pg file would one include this line: anywhere in the preamble?
In reply to Sean Fitzpatrick

Re: Turning off MathView for a single problem

by Ryan Maccombs -
Anywhere in the problem (inside of BEGIN_PGML .... END_PGML)

Also if you get pissed off at the right hand border of your input box being rigid and straight you can include

.codeshard {border-radius:4px !important;}

to make it all nice and rounded. I needed this in order to do my limits of integration stuff: http://webwork.maa.org/moodle/mod/forum/discuss.php?d=4462 inside of a course that uses MathView.

Yeah it is tested and implemented in a course with 1000+ students
In reply to Paul Seeburger

Re: Turning off MathView for a single problem

by John Travis -
I know several people who turn on Mathview just to have the option for instantaneous rendering of equations as the student types. For that reason, it would be very nice if that portion of Mathview (or something equivalent) were to be a toggle option for the student to select from within an exercise rather than having to go to Options.

I'm thinking of of a exercise wide toggle, not just for each answer blank and certainly without having to post the little graphic after every answer blank. That way a student could turn it on when they got to an exercise for which this feature would be helpful but could turn it off (say) for exercises that had a lot of numerical or T/F answers.