hedy icon indicating copy to clipboard operation
hedy copied to clipboard

[FEATURE] Adds tags to public profiles of users

Open TiBiBa opened this issue 2 years ago • 3 comments

Description In this PR we add a new and exiting feature: profile tags! From now on users will be able to receive tags that will be shown on their public profile page. The "teacher" and "admin" tag are automatically added on updating the public profile, other tags can be added by the admin. At this moment we have the following tags:

  • Admin
  • Teacher
  • Certified teacher
  • Distinguished user
  • Contributor

Fixes This PR fixes #3149.

How to test Make sure you are an admin and navigate the the /admin/users page. Notice the new tags column on the table. Verify that clicking the icon displays a modal with all the possible tags enabling the admin to remove / add tags. Also verify that adding and removing tags is correctly stored on the public profile of the user. When no profile exists an error is returned.

TiBiBa avatar Aug 16 '22 08:08 TiBiBa

All tests seem to fail on a specific adventure, which doesn't make any sense as we haven't changed anything there. The following program returns false on ru:

печатать 'Drawing Figures'
figure is запросить 'Do you want a square or a triangle?'
if figure is triangle angle is 120 иначе angle is 90
поворот angle
вперёд 25

@Felienne do you have any clue what can cause this issue?

TiBiBa avatar Aug 16 '22 11:08 TiBiBa

All tests seem to fail on a specific adventure, which doesn't make any sense as we haven't changed anything there. The following program returns false on ru:

печатать 'Drawing Figures'
figure is запросить 'Do you want a square or a triangle?'
if figure is triangle angle is 120 иначе angle is 90
поворот angle
вперёд 25

@Felienne do you have any clue what can cause this issue?

Aw we have to add else in Russian to the grammar in level 5. No clue why this again fails now! Should have failed earlier, but we have seen something similar so I will dive into this later this week.

Felienne avatar Aug 16 '22 13:08 Felienne

All tests seem to fail on a specific adventure, which doesn't make any sense as we haven't changed anything there. The following program returns false on ru:

печатать 'Drawing Figures'
figure is запросить 'Do you want a square or a triangle?'
if figure is triangle angle is 120 иначе angle is 90
поворот angle
вперёд 25

@Felienne do you have any clue what can cause this issue?

Aw we have to add else in Russian to the grammar in level 5. No clue why this again fails now! Should have failed earlier, but we have seen something similar so I will dive into this later this week.

All right! Other than the failing e2e tests this pr is ready for review: Schermafbeelding 2022-08-16 om 15 49 57 Schermafbeelding 2022-08-16 om 15 50 15

TiBiBa avatar Aug 16 '22 13:08 TiBiBa

Hi @TiBiBa! I fixed my issue but now it reveals 3 failing e2e tests so I guess this one is yours again :)

Felienne avatar Aug 17 '22 17:08 Felienne

The tests where failing because we always expected there to already be a public profile. In the case that one didn't exist it crashed because the line current_profile.get('tags') didn't make any sense as current_profile was not a dictionary, it was a None object. Should be fixed now!

TiBiBa avatar Aug 17 '22 20:08 TiBiBa

Conflicts conflicts 😭 @TiBiBa

Felienne avatar Aug 18 '22 17:08 Felienne

Ok, I think I got them all back to proper!

Felienne avatar Aug 19 '22 12:08 Felienne

Sorry, I think I made it worse! There are some issues still in the po's and also I removed the tag adder:

image

Over to you again @TiBiBa 🤣

Felienne avatar Aug 19 '22 12:08 Felienne

Sorry, I think I made it worse! There are some issues still in the po's and also I removed the tag adder:

image

Over to you again @TiBiBa 🤣

Whoops! Will look into this!

TiBiBa avatar Aug 19 '22 12:08 TiBiBa

We should close this in favor of #3185 which fixes the merge conflicts

TiBiBa avatar Aug 19 '22 13:08 TiBiBa