Moodle
  1. Moodle
  2. MDL-33358

Option to disable license and author fields in filepicker

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.9, 2.1.6, 2.2.3
    • Fix Version/s: None
    • Component/s: Filepicker
    • Labels:
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Rank:
      41216

      Description

      Filepicker

      • Allow plugins the ability to enable the license and author fields. Or give the plugins the ability to set a default value for both and disable them, to prevent users from changing these.

        Activity

        Hide
        Martin Dougiamas added a comment -

        Akin, could you please create separate issues for ... separate issues?

        Show
        Martin Dougiamas added a comment - Akin, could you please create separate issues for ... separate issues?
        Hide
        Akin Delamarre added a comment -

        Sure.

        Show
        Akin Delamarre added a comment - Sure.
        Hide
        Akin Delamarre added a comment -

        Created a new improvement task specifically for the TinyMCE support for video repository plug-ins. MDL-33390

        Show
        Akin Delamarre added a comment - Created a new improvement task specifically for the TinyMCE support for video repository plug-ins. MDL-33390
        Hide
        Michael de Raadt added a comment -

        Thanks for suggesting this.

        Adding more detail to your suggestion will make it easier to work on.

        If you can propose a code solution, that will help others who may have the same need and will increase the chance of this improvement/feature coming about sooner. If you are able to provide a patch, please add a patch label so we will spot it.

        Show
        Michael de Raadt added a comment - Thanks for suggesting this. Adding more detail to your suggestion will make it easier to work on. If you can propose a code solution, that will help others who may have the same need and will increase the chance of this improvement/feature coming about sooner. If you are able to provide a patch, please add a patch label so we will spot it.
        Hide
        Akin Delamarre added a comment -

        Sure I will give it a shot.

        Show
        Akin Delamarre added a comment - Sure I will give it a shot.
        Hide
        Akin Delamarre added a comment -

        In looking at this further, I discovered that if 'hasauthor' and 'haslicense' is set to true, the license and author fields will not be printed.

        Please feel free to close this issue. But if you would like a patch where instead of hiding the fields, the are disabled then let me know and I can write one.

        Show
        Akin Delamarre added a comment - In looking at this further, I discovered that if 'hasauthor' and 'haslicense' is set to true, the license and author fields will not be printed. Please feel free to close this issue. But if you would like a patch where instead of hiding the fields, the are disabled then let me know and I can write one.
        Hide
        Marina Glancy added a comment -

        Akin, I am not sure those hasauthor and haslicense work as expected, I was trying to deprecate them actually.
        Besides user is still able to change license and author in filemanager afterwards. And there is no possibility to 'lock' those fields, so they are displayed but not editable.
        So we can't close the issue since it is still an issue

        Show
        Marina Glancy added a comment - Akin, I am not sure those hasauthor and haslicense work as expected, I was trying to deprecate them actually. Besides user is still able to change license and author in filemanager afterwards. And there is no possibility to 'lock' those fields, so they are displayed but not editable. So we can't close the issue since it is still an issue
        Hide
        Akin Delamarre added a comment -

        How come hasauthor and haslicense are scheduled to be deprecated?

        Show
        Akin Delamarre added a comment - How come hasauthor and haslicense are scheduled to be deprecated?
        Hide
        Marina Glancy added a comment -

        Akin, well, they were not really supported before either. They only influenced the visibility of license and author fields in filepicker. But since after the file was 'picked' nobody ever was able to see the author or license, it did not really matter. When repository specified 'hasauthor' and 'haslicense', it did not actually push it's own license or author into moodle. So there was not really much sense in them.

        At some moment we decided with Martin that user is always able to overwrite the license and author but the repositories can suggest its author/license. This is when hasauthor and haslicense were planned to be deprecated.

        It is technically very difficult to lock this information. Even if we disable those fields in filepicker, file may be modified later in filemanager and user can change the license/author.
        User may pick up the file from external repository into his private files and then pick up from his private files into course (and change author/license on the second pick).

        Of course we may add some properties to the file that the author/license information is locked. But it is a lot of work which is sort of meaningless since user can download file and upload again.

        So, basically what I suggest is to preserve 'hasauthor' and 'haslicense' fields. They will actually mean 'lockauthor' and 'locklicense'. But they will only affect file picking dialogue. We will not prohibit user to change this information later in filemanager or by creating the file copies. How about that?

        Show
        Marina Glancy added a comment - Akin, well, they were not really supported before either. They only influenced the visibility of license and author fields in filepicker. But since after the file was 'picked' nobody ever was able to see the author or license, it did not really matter. When repository specified 'hasauthor' and 'haslicense', it did not actually push it's own license or author into moodle. So there was not really much sense in them. At some moment we decided with Martin that user is always able to overwrite the license and author but the repositories can suggest its author/license. This is when hasauthor and haslicense were planned to be deprecated. It is technically very difficult to lock this information. Even if we disable those fields in filepicker, file may be modified later in filemanager and user can change the license/author. User may pick up the file from external repository into his private files and then pick up from his private files into course (and change author/license on the second pick). Of course we may add some properties to the file that the author/license information is locked. But it is a lot of work which is sort of meaningless since user can download file and upload again. So, basically what I suggest is to preserve 'hasauthor' and 'haslicense' fields. They will actually mean 'lockauthor' and 'locklicense'. But they will only affect file picking dialogue. We will not prohibit user to change this information later in filemanager or by creating the file copies. How about that?
        Hide
        Akin Delamarre added a comment -

        Perhaps instead of giving the plug-in the ability to disable those fields. How about conditionally disabling those fields if the repository supports external linking (such as the YouTube repo)?

        The idea to conditionally disable it came from this task http://tracker.moodle.org/browse/MDL-33920

        Show
        Akin Delamarre added a comment - Perhaps instead of giving the plug-in the ability to disable those fields. How about conditionally disabling those fields if the repository supports external linking (such as the YouTube repo)? The idea to conditionally disable it came from this task http://tracker.moodle.org/browse/MDL-33920
        Hide
        Marina Glancy added a comment -

        Akin, it is already so in 2.3. You won't see those fields if you pick from Youtube or if you pick from wikimedia and select "insert as link"

        Show
        Marina Glancy added a comment - Akin, it is already so in 2.3. You won't see those fields if you pick from Youtube or if you pick from wikimedia and select "insert as link"
        Hide
        Akin Delamarre added a comment -

        So is this fix going to be ported to Moodle 2.0, 2.1 and 2.2?

        Show
        Akin Delamarre added a comment - So is this fix going to be ported to Moodle 2.0, 2.1 and 2.2?
        Hide
        Michael de Raadt added a comment -

        It looks like this problem has been resolved.

        Show
        Michael de Raadt added a comment - It looks like this problem has been resolved.

          People

          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: