-
Notifications
You must be signed in to change notification settings - Fork 2
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
240 implement questions report system #252
Merged
JeronimoMendes
merged 9 commits into
develop
from
240-implement-questions-report-system
Jun 16, 2022
Merged
240 implement questions report system #252
JeronimoMendes
merged 9 commits into
develop
from
240-implement-questions-report-system
Jun 16, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(maybe functional)
…b.com/HackerSchool/HSaoQuadrado into 240-implement-questions-report-system
Non-admins can't access nor delete reports, only create them
2 tasks
JeronimoMendes
requested changes
Jun 8, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some small changes requested. The rest is pretty good 👍
JeronimoMendes
approved these changes
Jun 16, 2022
backend/exams/models.py
Outdated
@@ -1,4 +1,5 @@ | |||
from os import extsep, rename | |||
from pyexpat import model |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't used
JeronimoMendes
added a commit
that referenced
this pull request
Nov 1, 2022
* Add resolution field to question (#243) * Add resolution field * Add resolution field to serializer * Adapt endpoint * Add resolution to submission page * Remove print * Add resource system (#251) * Create `Resource` model * Create `Resource` serializer * Create POST endpoint * Add DELETE endpoint * Add permission class * Fix overall windows unresponsiveness (#253) * Added some Font responsiveness to the Landing page * Deleted redudant information * Created Responsive Functions * Altered the Navbar and LandingPage margin structure * Revisioned Margin structure of Navbar * Restructured HomePage Icons Dims * Made settings page height responsive * Finalise Settings page restructure * Finalised Login page Restructuring * Regsiter Page responsiveness restructuring * Made Final Adjustements * Readjust the max fontsize of the homebuttons * Made Font size more reposnive in Exams * Fixed the maxWidth parameter to correct unaligned arrows in ExamPage * Implement questions report system (#252) * Report model created * Report model created (maybe functional) * Noob mistakes solved * Fix some errors * Acess blocked for non-admins Non-admins can't access nor delete reports, only create them * Small changes * Removed unused import * Bump django from 3.2.13 to 3.2.14 in /backend (#256) Bumps [django](https://github.com/django/django) from 3.2.13 to 3.2.14. - [Release notes](https://github.com/django/django/releases) - [Commits](django/django@3.2.13...3.2.14) --- updated-dependencies: - dependency-name: django dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump pillow from 9.1.0 to 9.1.1 in /backend (#231) Bumps [pillow](https://github.com/python-pillow/Pillow) from 9.1.0 to 9.1.1. - [Release notes](https://github.com/python-pillow/Pillow/releases) - [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst) - [Commits](python-pillow/Pillow@9.1.0...9.1.1) --- updated-dependencies: - dependency-name: pillow dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump terser from 5.13.1 to 5.14.2 in /frontend (#257) Bumps [terser](https://github.com/terser/terser) from 5.13.1 to 5.14.2. - [Release notes](https://github.com/terser/terser/releases) - [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md) - [Commits](https://github.com/terser/terser/commits) --- updated-dependencies: - dependency-name: terser dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump django from 3.2.13 to 3.2.15 in /backend (#270) * Add issue templates * Bump django from 3.2.13 to 3.2.15 in /backend Bumps [django](https://github.com/django/django) from 3.2.13 to 3.2.15. - [Release notes](https://github.com/django/django/releases) - [Commits](django/django@3.2.13...3.2.15) --- updated-dependencies: - dependency-name: django dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Jerónimo Mendes <39437433+JeronimoMendes@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add Makefile (#273) * Add issue templates * Update lint.yml * Add Makefile * Add Reports Page (#269) * Initial Enabling of ReportsPage * Changes made to the initial example * GetReports Backend initialised * Removal of console log * Default Collumn widths * Added Expanded Information per Report, made a Component for each report in the table * Serialized Foreign Key retrieving only one of the properties * Added Delete Icon * Delete Report Backend Added * Fixed Number Comparison * Added Erro Type Filtering * Added all filtering functionality * Styles the Dropdown according to new MUI5 Documentatio, simplification of style overrides * Enable hrefs to question page * Change table data display * Made only those with body show expandable icon * Separeted the ReportTable Component into 2 tider components * Created a button to alert what Question has more reports * Fixed Select in GenExamPage * Fixed Select in LeaderBoardPage * Added Corrections Co-authored-by: Jerónimo Mendes <jeronimo.m.mendes@gmail.com> * Implement question page (#271) * Enable Question page * Add grid layout * Create new box component * Fetch Question * Add information panel * Add resolution box * Add resources panel * Create math block component * Added Basic Structure for Comment Section, css missing * Finnished Comment Section * Finished Reply Area * Make delete only a option for mods or authors * Fixing wrong Mod User expression * Responsive Fonts added with new Hooks * Made Chat and Comment Components, for factorization * Change Comment POST body * Deleted has_upvoted and has_downvoted * Pass context * Add user serializer to comment serializer * Fix typo * Connect to backend * Update on comment deletion * Update comments on comment submission * Fix typo * Fixed Horizontal Overflow due to navbar * Made TextField reset after submission * Added prop to question so that it can be unresponsive when it is not necessary * Fixed Grid Structure inconsistencies * Report Button Added * Generic Structure of the Dialog is set * Added Submission And Form * Selected Report Type CSS * Connected With Backend * Verifications and Notifications added * Fixed Verifications inconsistencies, tidier code * Small changes to responsiveness * Made the Textfield smaller and Submit button's size static * Fixed Missing Box and Missing Question ID * Enable hrefs to question page * Added Profanity control * Asked Improvements * Allow for date to be shown in each comment * Address review comments * Added Sorting capabilities to the questionArray * Transfered the Sorting functionalities to the question page * Changed the Styling of the Branch to MUIv5 * Changed Box Styling * Fixed Visual Bug in Styling of Comments * Reduced Redunduncies and made the requested changes * Reduced More styling Redundancies and added responsive Icons * Added more responsive icons * Removed Sneaky Console Logs from previous PR * Fixed ESlint bug * Missing Bracket from Commit Merge * Fix eslint * Fix code style issues with Prettier Co-authored-by: Miguel Dinis de Sousa <miguel.dinis.s@tecnico.ulisboa.pt> Co-authored-by: Miguel Dinis <80652363+LordOfTheNeverThere@users.noreply.github.com> Co-authored-by: Lint Action <lint-action@samuelmeuli.com> * Fix node modules problem * Read env variables from .env file * Fix App.js and Navbar Unresponsiveness (#280) * Made Navbar minimally responsive for Mobile * Fixed Homepage Bug (Uncontrolled Width) added Box Component * Disabled Margins near root * Finding a workaround for the absence of global margins * Added Mobile Viewport restriction * making HomePage tidier and more responsive * More responsive changes * Missing Swipeble Drawer Functionality added * Made Swipeble Drawer occur in Mobile while no user is logged in * Added Detective SVG to the Drawer * Made changes to the Drawers text along with two new components to systematize our UI * Adjust AboutPage to 0 margin * Add min to heigfht of logo on the drawer * Converted About Page to MUIv5 styling * Added few new typography components and made some alterations to the previous ones * Used the new Components on the AboutPage tiding up styling also * Fixed Some Typography inconsistencies added padding * Finished AboutUs Restyling and Responsiveness * Made Navbar minimally responsive for Mobile * Fixed Homepage Bug (Uncontrolled Width) added Box Component * Disabled Margins near root * Finding a workaround for the absence of global margins * Added Mobile Viewport restriction * making HomePage tidier and more responsive * More responsive changes * Missing Swipeble Drawer Functionality added * Made Swipeble Drawer occur in Mobile while no user is logged in * Added Detective SVG to the Drawer * Made changes to the Drawers text along with two new components to systematize our UI * Adjust AboutPage to 0 margin * Add min to heigfht of logo on the drawer * Converted About Page to MUIv5 styling * Added few new typography components and made some alterations to the previous ones * Used the new Components on the AboutPage tiding up styling also * Fixed Some Typography inconsistencies added padding * Finished AboutUs Restyling and Responsiveness * Conflicts Collateral Damage solved * Reports Page No margin correction * Question Page no Margin Correction * Added the systematic typographies to question page * Correct Margin in Results Page * Correct Exam Page Margin * Renable Mobile Warning Page Functionality * Correct Margin Exam Page * Correct Leaderboard margin * Correct Margin Gen Exam Page * Correct Margins Landing Page * Fix import typo * Add default email backend * Bump oauthlib from 3.1.1 to 3.2.1 in /backend (#287) Bumps [oauthlib](https://github.com/oauthlib/oauthlib) from 3.1.1 to 3.2.1. - [Release notes](https://github.com/oauthlib/oauthlib/releases) - [Changelog](https://github.com/oauthlib/oauthlib/blob/master/CHANGELOG.rst) - [Commits](oauthlib/oauthlib@v3.1.1...v3.2.1) --- updated-dependencies: - dependency-name: oauthlib dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Deprecate `django.conf.urls.url` and remove unused urls (#288) * Deprecation solved * Unused urls removed * Bump django from 3.2.13 to 3.2.15 in /backend (#296) Bumps [django](https://github.com/django/django) from 3.2.13 to 3.2.15. - [Release notes](https://github.com/django/django/releases) - [Commits](django/django@3.2.13...3.2.15) --- updated-dependencies: - dependency-name: django dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix allowed hosts (#299) * Fix settings to allow list of allowed hosts * Update .env.example * Bump version Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Miguel Dinis <80652363+LordOfTheNeverThere@users.noreply.github.com> Co-authored-by: afonsofsdomingues <92863313+afonsofsdomingues@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Miguel Dinis de Sousa <miguel.dinis.s@tecnico.ulisboa.pt> Co-authored-by: Lint Action <lint-action@samuelmeuli.com> Co-authored-by: pearsettings44 <jose.a.pereira03@gmail.com>
JeronimoMendes
added a commit
that referenced
this pull request
Nov 1, 2022
* Add resolution field to question (#243) * Add resolution field * Add resolution field to serializer * Adapt endpoint * Add resolution to submission page * Remove print * Add resource system (#251) * Create `Resource` model * Create `Resource` serializer * Create POST endpoint * Add DELETE endpoint * Add permission class * Fix overall windows unresponsiveness (#253) * Added some Font responsiveness to the Landing page * Deleted redudant information * Created Responsive Functions * Altered the Navbar and LandingPage margin structure * Revisioned Margin structure of Navbar * Restructured HomePage Icons Dims * Made settings page height responsive * Finalise Settings page restructure * Finalised Login page Restructuring * Regsiter Page responsiveness restructuring * Made Final Adjustements * Readjust the max fontsize of the homebuttons * Made Font size more reposnive in Exams * Fixed the maxWidth parameter to correct unaligned arrows in ExamPage * Implement questions report system (#252) * Report model created * Report model created (maybe functional) * Noob mistakes solved * Fix some errors * Acess blocked for non-admins Non-admins can't access nor delete reports, only create them * Small changes * Removed unused import * Bump django from 3.2.13 to 3.2.14 in /backend (#256) Bumps [django](https://github.com/django/django) from 3.2.13 to 3.2.14. - [Release notes](https://github.com/django/django/releases) - [Commits](django/django@3.2.13...3.2.14) --- updated-dependencies: - dependency-name: django dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump pillow from 9.1.0 to 9.1.1 in /backend (#231) Bumps [pillow](https://github.com/python-pillow/Pillow) from 9.1.0 to 9.1.1. - [Release notes](https://github.com/python-pillow/Pillow/releases) - [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst) - [Commits](python-pillow/Pillow@9.1.0...9.1.1) --- updated-dependencies: - dependency-name: pillow dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump terser from 5.13.1 to 5.14.2 in /frontend (#257) Bumps [terser](https://github.com/terser/terser) from 5.13.1 to 5.14.2. - [Release notes](https://github.com/terser/terser/releases) - [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md) - [Commits](https://github.com/terser/terser/commits) --- updated-dependencies: - dependency-name: terser dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump django from 3.2.13 to 3.2.15 in /backend (#270) * Add issue templates * Bump django from 3.2.13 to 3.2.15 in /backend Bumps [django](https://github.com/django/django) from 3.2.13 to 3.2.15. - [Release notes](https://github.com/django/django/releases) - [Commits](django/django@3.2.13...3.2.15) --- updated-dependencies: - dependency-name: django dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Jerónimo Mendes <39437433+JeronimoMendes@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add Makefile (#273) * Add issue templates * Update lint.yml * Add Makefile * Add Reports Page (#269) * Initial Enabling of ReportsPage * Changes made to the initial example * GetReports Backend initialised * Removal of console log * Default Collumn widths * Added Expanded Information per Report, made a Component for each report in the table * Serialized Foreign Key retrieving only one of the properties * Added Delete Icon * Delete Report Backend Added * Fixed Number Comparison * Added Erro Type Filtering * Added all filtering functionality * Styles the Dropdown according to new MUI5 Documentatio, simplification of style overrides * Enable hrefs to question page * Change table data display * Made only those with body show expandable icon * Separeted the ReportTable Component into 2 tider components * Created a button to alert what Question has more reports * Fixed Select in GenExamPage * Fixed Select in LeaderBoardPage * Added Corrections Co-authored-by: Jerónimo Mendes <jeronimo.m.mendes@gmail.com> * Implement question page (#271) * Enable Question page * Add grid layout * Create new box component * Fetch Question * Add information panel * Add resolution box * Add resources panel * Create math block component * Added Basic Structure for Comment Section, css missing * Finnished Comment Section * Finished Reply Area * Make delete only a option for mods or authors * Fixing wrong Mod User expression * Responsive Fonts added with new Hooks * Made Chat and Comment Components, for factorization * Change Comment POST body * Deleted has_upvoted and has_downvoted * Pass context * Add user serializer to comment serializer * Fix typo * Connect to backend * Update on comment deletion * Update comments on comment submission * Fix typo * Fixed Horizontal Overflow due to navbar * Made TextField reset after submission * Added prop to question so that it can be unresponsive when it is not necessary * Fixed Grid Structure inconsistencies * Report Button Added * Generic Structure of the Dialog is set * Added Submission And Form * Selected Report Type CSS * Connected With Backend * Verifications and Notifications added * Fixed Verifications inconsistencies, tidier code * Small changes to responsiveness * Made the Textfield smaller and Submit button's size static * Fixed Missing Box and Missing Question ID * Enable hrefs to question page * Added Profanity control * Asked Improvements * Allow for date to be shown in each comment * Address review comments * Added Sorting capabilities to the questionArray * Transfered the Sorting functionalities to the question page * Changed the Styling of the Branch to MUIv5 * Changed Box Styling * Fixed Visual Bug in Styling of Comments * Reduced Redunduncies and made the requested changes * Reduced More styling Redundancies and added responsive Icons * Added more responsive icons * Removed Sneaky Console Logs from previous PR * Fixed ESlint bug * Missing Bracket from Commit Merge * Fix eslint * Fix code style issues with Prettier Co-authored-by: Miguel Dinis de Sousa <miguel.dinis.s@tecnico.ulisboa.pt> Co-authored-by: Miguel Dinis <80652363+LordOfTheNeverThere@users.noreply.github.com> Co-authored-by: Lint Action <lint-action@samuelmeuli.com> * Fix node modules problem * Read env variables from .env file * Fix App.js and Navbar Unresponsiveness (#280) * Made Navbar minimally responsive for Mobile * Fixed Homepage Bug (Uncontrolled Width) added Box Component * Disabled Margins near root * Finding a workaround for the absence of global margins * Added Mobile Viewport restriction * making HomePage tidier and more responsive * More responsive changes * Missing Swipeble Drawer Functionality added * Made Swipeble Drawer occur in Mobile while no user is logged in * Added Detective SVG to the Drawer * Made changes to the Drawers text along with two new components to systematize our UI * Adjust AboutPage to 0 margin * Add min to heigfht of logo on the drawer * Converted About Page to MUIv5 styling * Added few new typography components and made some alterations to the previous ones * Used the new Components on the AboutPage tiding up styling also * Fixed Some Typography inconsistencies added padding * Finished AboutUs Restyling and Responsiveness * Made Navbar minimally responsive for Mobile * Fixed Homepage Bug (Uncontrolled Width) added Box Component * Disabled Margins near root * Finding a workaround for the absence of global margins * Added Mobile Viewport restriction * making HomePage tidier and more responsive * More responsive changes * Missing Swipeble Drawer Functionality added * Made Swipeble Drawer occur in Mobile while no user is logged in * Added Detective SVG to the Drawer * Made changes to the Drawers text along with two new components to systematize our UI * Adjust AboutPage to 0 margin * Add min to heigfht of logo on the drawer * Converted About Page to MUIv5 styling * Added few new typography components and made some alterations to the previous ones * Used the new Components on the AboutPage tiding up styling also * Fixed Some Typography inconsistencies added padding * Finished AboutUs Restyling and Responsiveness * Conflicts Collateral Damage solved * Reports Page No margin correction * Question Page no Margin Correction * Added the systematic typographies to question page * Correct Margin in Results Page * Correct Exam Page Margin * Renable Mobile Warning Page Functionality * Correct Margin Exam Page * Correct Leaderboard margin * Correct Margin Gen Exam Page * Correct Margins Landing Page * Fix import typo * Add default email backend * Bump oauthlib from 3.1.1 to 3.2.1 in /backend (#287) Bumps [oauthlib](https://github.com/oauthlib/oauthlib) from 3.1.1 to 3.2.1. - [Release notes](https://github.com/oauthlib/oauthlib/releases) - [Changelog](https://github.com/oauthlib/oauthlib/blob/master/CHANGELOG.rst) - [Commits](oauthlib/oauthlib@v3.1.1...v3.2.1) --- updated-dependencies: - dependency-name: oauthlib dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Deprecate `django.conf.urls.url` and remove unused urls (#288) * Deprecation solved * Unused urls removed * Bump django from 3.2.13 to 3.2.15 in /backend (#296) Bumps [django](https://github.com/django/django) from 3.2.13 to 3.2.15. - [Release notes](https://github.com/django/django/releases) - [Commits](django/django@3.2.13...3.2.15) --- updated-dependencies: - dependency-name: django dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix allowed hosts (#299) * Fix settings to allow list of allowed hosts * Update .env.example * Bump version * Fix python version Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Miguel Dinis <80652363+LordOfTheNeverThere@users.noreply.github.com> Co-authored-by: afonsofsdomingues <92863313+afonsofsdomingues@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Miguel Dinis de Sousa <miguel.dinis.s@tecnico.ulisboa.pt> Co-authored-by: Lint Action <lint-action@samuelmeuli.com> Co-authored-by: pearsettings44 <jose.a.pereira03@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes #240