Resolve "Add support for assinging group roles" #521

Merged
hansegucker merged 20 commits from 69-add-support-for-assinging-class-roles into master 2021-02-08 13:18:08 +01:00
Owner

Closes #69

Button in "My groups"

image

Group roles page for groups

Tab 1:
image
Tab 2:
image
Dropdown:
image

Assign form for a single group

image

View in week view

image

Personal notes tab

image

Lesson view

image

Personal notes tab

image

Menu item for global form

image

Global form

image

Closes #69 ## Button in "My groups" ![image](/uploads/37f86e35f50c46f56e549a37f64aed1e/image.png) ## Group roles page for groups Tab 1: ![image](/uploads/fb969688fabcdd9549729c3e4cb227f4/image.png) Tab 2: ![image](/uploads/999af538cb3abcbfe865f614adb5155b/image.png) Dropdown: ![image](/uploads/ffa27cecb67e5d28b35ece9614a83762/image.png) ## Assign form for a single group ![image](/uploads/1aac58a819b568f21cbe860b2c528123/image.png) ## View in week view ![image](/uploads/0aba99141c2da7bb2883cb82cb64fdbc/image.png) ### Personal notes tab ![image](/uploads/27460f1e647e6a5d7be40e9ab709dc52/image.png) ## Lesson view ![image](/uploads/aee351c303466d8962de2298e152420b/image.png) ### Personal notes tab ![image](/uploads/39d220defaef563a2523cce2ada7c04a/image.png) ## Menu item for global form ![image](/uploads/c9729456c57396bcf1da1b89adb5686f/image.png) ## Global form ![image](/uploads/031f3d63bd30d31a3dea83ceec59b085/image.png)
Author
Owner

added 2 commits

  • 93ef18e3 - Add models for class roles
  • 6450ff00 - Add views for managing class roles

Compare with previous version

added 2 commits <ul><li>93ef18e3 - Add models for class roles</li><li>6450ff00 - Add views for managing class roles</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS-App-Alsijil/-/merge_requests/131/diffs?diff_id=4429&start_sha=ff640d71abccf46f95e0391c9774a17541fa4b4d)
Owner

assigned to @nik

assigned to @nik
Owner

Please mind that we call this "group", not "class".

Please mind that we call this "group", not "class".
Author
Owner

added 3 commits

  • 48df9a98 - Replace class role icons by a better fitting one
  • 13d91129 - Rename class role to group role
  • b06a6501 - Add group role assignments overview and managing views

Compare with previous version

added 3 commits <ul><li>48df9a98 - Replace class role icons by a better fitting one</li><li>13d91129 - Rename class role to group role</li><li>b06a6501 - Add group role assignments overview and managing views</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS-App-Alsijil/-/merge_requests/131/diffs?diff_id=4580&start_sha=6450ff00b3fd6736ab04ed0a7c81dafab121eb55)
Author
Owner

added 17 commits

  • b06a6501...616d414e - 16 commits from branch master
  • 3a87c2f8 - Merge branch 'master' into 69-add-support-for-assinging-class-roles

Compare with previous version

added 17 commits <ul><li>b06a6501...616d414e - 16 commits from branch <code>master</code></li><li>3a87c2f8 - Merge branch &#39;master&#39; into 69-add-support-for-assinging-class-roles</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS-App-Alsijil/-/merge_requests/131/diffs?diff_id=4581&start_sha=b06a65017a12f1b8b4cf79d8fd35cd6885c39db2)
Author
Owner

added 5 commits

  • 3a87c2f8...c4e64c53 - 4 commits from branch master
  • 4ccf137e - Merge branch 'master' into 69-add-support-for-assinging-class-roles

Compare with previous version

added 5 commits <ul><li>3a87c2f8...c4e64c53 - 4 commits from branch <code>master</code></li><li>4ccf137e - Merge branch &#39;master&#39; into 69-add-support-for-assinging-class-roles</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS-App-Alsijil/-/merge_requests/131/diffs?diff_id=4622&start_sha=3a87c2f8122e0685fca3d3221ddf45a01f2703b3)
Owner

changed title from Draft: Resolve "Add support for assinging {-class-} roles" to Draft: Resolve "Add support for assinging {+group+} roles"

changed title from **Draft: Resolve "Add support for assinging {-class-} roles"** to **Draft: Resolve "Add support for assinging {+group+} roles"**
Author
Owner

added 3 commits

  • 1fa84476 - Add managers and querysets for group role models to simplify queries
  • 3a337afd - [Group roles] Restructure templates by adding a partials folder
  • e67cff0a - Show group roles in week view of groups

