Moodle
  1. Moodle
  2. MDL-31590

The title of the header of the dialog that appears when the file selector finds a virus with clamav is incorrect

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.1.4
    • Fix Version/s: 2.1.5, 2.2.2
    • Component/s: Files API
    • Labels:
    • Testing Instructions:
      Hide

      Setup Instructions

      Ensure that you have a virus checker installed and configured in moodle.
      I installed clamav and clamd and added the following to my config.php:

      $CFG->runclamonupload=1;
      $CFG->pathtoclam = '/usr/bin/clamdscan';
      

      Testing Instructions

      • Download the eicar test virus from http://www.eicar.org/85-0-Download.html
      • Open a course and turn editing on
      • Add a new File activity
      • Under 'Select files' choose 'Add'
      • Upload the file and choose the 'Upload this file' button
      • Confirm that you receive an error message with the title 'Error'
        • For extra bonus points try in others languages as the original header was not translatable and should be now
      Show
      Setup Instructions Ensure that you have a virus checker installed and configured in moodle. I installed clamav and clamd and added the following to my config.php: $CFG->runclamonupload=1; $CFG->pathtoclam = '/usr/bin/clamdscan'; Testing Instructions Download the eicar test virus from http://www.eicar.org/85-0-Download.html Open a course and turn editing on Add a new File activity Under 'Select files' choose 'Add' Upload the file and choose the 'Upload this file' button Confirm that you receive an error message with the title 'Error' For extra bonus points try in others languages as the original header was not translatable and should be now
    • Workaround:
      Hide

      Understand english, modify the file filepicker.js

      Show
      Understand english, modify the file filepicker.js
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-31590-master-1
    • Rank:
      38153

      Description

      Currently, the header of the dialog box uses the wrong variable in the javascript:

      repository/filepicker.js
      var header = M.str.moodle.info;
      if (type=='error') {
        header = M.str.moodle.error;
      }
      this.msg_dlg.setHeader(type);
      

      it should use the variable "header", not type in the setHeader() at line 314 for the version 2.2.1:

      repository/filepicker.js
      var header = M.str.moodle.info;
      if (type=='error') {
        header = M.str.moodle.error;
      }
      this.msg_dlg.setHeader(header);
      

        Activity

        Hide
        Andrew Nicols added a comment -

        This should cherry-pick cleanly to:

        • master (obviously)
        • MOODLE_22_STABLE
        • MOODLE_21_STABLE
        Show
        Andrew Nicols added a comment - This should cherry-pick cleanly to: master (obviously) MOODLE_22_STABLE MOODLE_21_STABLE
        Hide
        Dan Poltawski added a comment -

        Looks good to me

        Show
        Dan Poltawski added a comment - Looks good to me
        Hide
        Eloy Lafuente (stronk7) added a comment -

        The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

        TIA and ciao

        Show
        Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
        Hide
        Sam Hemelryk added a comment -

        Thanks Andrew this has been integrated now and cherry-picked to 21 and 22.

        Show
        Sam Hemelryk added a comment - Thanks Andrew this has been integrated now and cherry-picked to 21 and 22.
        Hide
        Rossiani Wijaya added a comment -

        This is working great.

        Thank for fixing.

        Test passed.

        Show
        Rossiani Wijaya added a comment - This is working great. Thank for fixing. Test passed.
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Some changes to Moodle should be milestones in the project by themselves.

        This is not the case and your fix is not so important, but your collaboration is highly appreciated, thanks!

        Closing as fixed, ciao

        Show
        Eloy Lafuente (stronk7) added a comment - Some changes to Moodle should be milestones in the project by themselves. This is not the case and your fix is not so important, but your collaboration is highly appreciated, thanks! Closing as fixed, ciao

          People

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

            Dates

            • Created:
              Updated:
              Resolved: