djplaner / Card-Interface-Tweak

Javascript tweak to transform a collection of Blackboard Learn content items into a visual card interface.
https://djplaner.github.io/Card-Interface-Tweak/
1 stars 1 forks source link

Handle better the presences of more than one item with Card Interface in the title #36

Closed djplaner closed 3 years ago

djplaner commented 3 years ago

The problem is due to a limitation in the code and a couple of specific features of how you'd set up the Assessment section.

Problem detail

The limitation is that the code looks for the first item on the page with the phrase Card Interface in the title. It puts the cards into that item.

In the assessment section you had two items with Card Interface in the title. The item with the tweak code and an empty item you wanted the cards to appear in.

The empty item - where the cards should have gone - was second on the page. The card interface put the cards in the tweak code.

The tweak code also hides itself when edit mode is off. Hence hiding the cards.

Solution(s)

I moved the empty item first in the list.

Another solution would have been to remove Card Interface from the tweak code title.

A better solution would be for me to fix the code so it looks for an empty item with Card Interface in the title and/or alerts you that there is more than one.

djplaner commented 3 years ago

Solution?

Check to see if the chosen item contains the card interface tweak, if so, skip.