Skip to content

Ready: Issue 93 Database Overhaul

Daniel Solash requested to merge issue_93_questionnaire_database into main

License and Copyright Notice

By submitting this issue or commenting on this issue, or contributing any content to this issue, you certify under the Developer Certificate of Origin that the content you post may be licensed under GPLv3 (for code) or CC-BY-SA 4.0 International (for non-code content).

Branch Name

issue_93_questionnaire_database

Related Issues

Issue #93 (closed)

Description

Overhauled the QuestionnaireHelper class' database system so that it's more convenient to the programmer

Steps to Test

(List the steps needed to test this merge request here using bullets, for ex:)

  1. Scan the barcode with the guest id GHI-9012 on the guest check in option
  2. If this is your first time running this code on the device, when asked if this is your first visit, say yes. If not say no and it will pull the last visit counter. The first visit button is there but not functional because the system knows if it's the first visit or not.
  3. Run the database inspector and look for the questionnaire submission database and see results!

Relevant Screenshots

Relevant Logs

Developer Notes

  • Changed the column names to those reflected by the questionnaire instead of "question_1..."
  • Updated the QuestionnaireSubmission to reflect the changes to the table
  • Updated the cursor to submission method to reflect changes to the table
  • Updated the SubmitQuestionnaire method to reflect changes to the table
  • Added a date column that pulls directs from system time
  • Added a counter that increments each time the user visits
  • Added a query method to find the number of visits based on the last highest visit from the database. This method can be used as the framework for other queries we may need in the future.
  • Added functionality to smartly say first visit or not based on counter (deprecates the first visit view)
Edited by Daniel Solash

Merge request reports