Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E2345. Reimplement QuestionnairesController and QuestionsController #20

Merged
merged 14 commits into from
Jun 15, 2023

Conversation

Vineet2311
Copy link
Contributor

No description provided.

@Vineet2311 Vineet2311 changed the title Reimplemented questions and questionnaire controller E2321. Reimplement QuestionnairesController and QuestionsController Mar 21, 2023
app/controllers/api/v1/questionnaires_controller.rb Outdated Show resolved Hide resolved
app/controllers/api/v1/questionnaires_controller.rb Outdated Show resolved Hide resolved
app/controllers/api/v1/questionnaires_controller.rb Outdated Show resolved Hide resolved
app/controllers/api/v1/questionnaires_controller.rb Outdated Show resolved Hide resolved
app/controllers/api/v1/questionnaires_controller.rb Outdated Show resolved Hide resolved
app/controllers/api/v1/questionnaires_controller.rb Outdated Show resolved Hide resolved
app/controllers/api/v1/questionnaires_controller.rb Outdated Show resolved Hide resolved
app/controllers/api/v1/questionnaires_controller.rb Outdated Show resolved Hide resolved
app/controllers/api/v1/questionnaires_controller.rb Outdated Show resolved Hide resolved
app/controllers/api/v1/questionnaires_controller.rb Outdated Show resolved Hide resolved
@Vineet2311 Vineet2311 changed the title E2321. Reimplement QuestionnairesController and QuestionsController E2345. Reimplement QuestionnairesController and QuestionsController Apr 22, 2023
Added question.rb and questionnaire.rb. Updated questionnaires_controller.rb and questions_controller.rb with revised implementation of endpoints.

Test cases in questionnaires_spec.rb modified.

Swagger yaml updated for questionnaires endpoints

Added test cases for questionnaires model.

Dockerize the application and added institution, updated roles and users (expertiza#26)

* dockerized the rails app
* Changes to User, Institution, and Role

Signed-off-by: Ankur Mundra <20452032+mundra-ankur@users.noreply.github.com>

E2345 Reimplementation Questionnaire and Question controller

Added comments to questionnaires and questions controller tests

Updated questions_spec.rb

as_json method updated

Updated questions controller test

Updated questions controller test

Updated question controller test

Updated questions_controller test cases

swagger api-docs added.

refactored questions_controller.rb and questionnaires_controller.rb

Added as_json method in question and questionnaire model

Create LICENSE

refactored question.rb

rspec tests added.

Added tests for questionnaire and question model

Added comments to questionnaires controller and questions controller

Added comments for questionnaire and question model test cases

questions_spec.rb created.

questionnaires_spec.rb copy endpoint tests added.

Questionnaire copy endpoint and model function updated to handle instructor id dynamiccally.

test cases added for questionnaire endpoints to handle more response codes.

questionnaires_spec rswag tests added for toggle_access and delete endpoint.

questionnairescontroller.rb updated with new response code.

questionnaires_spec rswag tests added.

updated test cases for questionnaires_controller.

Question_spec.rb updated.

Questionnaire_spec.rb updated.

Resolved bugs in questionnaire_spec

test cases added

added test cases for questions.rb

bug fixes

bug fixes

Test cases updated

Updated Questionnaire_spec.rb

Fixed bug for Questionnaire_spec.rb and resolved 9/17 tests

Create LICENSE

Dockerize the application and added institution, updated roles and users (expertiza#26)

* dockerized the rails app
* Changes to User, Institution, and Role

Signed-off-by: Ankur Mundra <20452032+mundra-ankur@users.noreply.github.com>

Address review feedbacks

Added question.rb and questionnaire.rb. Updated questionnaires_controller.rb and questions_controller.rb with revised implementation of endpoints.
minor bug fixes

minor changes to tests

Updated questions_spec.rb

Added comments to questionnaires and questions controller tests

Updated questions controller test

Updated questions controller test

Updated question controller test

Updated questions_controller test cases

swagger api-docs added.

refactored questions_controller.rb and questionnaires_controller.rb

rspec tests added.

questions_spec.rb created.

questionnaires_spec.rb copy endpoint tests added.

Questionnaire copy endpoint and model function updated to handle instructor id dynamiccally.

test cases added for questionnaire endpoints to handle more response codes.

questionnaires_spec rswag tests added for toggle_access and delete endpoint.

questionnairescontroller.rb updated with new response code.

questionnaires_spec rswag tests added.

updated test cases for questionnaires_controller.

Question_spec.rb updated.

Questionnaire_spec.rb updated.

bug fixes

bug fixes

Various bug fixes

Dockerize the application and added institution, updated roles and users (expertiza#26)

* dockerized the rails app
* Changes to User, Institution, and Role

Signed-off-by: Ankur Mundra <20452032+mundra-ankur@users.noreply.github.com>

Added test cases for questionnaires model.

Swagger yaml updated for questionnaires endpoints
@rohan22shah
Copy link
Contributor

Changes made according to final feedback:

  • Added /questions/show_all/questionnaire/ endpoint in QuestionsController to fetch all questions for a particular questionnaire.
  • Modified delete_all endpoint's path to /questions/delete_all/questionnaire/
  • Updated HTTP method of update endpoints in QuestionsController and QuestionnairesController to PATCH instead of PUT.
  • Added test cases for show_all endpoint in questions_spec.rb
  • Added test cases for PATCH endpoints for update method in questions_spec.rb and questionnaires_spec.rb

@rohan22shah
Copy link
Contributor

Note:
During the reimplementation, the type attribute of Question and Questionnaire model was changed to question_type and questionnaire_type. This was done to prevent implicit inheritance of each model since those model files are not available in the reimplementation. This can be simply refactored once those files are available.

Copy link
Member

@mundra-ankur mundra-ankur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just wanted to say that overall, I think you guys did a great job with the implementation of the questionnaire and questions. However, there are a few issues that I'd like to address. If you could help me out with those, I would really appreciate it!
Thanks so much for your assistance.

app/controllers/api/v1/questionnaires_controller.rb Outdated Show resolved Hide resolved
app/controllers/api/v1/questionnaires_controller.rb Outdated Show resolved Hide resolved
app/controllers/api/v1/questions_controller.rb Outdated Show resolved Hide resolved
app/controllers/api/v1/questions_controller.rb Outdated Show resolved Hide resolved
app/models/question.rb Outdated Show resolved Hide resolved
app/models/question.rb Outdated Show resolved Hide resolved
app/models/questionnaire.rb Show resolved Hide resolved
config/database.yml Outdated Show resolved Hide resolved
@mundra-ankur mundra-ankur self-requested a review June 15, 2023 22:44
@mundra-ankur mundra-ankur merged commit 7620bed into expertiza:main Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants