Using Degrees not Radians in Calculated Question

Using Degrees not Radians in Calculated Question

by michael nicholson -
Number of replies: 1

I am attempting to write a calculated question for carpentry students. Formula for question is ({s}/2)/cos({x}). My issue is that moodle recognises value "x" in radians whilst students are working in degrees. Moodle will convert "x" to degrees and then perform calculation but the students will be working with the raw number.

Is there a code to rectify this or  is there a setting in the back end of moodle that changes units used to degrees ?

Average of ratings: -
In reply to michael nicholson

Re: Using Degrees not Radians in Calculated Question

by Cristina Berisso -

In the formula for the calculated question Just multiply the "x" by pi and divide by 180 within the argument for cosine