djplaner / Content-Interface-Tweak

Improves both the task of creating content for Blackboard Learn, and reading that content.
https://djplaner.github.io/Content-Interface-Tweak/
GNU General Public License v3.0
0 stars 0 forks source link

add filmWatchingOptions style #16

Open djplaner opened 4 years ago

djplaner commented 4 years ago

Course in film analysis requires students to watch at least one film each week. Some films are provided via the University. Other films the students need to source themselves. Has been an issue in the past with them asking/finding those films.

Justwatch.com offers a search facility for online stream/rentals.

Modify the content Interface to allow the Word doc to include a film name and style it filmWatchingOptions and have the HTML get translated into directions to search justwatch.

djplaner commented 3 years ago

data availability

Problem: O365 tenancy choices mean PowerAutomate no longer an option. Time to consider Google Sheets

Try this approach

Original spreadsheet - public access

ID for initial shared spreadsheet 1xJvMG27jFzemmiJlzPGvLjOR0k_2soOadUDGMTCv0II

JSON view

djplaner commented 3 years ago

Early testing

dist/filmWatchOptions.html doing a simple read of the JSON feed and convert to dictionary on film title

Design

  1. Implement a filmWatchOptions web component
    1. Takes a Google spreadsheet id as parameter
    2. Perhaps allow multiple columns to be search - precursor to more generic resources component
    3. Does various checks on it e.g. c
    4. But creates the dictionary
    5. Then updates the internal display
  2. Integrate web component into Content Interface
    1. page update process inserts the component with empty json
    2. Content Interface javascript gets parameter from Blackboard and populates json - will that actually work - would component need to check change in parameter?
    3. Would it be better to include Google spreadsheet URL in the Word doc and have Content Interface do this conversion at the last moment?
djplaner commented 3 years ago

Integration with Content Interface

Can we update web components with new attributes - jsonurl - based on the Blackboard web link item film watch options data

  1. Get the data file link

ul#content_listContainer>li.liItem>div.item>h3>a

  1. Find all the components
  2. Add jsonurl attribute

document.querySelector('film-watch-options').setAttribute('jsonurl','https://bblearn-blaed.griffith.edu.au/bbcswebdav/xid-119774296_1')