-
Improvement
-
Resolution: Incomplete
-
Minor
-
None
-
1.9.5
-
None
-
Any
-
MOODLE_19_STABLE
This modification allows a teacher can create, in the Archives section of your course,
private directories, which will only be seen by him when they go to that section.
This does not preclude the teacher can create a linked resource files that are
within their private files.
Requirements:
- To work properly is necessary to create a table in the database, which is called "prefix_private_dirs" where will be stored:
-id: Id of the directory
-name: Name of directory
-course: Course in which it has been created
-userid: Owner (or creator are the same) of that directory.
There is 2 scripts in "db" directory (install.xml, install.sql) to create the table.
Operation:
1 .- The Teacher agrees to the file and select "Create Directory"
2 .- In the form of setting up directory will appear below the box where you should indicate the name,
a box called "Private". If the teacher marks this box, when button "Create" is pressed,
two actions are performed:
a. - It creates the physical directory (usual)
b. - It's inserted a record in the table prefix_private_dirs with the information of this directory
From that moment on, the directory (and files) is private to the teacher that created it.
3 .- If the directory is deleted, is also removed from the registration database for that directory.
The basic operation of the file system works exactly as it did initially.
NOTES v0.1:
- If you try to reference a URL for the private directory, the system will indicate that there is inexistent
and return the user's home page files.
- From time-to a directory that no longer private, it must be deleted and created with the option
"Private" unchecked.
- A "readme.txt" file is provided with this explanation.
Install:
1.- Backup of moodle/files/*
2.- Copy content stored in "files" directory provided in this hack into /moodle/files.
3.- Add to /lang/xx/moodle.php the following strings:
$string['privatedir'] = 'Private';
$string['privatedirs'] = 'Private Directories';
4.- Add to /lang/xx/error.php the following strings:
$string['directorynotexist'] = 'The requested directory \"$a\" does not exist';
Done.