Closed johannes-titz closed 1 year ago
lets specify this scenario with overwrite values:
@johannes-titz what is your vision?
Sorry, the semantic of overwrite is more complicated than I thought. Actually the problem is located elsewhere. For the vignettes I uploaded all exercises and templates to opal, then made the screenshots. Now, it would be nice to have some way of getting the urls of the files without uploading them again (this takes time). Basically the functionality is to just to check if a file exists on OPAL and return the url. I think we tried that with the api and it did not work, right?
Which attribute of resource on Opal should we use to check its existence and building an url? There are two possible:
probably we can make for both cases, but how multiple records in first case should be processed? build url for all records associated with given display_name?
For the vignettes version 1 is better. My idea is to add opal links to the examples so the user can see and test it. In this case I only have the display_name. Duplicates can be listed; I try to avoid them anyway.
But could we also have a function that returns all resources without providing a name/key? I think we tried this and it did not work, right?
we tried, but failed. I am going to try again
I think the problem is on OPAL's side, so we should report it to them.
try fetch_resource_url(display_name)
to build urls
But could we also have a function that returns all resources without providing a name/key?
it is possible. Not possible to get data about a resource by its name/key. I will export this function.
try get_resources()
to get list of all your resources from Opal
Very nice work. Both functions produce expected results so far. I will give it some more testing. Maybe get_resource_url instead of fetch? Or is there a specific difference between get and fetch? We probably need to discuss the function names in general and how this can be extended, if other LMS are included. Maybe OOP again?
"Not possible to get data about a resource by its name/key". Does this mean we can only get the URL by display_name?
Trying to upload several exercises again to get the URL, setting overwrite = F still asks me for each file what I want to do.