Personal Content Bank?

Personal Content Bank?

by François Moreau -
Number of replies: 4
Picture of Core developers

Hi,

I've been trying out the new Content Bank feature for managing H5P content. Awesome stuff! My understanding is that the bank stores content according to their context:

  • System Context
  • Course Category Context
  • Course Context
With sufficient access, all of these contexts are available through the Content Bank Repository.

I was curious if the bank could be used to store content at a personal level. So I tried to plug my user context ID into "/contentbank/index.php?contextid=" and it works! Unfortunately, the Content Bank Repository does not provide any UI to browse the content stored in my user context.

Is letting the user manage content at a personal level and use them across the Moodle instance a feature that is available or planned? Would there be interest in accepting such a feature? (I can help out.)

Thanks in advance!
Average of ratings: -
In reply to François Moreau

Re: Personal Content Bank?

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers
Hello Francois,

I think that you need to allow some of the the following capabilities in addition to contentbank access to access the H5P content type functions: contenttype/h5p:access, contenttype/h5p:upload, and contenttype/h5p:use. They can be assign to system role or a user level role can also be created and assign to users on their profiles.
In reply to Daniel Thies

Re: Personal Content Bank?

by François Moreau -
Picture of Core developers
Hi Daniel,

Thanks for answering! For now I'm testing directly with the administrator account, so it won't be a matter of capabilities yet. (Although you are completely right that at one point I'll have to adjust the roles accordingly.)

First off, I know I'm pushing the envelope. Thanks for bearing with me. I'll explain what I'm attempting in more technical details. The objective would be for certain users to have a content bank that is personal to them. That is to say, the content in such a bank would not be shared with other users across the site, a course category or a course.

There doesn't seem to be anything in that regard on the UI, so I dug a little. I went in the database, table context, to find my user context ID for my user (contextlevel=30, instanceid=my user ID). Then I plugged that context ID in the URL: /contentbank/index.php?contextid=

screenshot

Interestingly, that works! I can make and store H5P content that way in a personal (user context) space. Unfortunately, I fear this is an unintended feature and I'm worried to get the rug pulled from under me in the future.

The next challenge would be to find the files from my personal content bank in the file picker, across the site.

screenshot

Unfortunately, the Content bank menu only looks into the system, course category and course context, so the user context content is not found.

So that's where I'm at right now. I could develop a repository type plugin to make the personal Content Bank show up in the File picker I think.

So in conclusion, I'd really like to know if using the content bank on a CONTEXT_USER context is an unintended feature likely to be blocked in the future, or if I can bank on it (pun intended)?

In reply to François Moreau

Re: Personal Content Bank?

by Amaia Anabitarte -
Picture of Core developers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Thanks François for your feedback, and Daniel for your answer!

It's true that when we designed the content bank at a first stage we decided not to allow personal private content banks, because the main reason to create the content bank is to have a place to share and reuse the content. But the truth is that we evaluated also a feature to decide how and who to share the content. That is just a follow up feature that is not implemented yet and is not in our roadmap either.
I have taken the liberty of creating an issue (MDL-69673) to discuss what's the best approach for a new personal content bank and how to access the content created.
So please, I encourage you to vote, comment and/or come up with a patch. The more information, the better! smile

Apart from that, the workaround you are using to manage a user context content bank is strongly not recommended. Whenever a 'proper' personal content bank is implemented, your workaround could end causing problems and content lost on your site. Content bank checks some capabilities, so only admins or users with right capabilities can 'hack' it, but I've created MDL-69672 to fix this issue that could end in a bug. So sorry for pulling the rug out from under your workaround, but thanks a lot for the catch wink

Thanks for your help and contribution to the project.
Average of ratings: Useful (3)
In reply to Amaia Anabitarte

Re: Personal Content Bank?

by François Moreau -
Picture of Core developers
Thank you very much for your answer Amaia!

I somewhat expected that cooking the URL had brought me somewhere unintended. I do prefer to find out sooner rather than later though. smile

I've commented on MDL-69673 further about what we're trying to achieve. Sharing controls per content sounds very promising as well!