-
Notifications
You must be signed in to change notification settings - Fork 289
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
[UI] Dynamic Survey View - Ask teacher for class info #4612 #4711
Conversation
Hi, @Annelein! I reckon I helped you out a bit on Discord about the HTMX issue, is there anything else you need help? |
Yes you definitely helped! But working on some Hour of Code issues right now, after that I will get back at it and will get in touch with you if I need any help, thanks!! |
Great! Since this is a PR still in progress I'll set it as a draft 😄 when this is done you can set it as ready for review. |
"You tried to use the variable {name} on line {access_line_number}, but " | ||
"you set it on line {definition_line_number}. Set a variable before using " | ||
"it." | ||
msgstr "You tried to use the variable {name} on line {access_line_number}, but you set it on line {definition_line_number}. Set a variable before using it." |
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.
I am not sure why all these weird changes happen, I think @hasan-sh had a similar issue, do you remember that?
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.
Yep by omitting the --no-wrap
flag.
pybabel extract -F babel.cfg -o messages.pot . --no-location --sort-output --omit-header
pybabel update -i messages.pot -d translations -N --omit-header
Co-authored-by: Felienne Hermans <felienne@gmail.com>
website/__init__.py
Outdated
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.
I think the deletion of this file is what is causing the validation problems in the Unit test job, can you add it again and see if it solves the issue?
Woooohooo, the unit tests are passing now! Leaving the final approval to @hasan-sh since he still has a "request changes" review pending. |
@@ -297,6 +310,29 @@ def get_class_customization_page(self, user, class_id): | |||
class_id=class_id | |||
)) | |||
|
|||
def class_survey(self, class_id): |
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.
great now:)
@@ -359,3 +359,23 @@ def can_edit_class(user, Class): | |||
return Class["teacher"] == user["username"] or \ | |||
any(second_teacher["username"] == user["username"] and second_teacher["role"] == "teacher" | |||
for second_teacher in Class.get("second_teachers", [])) | |||
|
|||
|
|||
def get_unanswered_questions(survey, new_questions): |
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.
amazing job!
msgid "class_survey_later" | ||
msgstr "Remind me tomorrow" | ||
|
||
msgid "class_survey_question1" |
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.
ok different questions are fine for now
questions.append(gettext("class_survey_question2")) | ||
questions.append(gettext("class_survey_question3")) | ||
questions.append(gettext("class_survey_question4")) | ||
unanswered_questions, translate_db = utils.get_unanswered_questions(survey, questions) |
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.
makes more sense from the utils of survey;)
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.
Tested it with the latest changes. I removed the style property since we center the parent with flex, check it out @Annelein ! Will approve there after!
Wow that was a lot of hassle @Annelein!! Thanks for being so patient!! |
Ofcourse! Always on the first pull request, getting used to the whole environment :)) |
Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork). |
Fixes #4612
Survey view:
Survey table:
survey_name + '_' + response_id
(for ex for the class survey: 'class_class_id')