Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Restore media search behaviour #506

Merged
merged 4 commits into from
May 17, 2023

Conversation

fosterfarrell9
Copy link
Collaborator

As described in #496, PR #420 has introduced some unwanted behaviour (that also leads to exceptions) when the media search was made accesible to generic users via the start page. In this PR the following things have been changed

  • In the 'Import Content' tab in the 'Create vertex' dialogue for quizzes, there is no more radio button that allows you to select all types of media. You can only choose between Questions and Remarks. (This restores previous behaviour)
  • In the 'Media Search' Tab that is available to editors in the admin area, it is now also possible to select media of type Questions/Remark/Erdbeere. (This restores previous behaviour)
  • In the media search form on the start page, checking the 'all types' radio button now means checking all types of media actually listed in this generic search form, which excludes e.g. Questions. For generic users these types have been filtered out anyway if you selected 'all', but for admins they were not, creating an inconsistency. I think that the exclusion of certain types makes sense in that form, because the results are rendered in a way that is not suitable for huge amounts of hits. If you are an editor/admin and want to search Questions, you can use the search form in the admin area. Maybe it would make sense to add a helpdesk in this accordion fold for editors that explains that this media search is kind of restricted and that it is recommended to use the media search in the admin area. (This removes an inconsistency)

@codecov
Copy link

codecov bot commented May 15, 2023

Codecov Report

Merging #506 (cb40501) into mampf-next (6ecf8a4) will increase coverage by 0.01%.
The diff coverage is 72.72%.

@@              Coverage Diff               @@
##           mampf-next     #506      +/-   ##
==============================================
+ Coverage       66.48%   66.50%   +0.01%     
==============================================
  Files             311      311              
  Lines            9406     9412       +6     
==============================================
+ Hits             6254     6259       +5     
- Misses           3152     3153       +1     
Impacted Files Coverage Δ
app/controllers/media_controller.rb 25.87% <ø> (ø)
app/helpers/media_helper.rb 32.46% <0.00%> (-0.43%) ⬇️
app/models/medium.rb 54.85% <88.88%> (+0.19%) ⬆️

... and 1 file with indirect coverage changes

@fosterfarrell9 fosterfarrell9 requested a review from Splines May 15, 2023 16:08
@fosterfarrell9 fosterfarrell9 self-assigned this May 15, 2023
app/models/medium.rb Outdated Show resolved Hide resolved
app/models/medium.rb Show resolved Hide resolved
app/models/medium.rb Show resolved Hide resolved
app/helpers/media_helper.rb Outdated Show resolved Hide resolved
app/models/medium.rb Show resolved Hide resolved
app/models/medium.rb Show resolved Hide resolved
app/models/medium.rb Show resolved Hide resolved
app/models/medium.rb Show resolved Hide resolved
@fosterfarrell9 fosterfarrell9 merged commit 3774442 into mampf-next May 17, 2023
@fosterfarrell9 fosterfarrell9 deleted the fix/restore-media-search-behaviour branch May 17, 2023 14:32
@Splines Splines mentioned this pull request May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants