Skip to content
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
mdjnelson:masterfrom
arael:master
Open

Course protected images feature#22
arael wants to merge 16 commits into
mdjnelson:masterfrom
arael:master

Conversation

@arael
Copy link
Copy Markdown

@arael arael commented Jan 24, 2013

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:

  • 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.

The attached image shows the new form. Please let me know if you have suggestions.

Regards,

Goran
upload_image_form

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.
@mdjnelson
Copy link
Copy Markdown
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!

Goran Josic 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.
@arael
Copy link
Copy Markdown
Author

arael commented Feb 7, 2013

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants