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

Add - Quiz Editor Menu - Adding Questions #138

Merged
merged 51 commits into from
Nov 27, 2024
Merged

Conversation

adomasciplys
Copy link
Contributor

@adomasciplys adomasciplys commented Nov 22, 2024

Description

NOTE: Please merge #137 before this PR

This PR has been created to fix the issues in the styling_setup branch. It is now possible to create questions and add answers to the corresponding question. These are stored in the database when clicking "Add Question". The UI also shows a list of the questions present in the quiz. Lastly, we distinguish between a student and a lecturer, where only the lecturer can edit the quiz.

What is added/changed/removed

Quiz Editor Menu to

  • Create Questions
  • Add answers
  • Submit questions to DB
  • Get overview of existing questions

Issue/fixes reference

https://github.com/orgs/AAU-P5-Moodle/projects/2?pane=issue&itemId=82025880&issue=AAU-P5-Moodle%7Cmoodle-1%7C46, https://github.com/orgs/AAU-P5-Moodle/projects/2/views/1?pane=issue&itemId=85503814&issue=AAU-P5-Moodle%7Cmoodle-1%7C54, and https://github.com/orgs/AAU-P5-Moodle/projects/2/views/1?pane=issue&itemId=82021250&issue=AAU-P5-Moodle%7Cmoodle-1%7C45

Testing

Automatic Testing

  • Behat tests for the UI changes
  • PHPunit tests for the external classes interacting with DB

Manual Testing

  • Try adding questions and see that they appear both in the database and in the list in the quiz editor menu
  • Login as a student and check the quiz editing menu does not appear for students

Checks

  • Updated / added tests for these changes
  • PHPunit locally passed
  • Codesniffer locally passed
  • Behat locally passed

EmilChri and others added 30 commits November 20, 2024 09:01
Co-authored-by: Emil <EmilChri@users.noreply.github.com>
Co-authored-by: Andreas Valentin Pedersen <Andreas272@users.noreply.github.com>
Co-authored-by: Mads Poulsen <CGAddict@users.noreply.github.com>
Co-authored-by: Emil <EmilChri@users.noreply.github.com>
Co-authored-by: Andreas Valentin Pedersen <Andreas272@users.noreply.github.com>
Co-authored-by: Mads Poulsen <CGAddict@users.noreply.github.com>
Co-authored-by: Mads Poulsen <CGAddict@users.noreply.github.com>
Added behat tests + added id's for checkboxes and answers option
…---QuizCreator

# Conflicts:
#	server/moodle/mod/livequiz/amd/build/question.min.js.map
#	server/moodle/mod/livequiz/amd/build/question_editor.min.js
#	server/moodle/mod/livequiz/amd/build/question_editor.min.js.map
#	server/moodle/mod/livequiz/amd/src/question_editor.js
#	server/moodle/mod/livequiz/attempt.php
#	server/moodle/mod/livequiz/demodata.json
#	server/moodle/mod/livequiz/results.php
#	server/moodle/mod/livequiz/version.php
@adomasciplys adomasciplys requested a review from DeeKahy November 22, 2024 14:15
@Peterrahr Peterrahr mentioned this pull request Nov 26, 2024
4 tasks
Copy link
Contributor

@DeeKahy DeeKahy left a comment

Choose a reason for hiding this comment

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

If it works it works. I still want answers to my questions even if it gets merged. Great job <3

server/moodle/mod/livequiz/version.php Show resolved Hide resolved
@adomasciplys adomasciplys merged commit cd4da15 into staging Nov 27, 2024
3 checks passed
@Laczse Laczse deleted the Add---QuizCreator branch November 28, 2024 08:14
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.

7 participants