Esempio n. 1
0
 def tutorial_msg(step=0):
     if step == 0:
         return "You've finished our small tutorial. What would you like to do now? Do the grammar or the pronunciation exercise?"
     elif step == 1:
         return 'Welcome to the grammar exercise. I will give you an infinitive and the tense in which it should be used. \
         The ' + Sounds.beep() + ' beep sound shows you where the correct verbform should go. \
         I will do the first one: <break time="1s" /> To go <break time="1s"/> \
         simple past <break time="1s"/> I ' + Sounds.beep() + ' to the park. \
         <break time="1s"/> The correct answer would be <break time="1s"/> I walked in the park. <break time="1s"/>  Now it is your turn! '
     elif step == 2:
         return '<break time="1s"/> Now let\'s move on to the pronunciation exercise<break time="1s"/>'
     else:
         return ''
Esempio n. 2
0
def load_new_exercise_data():
    ex_obj = random.choice(ex_iv)
    session.attributes['solution_verbform'] = ex_obj['answer']
    session.attributes['solution_sentence'] = "%s %s %s" % (
        ex_obj['sentence_front'], ex_obj['answer'], ex_obj['sentence_back'])
    session.attributes['task'] = "%s, %s, %s" % (
        ex_obj['verb'], ex_obj['tense'],
        ex_obj['sentence_front'] + Sounds.beep() + ex_obj['sentence_back'])
    session.attributes['HelpLeadsTo'] = ex_obj['tense']
Esempio n. 3
0
 def exercise(ex_type):
     if ex_type == 'INSERT_VERBS':
         return '\
                 You are doing an exercise where you have to say the correct time form.\
                 Here is an example: To shine. will future.\
                 The sun' + Sounds.beep() + 'tomorrow.\
                 The correct answer would be: The sun will shine tomorrow. You got that?\
         '
     elif ex_type == 'REPEAT_AFTER_ME':
         return 'In this exercise you just have to repeat the whole sentence. You got that?'
     else:
         return 'Sorry, I can not handle this help'