Uploaded image for project: '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
    • Status: Closed
    • Priority: 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

      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);

        Gliffy Diagrams

          Activity

          Hide
          dobedobedoh Andrew Nicols added a comment -

          This should cherry-pick cleanly to:

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

          Looks good to me

          Show
          poltawski Dan Poltawski added a comment - Looks good to me
          Hide
          stronk7 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
          stronk7 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
          samhemelryk Sam Hemelryk added a comment -

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

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

          This is working great.

          Thank for fixing.

          Test passed.

          Show
          rwijaya Rossiani Wijaya added a comment - This is working great. Thank for fixing. Test passed.
          Hide
          stronk7 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
          stronk7 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:
                Fix Release Date:
                12/Mar/12