Hi all
We are running edX to provide LMS in our university. In some courses, we want to have multichoice question based on formular and parameters (as “calculated question” in Moodle: Calculated question type - MoodleDocs). Is there any Xblock to provide such similar function in edX? Very appreciate if anyone can provide comments or suggetion.
@Hoang_PHAM_HUY This snippet will do what that Moodle example does:
<problem>
<script type="loncapa/python">
w = random.randint(0, 10)
h = random.randint(0, 10)
area = w * h
</script>
<label>Calculate the area of a rectangle, given the height and width below:</label>
<p>Height = $h</p>
<p>Width = $w</p>
<numericalresponse answer="$area">
<textline size="10"/>
</numericalresponse>
<solution>
<div class="detailed-solution">
<p>Explanation</p>
<p>Multiply the width by the height to get the area.</p>
</div>
</solution>
</problem>