コード例 #1
0
def leaderboard(phone_num):
    well = 'Anushree'
    poorly = 'Anita'
    send_sms(
        phone_num,
        'Today in your community, %s is doing really well with %d courses completed. If you see her around, tell her congratulations! If you see %s around, make sure to encourage her to continue working with teachHer!'
        % (well, 10, poorly))
コード例 #2
0
def ans_verify(phone_num, message):
    # TODO: set taking_quiz = False
    # TODO: query the answers
    if ans.lower() != message.lower():
        send_sms(phone_num, 'Sorry the answer was incorrect')
    else:
        send_sms(phone_num,
                 'Congratulations! You have entered the correct answer :)')
コード例 #3
0
def prize(phone_num):
    send_sms(
        phone_num,
        'Congratulations! You received a 10 SDG reward for all of your hard work. Please visit Parker, your community member for your confirmation code and enter it!'
    )
    send_sms(
        '+16177101266',
        'Hi Parker! A member of your community, %s has earned a reward through teachHer. Please give her the code %d when you see her so she can redeem her prize! Thanks for your help.'
        % (users[phone_num][0], conf_code))
コード例 #4
0
def ans_verify(phone_num, message):
    # set taking_quiz = False
    users[phone_num][3] = False
    # query the answers
    if ans[course_num][class_num +
                       1] != [x.upper() for x in message.split(",")]:
        send_sms(phone_num, 'Sorry the answer was incorrect')
    else:
        send_sms(
            phone_num,
            'Congratulations! You have entered the correct answer. You are learning so much!'
        )
        # update the status of the phone number in db
        users[phone_num][2] += 1
        print(users[phone_num][2])
        to_send = lessons[users[phone_num][1]][
            users[phone_num][2] + 1]  # TODO: query the class information
        send_sms(phone_num, to_send)
コード例 #5
0
def quiz(phone_num):
    to_send = query_quiz_content(course_num + 1, class_num + 1)  #
    send_sms(phone_num, to_send)
コード例 #6
0
def resume(phone_num):
    to_send = query_class_content(course_num + 1, class_num +
                                  1)  # TODO: query the class information
    send_sms(phone_num, to_send)
コード例 #7
0
def help(phone_num):
    assist = '+16177101267'
    send_sms(phone_num,
             'Please contact this number for furthuer assistance: %s' % assist)
コード例 #8
0
def progress(phone_num):
    send_sms(
        phone_num, 'Current progress is at %s class number %s' %
        (courses[course_num], class_num))
コード例 #9
0
def in_db(phone_num):
    send_sms(
        phone_num,
        'Hi! Welcome to Education.Go, an on-the-go education system. To see all the courses that are available, type "C". If you need help, type "HELP". To return to the home text, type HOME.'
    )
コード例 #10
0
def not_in_db(phone_num):
    send_sms(
        phone_num,
        'Sorry this phone number is currently not registered in our database. Please contact a local refugee camp manager to sign up :)'
    )
コード例 #11
0
def put_money(phone_num):
    send_sms(
        phone_num,
        'We have deposited the 10 SDG reward in your parents account through MPesa. Keep up all the hard work!'
    )
コード例 #12
0
def quiz(phone_num):
    to_send = quiz_content[course_num][class_num + 1]
    send_sms(phone_num, to_send)
コード例 #13
0
def welcome_arabic(phone_num):
    send_sms(
        phone_num,
        'مرحبا! مرحبا بكم في تيتشير، وهو نظام التعليم على الحركة والتنقل مصممة للنساء. شكرا للتسجيل في دورات اللغة الإنجليزية. لمشاهدة جميع الدورات المتوفرة، اكتب "C". إذا كنت بحاجة إلى مساعدة، اكتب "هيلب". للعودة إلى النص الرئيسي، اكتب هوم.'
    )
コード例 #14
0
def welcome_english(phone_num):
    send_sms(
        phone_num,
        'Hi! Welcome to teachHer, an on-the-go education system designed for women. Thanks for registering for courses in English. To see all the courses that are available, type "C". If you need help, type "HELP". To return to the home text, type HOME.'
    )
コード例 #15
0
def resume(phone_num):
    to_send = lessons[course_num][class_num + 1]
    send_sms(phone_num, to_send)