Compare with previous version

added 3 commits <ul><li>1fa84476 - Add managers and querysets for group role models to simplify queries</li><li>3a337afd - [Group roles] Restructure templates by adding a partials folder</li><li>e67cff0a - Show group roles in week view of groups</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS-App-Alsijil/-/merge_requests/131/diffs?diff_id=4623&start_sha=4ccf137eef65e0daf31b1b944c2259fe649f3631)
Author
Owner

added 3 commits

  • 0b147eea - Fix assigned_roles.html and AssignGroupRoleView for independent usage
  • 6b054c9c - [Group roles] Check permissions in week view
  • ccd49962 - Show group roles in lesson view

Compare with previous version

added 3 commits <ul><li>0b147eea - Fix assigned_roles.html and AssignGroupRoleView for independent usage</li><li>6b054c9c - [Group roles] Check permissions in week view</li><li>ccd49962 - Show group roles in lesson view</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS-App-Alsijil/-/merge_requests/131/diffs?diff_id=4624&start_sha=e67cff0a5d4dafe257bd44ebc9561ea0c56ff46d)
Author
Owner

added 1 commit

  • 1b2a4793 - Add global form to assign group roles

Compare with previous version

added 1 commit <ul><li>1b2a4793 - Add global form to assign group roles</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS-App-Alsijil/-/merge_requests/131/diffs?diff_id=4639&start_sha=ccd49962f63d9ccff1f53b05e5c8489510969359)
Author
Owner

added 1 commit

  • fd73737a - Remove legacy field dependency in AssignGroupRoleForm

Compare with previous version

added 1 commit <ul><li>fd73737a - Remove legacy field dependency in AssignGroupRoleForm</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS-App-Alsijil/-/merge_requests/131/diffs?diff_id=4640&start_sha=1b2a479363453ad31a069442f7f75bbb8c41f8e0)
Author
Owner

marked this merge request as ready

marked this merge request as **ready**
Author
Owner

changed the description

changed the description
Author
Owner

requested review from @ZugBahnHof

requested review from @ZugBahnHof
Author
Owner

Ready to review, @nik

Ready to review, @nik
Owner

What is an "Innenliste"?

What is an "Innenliste"?
Author
Owner

Where did you find this?

Where did you find this?
Author
Owner

Oh, I see, do you mean "Schüler*innenliste"? Anyway, this wasn't added or changed in this MR.

Oh, I see, do you mean "Schüler*innenliste"? Anyway, this wasn't added or changed in this MR.
Author
Owner

resolved all threads

resolved all threads
Owner

Have we previously been shipping such broken translations?

Have we previously been shipping such broken translations?
Owner

Oh wow.

Please use a callable to generate these choices, so migrations do not take over the constant.

(This probably requires changes elsewhere.)

Oh wow. Please use a callable to generate these choices, so migrations do not take over the constant. (This probably requires changes elsewhere.)
Owner

Wh ydo we limit colours to materia lcolours, instead of using a regular ColourField?

Wh ydo we limit colours to materia lcolours, instead of using a regular `ColourField`?
Owner

Do we really need such a preference? We never did that AFAIR, allowing an entire feature to be disabled.

Do we really need such a preference? We never did that AFAIR, allowing an entire feature to be disabled.
Owner

Apart from the minor discussion items, it looks really awesome and far more thought through than I would have drafted it!

@ZugBahnHof Please review asap.

Apart from the minor discussion items, it looks really awesome and far more thought through than I would have drafted it! @ZugBahnHof Please review asap.
Owner

approved this merge request

approved this merge request
Owner

unapproved this merge request

unapproved this merge request
Author
Owner

I am unsure how to do this because the choices attribute doesn't accept any callables.

I am unsure how to do this because the `choices` attribute doesn't accept any callables.
Author
Owner

I don't need this preference. Maybe we should ask the rest. @ZugBahnHof @debdolph @fph @yuha: What are your opinions?

I don't need this preference. Maybe we should ask the rest. @ZugBahnHof @debdolph @fph @yuha: What are your opinions?
Author
Owner

changed this line in version 9 of the diff

changed this line in [version 9 of the diff](/AlekSIS/official/AlekSIS-App-Alsijil/-/merge_requests/131/diffs?diff_id=4649&start_sha=fd73737af1a199057bf6546ca209aaed96c63d16#780f294f550e4cd96aa99e7069b309c8b842f1d2_253_254)
Author
Owner

added 6 commits

  • fd73737a...8bfc0ca7 - 4 commits from branch master
  • 8ce1b930 - Merge branch 'master' into 69-add-support-for-assinging-class-roles
  • d3143a65 - [Group roles] Use ColorField instead of fixed Materialize colors

Compare with previous version

added 6 commits <ul><li>fd73737a...8bfc0ca7 - 4 commits from branch <code>master</code></li><li>8ce1b930 - Merge branch &#39;master&#39; into 69-add-support-for-assinging-class-roles</li><li>d3143a65 - [Group roles] Use ColorField instead of fixed Materialize colors</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS-App-Alsijil/-/merge_requests/131/diffs?diff_id=4649&start_sha=fd73737af1a199057bf6546ca209aaed96c63d16)
Owner

Well, we should either have feature flags for all features, or for none. Discussing that is not part of this merge request.

Well, we should either have feature flags for all features, or for none. Discussing that is not part of this merge request.
Owner

What do you mean by "the choices argument doesn't accept any callables"?

image

What do you mean by "the choices argument doesn't accept any callables"? ![image](/uploads/8b2de2745ce71cc65f04abe5a1369470/image.png)
Owner

But, now I looked at the docs again, enumeration choices seem a better fit: https://docs.djangoproject.com/en/3.1/ref/models/fields/#field-choices-enum-types

But, now I looked at the docs again, enumeration choices seem a better fit: https://docs.djangoproject.com/en/3.1/ref/models/fields/#field-choices-enum-types
Author
Owner

Then I will remove this for the time being.

Then I will remove this for the time being.
Author
Owner

added 1 commit

  • 6f37e7ef - Use improved SuccessNextMixin everywhere

Compare with previous version

added 1 commit <ul><li>6f37e7ef - Use improved SuccessNextMixin everywhere</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS-App-Alsijil/-/merge_requests/131/diffs?diff_id=4662&start_sha=d3143a65d109eaa1d44242675c7bba5353f11f11)
Owner

Sad story: Enumeration choices are only syntactic sugar. They also result in a list of tuples being generated and pulled into the migration.

Sad story: Enumeration choices are only syntactic sugar. They also result in a list of tuples being generated and pulled into the migration.
Owner

changed this line in version 11 of the diff

changed this line in [version 11 of the diff](/AlekSIS/official/AlekSIS-App-Alsijil/-/merge_requests/131/diffs?diff_id=4687&start_sha=6f37e7efe6f052bcf988c0a0a7035736215b48c3#64675f1551e2442922ebc0d8e9fbcb781b2a51fa_24_25)
Owner

added 1 commit

  • d69b2fdb - Replace choices list with callable

Compare with previous version

added 1 commit <ul><li>d69b2fdb - Replace choices list with callable</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS-App-Alsijil/-/merge_requests/131/diffs?diff_id=4687&start_sha=6f37e7efe6f052bcf988c0a0a7035736215b48c3)
Owner

Resolved this with a lambda function for now. Let's focus on the real stuff and maybe migrate to a real icon field later as a globa ltopic.

Resolved this with a lambda function for now. Let's focus on the real stuff and maybe migrate to a real icon field later as a globa ltopic.
Owner

changed this line in version 12 of the diff

changed this line in [version 12 of the diff](/AlekSIS/official/AlekSIS-App-Alsijil/-/merge_requests/131/diffs?diff_id=4688&start_sha=d69b2fdb5ef2953982d2479f50d85ed550ed7290#c19fc45940c6132e392af4eafd600d5420ff6693_84_79)
Owner

added 1 commit

  • 22fcc87c - Remove feature flag for group roles

Compare with previous version

added 1 commit <ul><li>22fcc87c - Remove feature flag for group roles</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS-App-Alsijil/-/merge_requests/131/diffs?diff_id=4688&start_sha=d69b2fdb5ef2953982d2479f50d85ed550ed7290)
Owner

Done.

Done.
Owner

resolved all threads

resolved all threads
Owner

added 1 commit

  • 51bbefe6 - Remove feature flag for group roles

Compare with previous version

added 1 commit <ul><li>51bbefe6 - Remove feature flag for group roles</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS-App-Alsijil/-/merge_requests/131/diffs?diff_id=4689&start_sha=22fcc87c1fbaf0bf7b33f26457e1f3c36d9c1924)
nik scheduled this pull request to auto merge when all checks succeed 2021-02-08 13:16:16 +01:00
Owner

mentioned in commit b438cbca3d

mentioned in commit b438cbca3d4355f42407a7a6bdead63fd783b66c
nik merged commit b438cbca3d into master 2021-02-08 13:18:08 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
aleksis/AlekSIS-App-Alsijil!521
No description provided.