Changeset 2018


Ignore:
Timestamp:
09/14/07 10:19:58 (12 years ago)
Author:
jukka
Message:

Exercise...

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ExerciseMaterial.py

    r2017 r2018  
    8282        return dump 
    8383 
     84    def isCorrectAnswer(self, chapter, answer_index): 
     85        """ given a chapter having a multiple choice question, is this answer in correct answers? """  
     86        return answer_index < len(chapter[1]) 
     87         
     88 
    8489    security.declareProtected(MODIFY_CONTENT,'delChapter') 
    8590    def delChapter(self, REQUEST): 
  • trunk/skins/lemill/widget_exercise.pt

    r2017 r2018  
    126126            <tal:multiple_choices condition="python: type=='multiple_choices'"> 
    127127             <label><tal:block i18n:translate="label_exercise_multiple_choice_question">Multiple choice question:</tal:block>:</label> 
    128              <span tal:define="question python:chapter[0]; answers python:widget.getAllAnswers()" tal:omit-tag="" /> 
     128             <span tal:define="question python:chapter[0]; answers python:context.getAllAnswers(chapter)" tal:omit-tag="" /> 
    129129             <div tal:content="question">PLACEHOLDER</div> 
    130130 
Note: See TracChangeset for help on using the changeset viewer.