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

          Attachments

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  12/Mar/12