General developer forum

Obtaining Private Files

 
Picture of Nikolay Nikolov
Obtaining Private Files
 

Hello!

I've just started working with a new company as a junior developer for Moodle, but I don't know anything about it. So far I find it very difficult to understand how everything works. 

My latest task is to grant access to user Private Files for specific members/other admins. We use Private Files block, in a way so that our employees can add their updated CV's as a Private File. 

Say, a HR team member or a Manager, needs to see these CV's, they need to log in as each user separately, until they find the one most qualified for specific task. It takes quite a while...

My Idea is simple - for example create a link inside the block itself, visible only to the users who has_capability() . This link will then lead this superuser to a new page/window/something , where ALL of the submitted Private CV's from ALL employees will be listed , so they can easily find whom they need.

I've read the File API, Repository docs, forum threads, looked at the database, and found the files I need. Problem is I can't patch it all together to make my idea work. 

Please give me an advice on what I may be missing, also if you can give me an example code it would be much appreciated. Thanks! 

 
Average of ratings: -
Mary Cooch
Re: Obtaining Private Files
Documentation writersMoodle Course Creator Certificate holdersMoodle HQParticularly helpful MoodlersTestersTranslators

I'm not a developer so I can't help you with code but while we are waiting for a developer, may I ask why you don't want to use standard Moodle tools to meet this need? For example you could add a Database activity in a course to which all employees and managers have access. Employees add their CVS to the database, with their name. If you set the database entries so they must be moderated before being shown to others -and then you never moderate them so they are never shown- only each individual employee and all the managers with editing access to the database will be able to see and access them. It would take a lot less time to set up than to learn Moodle code- but then, I guess you want to learn to code Moodle, so are looking for an opportunitywink

 
Average of ratings: -
Picture of Nikolay Nikolov
Re: Obtaining Private Files
 

Hello, thanks for the idea. I also had something similar in mind, but it is not so user-friendly IMO, then again would need some managing. Also it would not be so hard to write the code, if it was simple PHP, I would have done it already, but the Moodle framework is still a bit confusing to me. sad 

 
Average of ratings: -
Picture of Nikolay Nikolov
Re: Obtaining Private Files
 

Can someone please explain, if there is a possible way to do this? Thanks!

 
Average of ratings: -