Check Consistency Session
Class used to elaborate vote consistency in the session.
CheckConsistencySession
Source code in apps/votes_results/classes/vote_consistency/check_consistency_session.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | |
check_consistency(poll, mj_ratings, session_single_option_vote_id, session_consistency_check)
Checks if the single option vote is consistent with the mj choises. If the vote is not consistent returns True, otherwise False. In case of vote is not consiste, it updates the session parameter in order to notify the user about the inconsistency.
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if the vote is not consisnte, False otherwise. |
Source code in apps/votes_results/classes/vote_consistency/check_consistency_session.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | |
clear_session(consistency_session_params)
Clears the consistency session parameters. In safe mode.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
consistency_session_params |
List[str]
|
The consistency session parameters. |
required |
Source code in apps/votes_results/classes/vote_consistency/check_consistency_session.py
40 41 42 43 44 45 46 47 48 | |