-
Notifications
You must be signed in to change notification settings - Fork 292
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] adds Hedy dashboard & common error detection #4166
Conversation
@@ -49,6 +49,7 @@ <h1>{{ class_info.name }}</h1><span class="cursor-pointer" onclick='hedyApp.rena | |||
<button class="green-btn" id="add-student" onclick=$('#add_students_options').toggle();$(this).toggleClass('green-btn');$(this).toggleClass('blue-btn');>{{_('add_students')}}</button> | |||
<button class="green-btn" id="customize-class-button" data-cy="customize_class_button" onclick="window.location.href = '/for-teachers/customize-class/{{class_info.id}}'">{{_('customize_class')}}</button> | |||
{% endif %} | |||
<button class="green-btn" id="live_stats_button" onclick="window.location.href = '/live_stats/class/{{class_info.id}}'">{{_('class_live')}}</button> |
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.
class_live I think is a new babel string? Be sure to run the pybabel extraction command (see docs) so it will be added to the pot files and can be translated.
for more information, see https://pre-commit.ci
Start on the mock up version of the live dashboard, me and Ariyan looked through it together and he approves. He couldn't approve the changes himself because he wasn't a member of the hedyorg yet.
A new html doc for the pop ups that inherits from the live page, the macro is adjusted to allow a link for the href (although clicking on the item makes it crash right now) and a render function for the pop up page was also added in statistics.py
Fixed the issue where it threw an error when clicking on a struggle item, had to do with passing jinja vars into a macro. Moved the block popup_content into the right location, otherwise it isn't drawn. Created a pop up card with transparent background elements to blend out the rest of the dashboard
Added some backend code in preparation to show last ran program on the popup card. Moreover, the dummy data was slightly updated to reflect the version we have in mind for the mock up better.
We need to know which student has been selected to add the correct data to the student details. Good to note: currently only one student can be selected at a time.
for more information, see https://pre-commit.ci
[RU] Fill content student details
Added a height of 120% otherwise the transparent overlay did not cover all the content which made it look off. Fixed an error that crept in previously where I tried linking a student to the page already, but the functionality for that we will introduce at a later stage. Therefore it was error proofed in statistics.py
[RU] Implemented clickable popup windows for the common errors section of the dashboard
% student images added for prototype
added student bubbles and margined them (temp images)
Previously style was used for individual items, it was changed to use only tailwind css classes. Moreover, the spacing of the list items was off and so this was fixed
Ru bubbles for students
I changed the way the misconceptions are gathered. I changed the name to exception types (suggestion by @Felienne) and also made them language independent by using the already tracked exceptions per program. This means that the Also, I haven't realized before that the commor exceptions types per class were stored in the customizations table. This is a bad idea, because they are two conceptually different entities, and also if the teacher deletes the customizations they will also delete this important bit of their class information! So I think this should go to the |
Yes, better to remove that field it was a bit of a weird way of storing!
Ah what a good catch @jpelay!! This indeed should be stored elsewhere. Maybe on the student rather than on the class (or on the program) after which we can gather them per student/per class (potentially with some caching in the DB otherwise it'll be too expensive?)
<3 |
Sorry, I don't I don't fully understand this 😅. For clarification you mean storing the groups of exceptions a student have incurred per student right? Right now they're stored line this: "class": {
"common_errors": [
{
"label": "invalid_command_exception",
"active": 1,
"students": ["student1", "student2"]
}
]
} In which table do you think we could store this information? These groups are already gathered every time the teacher access the Class live page, they are actually being recomputed every time, they're stored in the database only in case the teacher decides to ignore that specific group of exceptions. |
I created a new table where we store the common errors for a class. This table has the following structure:
Also, I created a new function for better handling of the class customizations. I tested the page with classes with no customizations and it works now. |
else: | ||
# forcefully overwrite oldest error despite not being resolved and set oldest half of the db to | ||
# inactive to free up space | ||
# Todo: could use a better way to handle this | ||
new_id = 0 | ||
|
||
for i in range(self.MAX_COMMON_ERRORS // 2): | ||
common_errors['errors'][i]['active'] = 0 | ||
self.db.update_class_errors(common_errors) | ||
|
||
return new_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.
I don't know if this is really necessary. This enforces a limit of 10 exception groups per class, so if the students of a class have made exceptions belonging to 10 different groups, it'll delete the 5 previous ones to make room for new. I think this is for not to clutter the UI. What do you think, @Felienne, do we leave this?
With that said, @Felienne this is done!!! |
Hi @karlijnbok!! It took a while but we are ready to merge this, and it will appear on the website soon! Thanks a lot on behalf of the Hedy team!! |
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.
Let's go!
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). |
Description
for-teachers/class/{{class_info.id}}
page to open the live statistics dashboard./live_stats/class/{{class_info.id}}
.