Skip to content

Do not hide all the elements of the units with problems to anonymous … - #354

Merged
morenol merged 1 commit into
masterfrom
ir/ednx/IR-19
Feb 24, 2020
Merged

Do not hide all the elements of the units with problems to anonymous …#354
morenol merged 1 commit into
masterfrom
ir/ednx/IR-19

Conversation

@morenol

@morenol morenol commented Nov 21, 2019

Copy link
Copy Markdown
Contributor

With this change, the units with problem components are not hidden

image

item_type = item.get_icon_class()
usage_id = item.scope_ids.usage_id

if item_type == 'problem' and not is_user_authenticated:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just a question: the whole block is classified as "problem" if there is a graded element in it?

@morenol morenol Nov 21, 2019

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It is being used the icon class to define the type of an unit. If there is a component(child) in the unit with 'problem' as icon class then the icon class of the unit is "problem". Those cases are the ones that are failing.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ah yes, they said it in the comments, getting the type from the icon class is kinda weird

@felipemontoya

Copy link
Copy Markdown
Member

I suggest that we wait for the upstream PR to be merged and then do a backport before we continue with this. The idea is that we don't deviate too much from upstream here so that we can support this better in the future.

@morenol
morenol force-pushed the ir/ednx/IR-19 branch 2 times, most recently from cfd4917 to 5cdf293 Compare November 28, 2019 17:05
@morenol

morenol commented Feb 21, 2020

Copy link
Copy Markdown
Contributor Author

Update: this is the PR against upstream: https://github.com/edx/edx-platform/pull/22385

@morenol
morenol requested a review from Alec4r February 24, 2020 15:21

@felipemontoya felipemontoya left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since this was merged upstream, I no longer have any concerns about maintainability. +1

@morenol
morenol merged commit 58b6ff9 into master Feb 24, 2020
@felipemontoya
felipemontoya deleted the ir/ednx/IR-19 branch September 27, 2021 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants