This repository was archived by the owner on Jun 9, 2025. It is now read-only.
Course protected images feature#22
Open
arael wants to merge 16 commits into
Open
Conversation
The Course protected images allows the user to upload images that are visible only from Course specified during the upload. The global uploading form has been extended by adding two fields: - Limit to one course (Checkbox) Selecting this checkbox is going to place the upladed image inside the $CFG->data_root/mod/certificate/image_type/course/$COURSE->shortname folder. The images are then going to be visible only form the course with the same shortname. - Course Shortname This field specifies the Course shortname to use during the upload. Thus the file is going to be placed in the directory specified by the input of this field. Before proceeding with the update the module validates the input by checking the existence of the course. This is particularly useful for the Signature images because it avoids the signature to be visible in all other courses once they are uploaded. This commits also adds the Italian language support.
Owner
|
Hi Arael, I do like this idea. I closed the other request you made as this is a better approach. Regarding the language pack, please do not include this in the commit but rather submit it here http://lang.moodle.org. Once the language pack is removed from this commit and it is rebased on top of the most recent code I will review again. Thanks! |
added 2 commits
February 7, 2013 09:59
Removed the italian language translation. It is going to be uploaded on: http://lang.moodle.org/
Additional features: Course protected images.
The Course protected images feature allows to upload images
that are visible only from specific courses. The course is.
defined during the upload.
The global uploading form has been extended by adding two new fields:
- Limit to one course (Checkbox)
Selecting this checkbox is going to place the upladed image inside
the $CFG->data_root/mod/certificate/_image_type_/course/$COURSE->shortname
folder. The images are then going to be visible only form the course
with the same shortname.
- Course Shortname
This field specifies the Course shortname to use during the upload.
Thus the file is going to be placed in the directory specified by
the input of this field. Before proceeding with the update the module
validates the input by checking the existence of the course.
This is particularly useful for the Signature images because
it avoids the signature to be visible in all other courses once they
are uploaded.
Author
|
Ok. I have merged the last code from the upstream. Let me know if I need to fix something. I tested the merge in my local installation and it worked well. |
The version required was increased because we now use context_*::instance to retrieve contexts, rather than the deprecated functions get_context_*, which was introduced in 2.2.
This was done because the previous commit that removed the deprecated functions in index.php only works in 2.4 onwards.
This caused a debugging message to be thrown in 2.6.
Conflicts: version.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi Mark,
I extended a bit your certificate plugin by adding the course limited upload of the images.
Here is the description:
The Course protected images allows the user to upload images
that are visible only from Course specified during the upload.
The global uploading form has been extended by adding two fields:
Selecting this checkbox is going to place the upladed image inside
the $CFG->data_root/mod/certificate/image_type/course/$COURSE->shortname
folder. The images are then going to be visible only form the course
with the same shortname.
This field specifies the Course shortname to use during the upload.
Thus the file is going to be placed in the directory specified by
the input of this field. Before proceeding with the update the module
validates the input by checking the existence of the course.
This is particularly useful for the Signature images because
it avoids the signature to be visible in all other courses once they
are uploaded.
This commits also adds the Italian language support.
The attached image shows the new form. Please let me know if you have suggestions.
Regards,
Goran
