I'm trying to edit the page generated by moodle for the Resource type "Link to a file or web site"
I cannot find the code that it is using to generate the "Link to a file or web site" form. The one with the Location text box and the link to "Search for a web page".
What I'm trying to do is add a third button to that form called "Link to a file on Sharepoint" which is a php file I have written that pulls a list of files from a sharepoint document store folder with the moodle "Choose" function next to each file in the list.
If i click on the normal "Choose or upload a file..." a popup window appears with the local file resources for that course. I want the second button to open an identical popup window but with my own php file as the URL.
Could anyone give me any pointers on which files are involved in the generation of the "Link to a file or website" resource page. I know resource.php in the lang folder changes the txt on the button, but how do i change it's action or add my own button?
Nevermind! I finally found the code in /mod/resource/type/file/resource.class.php and have changed my "Search for a web page" button into a "Choose a file from Sharepoint" button.
If anyone is interested in what I'm doing, I currently pull a file and folder list for a particular folder in a sharepoint document store directly from the sharepoint MsSQL db, build a page with a list and a "choose" button next to each file which passes that document's full url back to the add a file resource page.
I wanted to keep Sharepoint as the main document store in the college, but to make it easy for teachers to display a link to those resources by being able to browse through Sharepoint directly from Moodle. I will post the code when it is finished if anyone is interested in it.
You are exactly doing what I was wondering about!
Our school has come from a Sharepoint background and we have lots of "static" courses. Staff have not taken to Moodle mainly because all their pupil documents are stored in Sharepoint. I am no coder but I am very interested in what you are doing. How do you manage permissions on docs stored in Sharepoint when accessing them from Moodle for instance?