zeeguu/api/api/exercises.py
def report_exercise_outcome(
    exercise_outcome, exercise_source, exercise_solving_speed, bookmark_id
):
    """
    In the model parlance, an exercise is an entry in a table that
    logs the performance of an exercise. Every such performance, has a source, and an outcome.

    :param exercise_outcome: One of: Correct, Retry, Wrong, Typo, Too easy...
    :param exercise_source: has been assigned to your app by zeeguu
    :param exercise_solving_speed: in milliseconds
    :param bookmark_id: the bookmark for which the data is reported
    :return:
    """

    if not exercise_solving_speed.isdigit():
        exercise_solving_speed = 0

    try:
        bookmark = Bookmark.find(bookmark_id)
        # bookmark.report_exercise_outcome(
        #     exercise_source, exercise_outcome, exercise_solving_speed, db_session
        # )
        # print(exercise_outcome)
        BasicSRSchedule.update(
            db_session, bookmark, exercise_outcome == ExerciseOutcome.CORRECT
        )

        return "OK"
    except:
        traceback.print_exc()
        return "FAIL"

    In the model parlance, an exercise is an entry in a table that
    logs the performance of an exercise. Every such performance, has a source, and an outcome.

    :param exercise_outcome: One of: Correct, Retry, Wrong, Typo, Too easy...
    :param exercise_source: has been assigned to your app by zeeguu
    :param exercise_solving_speed: in milliseconds
    :param bookmark_id: the bookmark for which the data is reported
    :return:
    
In the model parlance, an exercise is an entry in a table that
logs the performance of an exercise. Every such performance, has a source, and an outcome.
In the model parlance an exercise is an entry in a table that logs the performance of an exercise . Every such performance has a source and an outcome .
def report_exercise_outcome(
    exercise_outcome, exercise_source, exercise_solving_speed, bookmark_id
):
    if not exercise_solving_speed.isdigit():
        exercise_solving_speed = 0
    try:
        bookmark = Bookmark.find(bookmark_id)
        BasicSRSchedule.update(
            db_session, bookmark, exercise_outcome == ExerciseOutcome.CORRECT
        )
        return "OK"
    except:
        traceback.print_exc()
        return "FAIL"
def report_exercise_outcome ( exercise_outcome , exercise_source , exercise_solving_speed , bookmark_id ) : if not exercise_solving_speed . isdigit ( ) : exercise_solving_speed = 0 try : bookmark = Bookmark . find ( bookmark_id ) BasicSRSchedule . update ( db_session , bookmark , exercise_outcome == ExerciseOutcome . CORRECT ) return "OK" except : traceback . print_exc ( ) return "FAIL"
In the model parlance, an exercise is an entry in a table that
logs the performance of an exercise.
In the model parlance an exercise is an entry in a table that logs the performance of an exercise .
"""
    In the model parlance, an exercise is an entry in a table that
    logs the performance of an exercise. Every such performance, has a source, and an outcome.

    :param exercise_outcome: One of: Correct, Retry, Wrong, Typo, Too easy...
    :param exercise_source: has been assigned to your app by zeeguu
    :param exercise_solving_speed: in milliseconds
    :param bookmark_id: the bookmark for which the data is reported
    :return:
    """ # bookmark.report_exercise_outcome( #     exercise_source, exercise_outcome, exercise_solving_speed, db_session # ) # print(exercise_outcome)
None
exercise_outcome
One of: Correct, Retry, Wrong, Typo, Too easy
One of : Correct Retry Wrong Typo Too easy
exercise_source
has been assigned to your app by zeeguu
has been assigned to your app by zeeguu
exercise_solving_speed
None
bookmark_id
the bookmark for which the data is reported
the bookmark for which the data is reported