Umuzi-org / Tilde

Open source agile, collaborative learning platform.
52 stars 34 forks source link

Add request review functionality to card #690

Closed kingraphaii closed 6 months ago

kingraphaii commented 7 months ago

Related issues: [please specify]

Description:

This PR adds the "request review" button along with a minimal "alert" api for cards.

Screenshots/videos

image

I solemnly swear that:

kingraphaii commented 7 months ago

@Ngoakor12

As suggested in previous reviews, I'm proposing we use the check[verb][optional_qualifier] for naming our permission checking functions.

Example:

def check_user_can_request_review_on_card(logged_in_user):
    return [bool]

@user_passes_test_or_forbidden(check_user_can_request_review_on_card)
def decorated_view():
    ...

I've used it on the "request_review" action only until we all agree on a naming style for them.

Sheena also mentioned how we do not make it known that some of these expect a "card_id" to be present in the kwargs, but I haven't been able to come up with a clean solution so far; feel free to suggest a better way to handle this.