-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from QuizApp-Group/develop
Pull in master
- Loading branch information
Showing
14 changed files
with
162 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ Contents | |
:maxdepth: 1 | ||
|
||
getting_started | ||
understanding_quizapp | ||
understanding_models | ||
import_export | ||
mturk | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.. _understanding_quizapp: | ||
|
||
################################### | ||
Understanding the QuizApp structure | ||
################################### | ||
|
||
There are 3 principle parts of the quizApp system: the experiments, activities, and datasets. The experiment components handle tasks related to rendering, running, and updating experiments - this includes showing assignments to participants, saving their answers, generating experiment reports, and more. Activities is concerned primarily with rendering and managing activities. Datasets is primarily concerned with managing datasets as well as rendering and managing activities. Most components of quizApp are divided along these broad lines. | ||
|
||
As far as application logic goes, quizApp follows a fairly typical MVC design pattern. The ``quizApp/`` directory is organized like so: | ||
|
||
- ``forms``: Contains logic used for rendering and validating forms | ||
- ``static``: Contains static files, like graphs, css, and js | ||
- ``templates``: Contains template files, which specify what is displayed to the users and in what format | ||
- ``views``: Contains view logic that interfaces with the models and sends data to templates for rendering | ||
- ``models.py``: Database models that specify how information is stored in the database and take care of validation. More information about models is available in :ref:`understanding_models`. | ||
- ``filters.py``: Various jinja filters that are used for formatting and rendering purposes | ||
- ``__init__.py``: File that handles setup and initialization of the application | ||
|
||
************ | ||
QuizApp Flow | ||
************ | ||
|
||
In general, each view file registers a number of URLs that are handled by some function in the view file. When a user makes a request to a certain endpoint, the view function first checks authentication, then validates the URL (if applicable, e.g. checking to make sure the requested experiment exists), accesses the database (if necessary), performs any necessary processing, then sends some context variables to a template, which is rendered and shown to the user. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.