I have to create about 2000 course with 5000 documents in Moodle 2.4. I have used Bulk category upload and bulk course upload to create the courses.
As file management in Moodle 2.0 has changed and files cannot be placed directly to moodle appdata folder. I created file system repository in Moodle Appdata and uploaded all files with their course id (id from DB table after creating courses) as directory name.
After enabling file system repository i can now see files in file picker. Now i use file picker to link those files to their courses manually. Another option is drag and drop files to their courses. But it is time consuming and it may lead to human error as every course has to be opened and above options has to be done.
I gone through mdl_files table to link files to their courses but the contents are encrypted and i cannot directly link files to their courses using DB as of in course file area in Moodle 1.9. I wrote script using Moodle File API but that could also be done in course only.
Is there any way that linking of those files can be done through script or database to their corresponding courses in bulk.
Thanks in advance
I'm not aware of a solution that doesn't involve writing some code.
However, you could take a look at the code in course/dnduploadlib.php, as that should be possible to adapt this to loop through all the files in a given directory on the server and convert them into resources.
If you created a draft file area (using the files API), you could then use an adjusted version of the 'handle_file_upload' function (and the functions it calls) to do this.
Related
So basically there's a dropbox folder shared with my team members. I want to automatically upload the file which is added or upload the file which is modified. How can I do that?
Basically it'll trigger a PHP/Node file which will upload all the content of CSV file to the database.
Right now I have to manually run node command which selects the latest file from the folder and uploads it. But I want to automate this as well.
Do you think it would need a web socket?
not sure I got you right but you might consider installing dropbox app with auto-sync or consult this link
https://help.dropbox.com/installs-integrations/sync-uploads/smart-sync
for more data.
Basically DropBox used to have their own API for that and they decided to remove it so I would try with app
https://blogs.dropbox.com/developers/2015/04/deprecating-the-sync-and-datastore-apis/
Hope that helps ...would write it in a comment but I just made an account
Best!
I have completed my wordpress site in localhost,And i have wordpress domain in azure(defualt wordpress theme).Now i want to transfer complete all files to azure from localhost.Is it possible?Please help me
Migration plugin (https://wordpress.org/plugins/all-in-one-wp-migration/) is useful for you. you are able to take migration file from your local setup and upload that migration file in your azure setup.
It's a bit straight forward.
Go to Tools → Export:
Clicking the Export All button (if you have a site without plugins installed.)
Selecting all content and clicking the Download Export File button (if you have a site with plugins installed.)
Download specific content only, like posts, pages, or feedback.
Wait for the export to process. Once it’s ready, click the Download button that appears, or check your email for the download link.
You will receive a .zip file to save to your computer with the .xml file inside of it. This file contains your posts, pages, comments, categories, tags, and references to your site’s images.
Larger sites will include more than one XML file to ensure that your export process will be fast and complete successfully. When importing into another site, you’ll need to unzip the file and import each of the .xml files individually.
Host/create your wordpress on azure and reverse the process above by using import in place of export.
Import your file to the new site. If you’re importing to another WordPress.com site, you can follow the same steps in this guide.
Create a backup of your WordPress files and database
Install wordpress on azure, you can follow this guide (https://wplift.com/wordpress-microsoft-azure)
You need the /wp-content folder and the export file from WordPress on your localhost, you will need a copy of your site content, WordPress has a built-in exporter for this – simply visit “Tools” > “Export” and choose “All Content” and download the Export file.
Then upload your wp-content folder on Azure and import your content by visiting “Tools” > “Import" and upload your export file.
We have a system where, a large part of it is the ability to upload and download files if you are logged in and have the correct permissions.
What we are looking at doing to help with the organization from the users point of view is having a virtual file system type layout.
Even if (or even preferably) all the users files are actually just stored in one directory, and the virtual file system is just a screen put up from the database.
What we are wondering before we invest in creating this is if this already exists somewhere, open source (but able to be used in commercial software), free, or paid (first two preferably!).
A simple file system on top of PHP can be done by WebDAV that is built on top of PHP:
http://sabre.io/
This would be a good example, but there are others as well. WebDAV is essentially a web based file system (http://en.wikipedia.org/wiki/WebDAV).
This could not only provide a file system, but also would let you edit files directly with Word/Excel (2007+) in it. Showing then a treeview of folders and files would be quite trivial, using few database tables and some jquery components, such as jsTree and jqGrid.
Although if you are searching for a full document management system: http://www.opendocman.com/ or http://code.google.com/p/simpledoc/ this would be more then enough.
It really depends on how many features you are going to incorporate into this system. Will there be an OCR, would you like to store the files in the cloud service, how many user input there will be (is simple upload enough, or camera, scanners and other devices are needed to be used as well)?
As for the commercial products, you could check out Microsoft SharePoint (http://en.wikipedia.org/wiki/Microsoft_SharePoint) or IBM Lotus Notes (http://en.wikipedia.org/wiki/IBM_Lotus_Notes)
I'm building an app based on CakePHP framework and Croogo CMS. Basically there will be a simple intranet section where after logging in the users will be able to view and download some files.
Within administration I'm planning a simple section where the administrator will select files from ones previously uploaded into CMS and laying in /app/webroot/files folder. Here I would like to implement a simple file picker to let administrator easily select files that will be added to that intranet.
I was googling for a while but found nothing useful - merely pages about file upload.
My question: is there any plugin or something similar to my needs that I could use or do I have to write it down myself?
If there is nothing useable I was planning to do it this way:
administrator will have to upload intranet dedicated files directly to a folder /app/webroot/files/intranet/
within intranet documents administration section I will then list all present files, fill them into <ul> list as links and using jQuery fill some hidden form fields in background from which I would then gather information about files that are being added into the intranet
Is this a good approach or do You have better and simpler solution?
Many thanks for Your responses in advance!
As Lector said, webroot files are public, so you will need to save them to somewhere outside webroot, perhaps in another folder inside app. You can use the Media view to allow download of those restricted files. You could display all the files in a certain folder using PHP similar to how it is done here.
Im currently working on developing a PHP/MYSQL property classifieds website where people can register and manually add property classified adverts. This is all working fine, but I now need to add the functionality to bulk upload property adverts.
There are 2 ways I need to do this, the first is via XML, where a member who is registered on our site can add the url of an XML file on their server, on their account page on our website. Our automatic script will read through the XML file each evening and populate our MYSQL database using the details and images from their XML feed.
The second part is where I am struggling. Some Estate Agents want to be able to upload their properties to our website by FTP'ing a ZIP file, with CSV file and images to our server each evening, so we can then read through the CSV file and populare the MYSQL database from this.
How would we go about giving each Estate agent a place on our server to ftp their files too? Could I automatically create a directory on our server with the name of their username where only they had access to FTP too? Would I be able to automatically create FTP accounts on my server?
Please note I am running a linux server with CPANEL installed. My website is developing in PHP with a MYSQL database.
Any advice on the best methods to implement this functionality would be appreciated.
You'll be better off offering a HTTPS file upload, rather than FTP, because you can secure that with your existing PHP/MySQL authentication system and it doesn't require any technical knowledge from your clients. Then you can use use PHP to parse the ZIP file and check it contains what you need in real time, and provide instant feedback if images are missing or the CSV is corrupt, saving you some customer support effort.
See http://www.php.net/manual/en/class.ziparchive.php
Automating the creation of FTP accounts would require pam_mysql, and may cause a conflict with cPanel. If you really want to do that, ask over on serverfault.com