Copyclare package#

App module#

Contributors: Adi Bozzhanov, Yan Lai

class copyclare.app.App#

Bases: object

The App class manages all the switching between pages of the app.

add_video_card_to_banner(ex)#

Adds a new video card for newly-added exercise in the ‘Exercise Library’ banner.

Parameters

ex (Exercise) – The newly-added exercise to be added to ‘Exercise Library’.

end_exercise(attempt)#

Hides and deletes exercise page, and reveals all previously hidden contents

Updates Profile page with new history card and progress chart, and exports accuracy graph of attempt

get_pages()#

Spits out a set of pages.

Returns

set

init_pages()#
load_page(page='landing', attempt=None)#

Loads a page given the page name

move_to_my_exercises(ex)#

Adds a new video card for selected exercise in the ‘My Exercises’ banner.

Parameters

ex (Exercise) – The chosen exercise to be moved to ‘My Exercises’.

pages = {'home': <class 'copyclare.pages.home.HomePage'>, 'landing': <class 'copyclare.pages.landing.LandingPage'>, 'not_found': <class 'copyclare.pages.not_found.NotFound'>, 'progress': <class 'copyclare.pages.profile.ProfilePage'>, 'video_addition': <class 'copyclare.pages.video_addition.VideoAddition'>}#
remove_from_my_exercises(ex)#

Removes video card for selected exercise in the ‘My Exercises’ banner.

Parameters

ex (Exercise) – The chosen exercise to be removed from ‘My Exercises’.

start_exercise(exercise)#

Hide all the contents including navbar and create an exercise instance

Upon completion of the exercise process, log the results of the attempt in the database.

start_ui()#

copyclare.common module#

Contributors: Adi Bozzhanov

class copyclare.common.AppSingleton#

Bases: object

classmethod get_app()#
copyclare.common.load_ui(fname)#

Loads the UI file and returns the UI object.

Parameters

fname (str)) – name of the UI element

Returns

this is the object degenerated from UI

Return type

object

copyclare.config module#

Contributors: Adi Bozzhanov

copyclare.config.DEBUG = False#

Set this to either True or False depending on if you want to compile ui directly from .ui files or use the compiled version. This is very useful when working with ui files and trying to see changes quickly without having to manually recompiled everything.

copyclare.ui_element module#

Contributors: Adi Bozzhanov