CONTRIB-4124 - Remove spurious calendar event code
CONTRIB-4091 - Fix for pagination when groups or groupings used
Removed unnecessary code in the delete and add instance functions
CONTRIB-4111 - Ensure certificate dates generated use Moodle's userdate function for consistency
CONTRIB-4089 - Create a directory that is writeable so that TCPDF can create temp images
Pulled the latest code from upstream and merged

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.