Moodle
  1. Moodle
  2. MDL-32999 META: Files UI Stage 2 polishing in master
  3. MDL-33325

When in "edit" filemanager for standard folder activity, should not see "Set main file" button.

    Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.1.7, 2.2.4
    • Component/s: Filepicker
    • Labels:
    • Testing Instructions:
      Hide
      1. Add a folder resource to a course
      2. Add a few files to the resource
      3. Try editing any file.
      4. Make sure the file-picker pop-up doesn't contain the button "Set as main file" (in stables right click on the file and make sure ,there is no such option as 'set as main file')
      5. If it works as expected treat yourself with a cookie
      Show
      Add a folder resource to a course Add a few files to the resource Try editing any file. Make sure the file-picker pop-up doesn't contain the button "Set as main file" (in stables right click on the file and make sure ,there is no such option as 'set as main file') If it works as expected treat yourself with a cookie
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull Master Branch:
      MDL-33325-master

      Description

      I guess there is an options parameter for this page that just needs to be removed.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Martin Dougiamas added a comment - - edited

            diff --git a/mod/folder/edit.php b/mod/folder/edit.php
            index 161745c..4e9a1e5 100644
            --- a/mod/folder/edit.php
            +++ b/mod/folder/edit.php
            @@ -48,7 +48,7 @@ $PAGE->set_activity_record($folder);
             
             $data = new stdClass();
             $data->id = $cm->id;
            -$options = array('mainfile'=>true, 'subdirs'=>1, 'maxbytes'=>$CFG->maxbytes, 'maxfiles'=>-1, 'accepted_types'=>'*', 'return_types'=>FILE_INTERNAL);
            +$options = array('subdirs'=>1, 'maxbytes'=>$CFG->maxbytes, 'maxfiles'=>-1, 'accepted_types'=>'*', 'return_types'=>FILE_INTERNAL);
             file_prepare_standard_filemanager($data, 'files', $options, $context, 'mod_folder', 'content', 0);
             
             $mform = new mod_folder_edit_form(null, array('data'=>$data, 'options'=>$options));
            

            Show
            Martin Dougiamas added a comment - - edited diff --git a/mod/folder/edit.php b/mod/folder/edit.php index 161745c..4e9a1e5 100644 --- a/mod/folder/edit.php +++ b/mod/folder/edit.php @@ -48,7 +48,7 @@ $PAGE->set_activity_record($folder); $data = new stdClass(); $data->id = $cm->id; -$options = array('mainfile'=>true, 'subdirs'=>1, 'maxbytes'=>$CFG->maxbytes, 'maxfiles'=>-1, 'accepted_types'=>'*', 'return_types'=>FILE_INTERNAL); +$options = array('subdirs'=>1, 'maxbytes'=>$CFG->maxbytes, 'maxfiles'=>-1, 'accepted_types'=>'*', 'return_types'=>FILE_INTERNAL); file_prepare_standard_filemanager($data, 'files', $options, $context, 'mod_folder', 'content', 0); $mform = new mod_folder_edit_form(null, array('data'=>$data, 'options'=>$options));
            Hide
            Rossiani Wijaya added a comment -

            This looks good Ankit.

            Show
            Rossiani Wijaya added a comment - This looks good Ankit.
            Hide
            Ankit Agarwal added a comment -

            Thanks for the review.
            Sending this for integration.

            Show
            Ankit Agarwal added a comment - Thanks for the review. Sending this for integration.
            Hide
            Sam Hemelryk added a comment -

            Thanks guys this has been integrated now.

            Show
            Sam Hemelryk added a comment - Thanks guys this has been integrated now.
            Hide
            Sam Hemelryk added a comment -

            Tested during integration review and passed

            Show
            Sam Hemelryk added a comment - Tested during integration review and passed
            Hide
            Dan Poltawski added a comment -

            Congratulations!

            Your work has made into the latest Moodle release!

            You are only authorised to celebrate after testing 15 Moodle 2.3 QA tests, thanks!

            Show
            Dan Poltawski added a comment - Congratulations! Your work has made into the latest Moodle release! You are only authorised to celebrate after testing 15 Moodle 2.3 QA tests, thanks!

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: