Skip to content
This repository was archived by the owner on Apr 16, 2024. It is now read-only.

Conversation

@dboschm
Copy link
Collaborator

@dboschm dboschm commented Apr 21, 2018

Description:

Simple Visiblility Toggle for Units (without Datepicker/visibleFromDate)

Closes #582

Improvements

  • Added visibility flag to IUnit
  • Added toggle to general info form
  • Added match filter to courseController, to only populate visible units and skip invisible if currentUser is not teacher or admin

Known Issues:

  • visibleFromDate has not been implemented after consultation to @danielkesselberg. This raises some strage questions like: which date should be taken if teacher does not want to publish the unit and does not know when.
  • Unit forms dataflow has to be refactored/unified so that sub components does not know anything about supercomponents.

Remember to prefix your PR-Title with ⚠ WIP: if you still work on it.
If you have reached a final state, remove the prefix.

dboschm added 4 commits April 20, 2018 17:03
Introduced new Unit Property visible
Added visible to all unit form components and unit model classes
next step: make units invisible for students
populate: {
path: 'units',
virtuals: true,
match: {$or: [{visible: undefined},{visible: true},{visible: !isTeacherOrAdmin}]},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one!

@coveralls
Copy link

coveralls commented Apr 21, 2018

Coverage Status

Coverage increased (+0.05%) to 65.724% when pulling 91c9a1b on feature/#582-unit-visibility-toggle-2 into d37136c on develop.

@dboschm
Copy link
Collaborator Author

dboschm commented Apr 21, 2018

Sorry, package.json and package-lock.json have been commited and pushed accidentally. Please do not merge.

@dboschm dboschm changed the title ⚠ WIP: Feature/#582 unit visibility toggle 2 Feature/#582 unit visibility toggle 2 Apr 21, 2018
@PatrickSkowronek PatrickSkowronek changed the title Feature/#582 unit visibility toggle 2 ⚠ WIP: Feature/#582 unit visibility toggle 2 Apr 24, 2018
@dboschm dboschm changed the title ⚠ WIP: Feature/#582 unit visibility toggle 2 Feature/#582 unit visibility toggle 2 Apr 25, 2018
@PatrickSkowronek
Copy link
Collaborator

There are many Problems, we should discuss these Tomorrow.

Copy link
Collaborator

@PatrickSkowronek PatrickSkowronek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good sofar, but units are still visible after setting it invisible!
screenshot from 2018-04-27 18-02-56

dboschm added 2 commits April 27, 2018 22:47
…e to undefined

sometimes local user was undefined in readUser() function, one more check added
@PatrickSkowronek
Copy link
Collaborator

I still get this Error TypeError: unit is undefined while saving a unit. We think I should help you with that.

@dboschm
Copy link
Collaborator Author

dboschm commented Apr 28, 2018

Ok. I am not able to reproduce this error. Could you show me the error in a personal session.

@PatrickSkowronek PatrickSkowronek merged commit 64e409e into develop May 4, 2018
@PatrickSkowronek PatrickSkowronek deleted the feature/#582-unit-visibility-toggle-2 branch May 4, 2018 16:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add visible flag to unit / Make available on

6 participants