Definition at line 34 of file helper_functions.py.
def helper_functions.CognitiveExerciseHelperFunctions.determineTestTypeListForReturningScoresOrHistory |
( |
|
testType, |
|
|
|
validtestTypesList |
|
) |
| |
|
static |
Validates the provided test type or selects all test types from ontology if non provided.
- Parameters
-
testType | [string] The provided test type |
validtestTypesList | [list] The list of valid test types |
- Returns
- testTypesList [list] The list of testTypes returned
- Exceptions
-
Definition at line 166 of file helper_functions.py.
def helper_functions.CognitiveExerciseHelperFunctions.filterTestsbyDifficultyAndSubtype |
( |
|
testsOfType, |
|
|
|
chosenDif, |
|
|
|
testSubType |
|
) |
| |
|
static |
Filters the tests by Difficulty and test subtype.
- Parameters
-
testsOfType | [dictionary] The dictionary containing all the tests |
chosenDif | [string] The test difficulty |
testSubType | [string] The test sub type |
- Returns
- d [dictionary] The selected cognitive tests after filtering was applied
Definition at line 132 of file helper_functions.py.
def helper_functions.CognitiveExerciseHelperFunctions.getCognitiveTestsOfType |
( |
|
testType, |
|
|
|
userLanguage |
|
) |
| |
|
static |
Gets the cognitive tests of the given type and difficulty available in the ontology.
- Parameters
-
testType | [string] The test type (category) |
userLanguage | [string] The user's language |
- Returns
- cognitiveTestsOfTypeResponse [cognitiveTestsOfTypeResponse] The cognitive tests of type service response
- Exceptions
-
Definition at line 113 of file helper_functions.py.
def helper_functions.CognitiveExerciseHelperFunctions.getTestLanguagesFromOntology |
( |
| ) |
|
|
static |
Queries the ontology and returns the cognitive test languages available.
- Returns
- languagesList [list] The list of the available cognitive test languages they were read from the ontology
- Exceptions
-
Definition at line 91 of file helper_functions.py.
def helper_functions.CognitiveExerciseHelperFunctions.getTestTypesFromOntology |
( |
| ) |
|
|
static |
Queries the ontology and returns the cognitive test types available.
- Returns
- testTypesList [list] The list of the available tests as they were read from the ontology
- Exceptions
-
Definition at line 71 of file helper_functions.py.
def helper_functions.CognitiveExerciseHelperFunctions.getUserLanguage |
( |
|
username | ) |
|
|
static |
Queries the MySQL database through the MySQL wrapper and returns the user's language.
- Parameters
-
username | [string] The username of the user as is in the MySQL database |
languageInSrv | [string] The user's language for assigning it to the srv response trace |
- Returns
- userLanguage [string] The user's language
- Exceptions
-
Definition at line 149 of file helper_functions.py.
def helper_functions.CognitiveExerciseHelperFunctions.getUserOntologyAlias |
( |
|
username | ) |
|
|
static |
Gets the users ontology alias and if it doesnt exist it creates it.
- Parameters
-
username | [string] The user's username |
- Returns
- ontologyAlias [string] The user's ontology alias
- Exceptions
-
Definition at line 56 of file helper_functions.py.
def helper_functions.CognitiveExerciseHelperFunctions.getUserPerformanceRecordsForTestType |
( |
|
testType, |
|
|
|
userOntologyAlias |
|
) |
| |
|
static |
Gets the user cognitive test performance records for given test type.
- Parameters
-
username | [string] The user's username |
- Returns
- userPerformanceReq [rapp_platform_ros_communications::userPerformanceCognitveTestsSrvRequest::Request&] The user's performance records
- Exceptions
-
Definition at line 42 of file helper_functions.py.
def helper_functions.CognitiveExerciseHelperFunctions.organizeUserPerformanceByTimestamp |
( |
|
userPerf | ) |
|
|
static |
Organizes the user's performance entries by timestamp.
- Parameters
-
userPerf | [dict] The dictionary containing the user's performance entries |
- Returns
- userPerfOrganizedByTimestamp [OrderedDict] The dictionary containing the user's performance entries organized by timestamp
Definition at line 182 of file helper_functions.py.
def helper_functions.CognitiveExerciseHelperFunctions.traceError |
( |
|
error, |
|
|
|
trace |
|
) |
| |
|
static |
Traces and returns the code line where an error occured.
- Parameters
-
error | [String] the error occured |
trace | [list] the execution messages trace list |
trace | [list] the execution messages trace list |
Definition at line 196 of file helper_functions.py.
The documentation for this class was generated from the following file: