Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-3557

Unwanted HTML code may be included in xls, ods and txt certificate report downloads

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1, 2.2
    • Fix Version/s: None
    • Component/s: Module: Certificate
    • Labels:
      None
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE

      Description

      Choosing to download the certificate report on page mod/certificate report can produce unreadable .xls or .ods files (or txt files with unwanted html tags included)
      This is because lines like
      $PAGE->navbar->add($strreport);
      $PAGE->set_title(format_string($certificate->name).": $strreport");
      $PAGE->set_heading($course->fullname);
      and MOST IMPORTANT this block
      // Check to see if groups are being used in this choice
      if ($groupmode = groups_get_activity_groupmode($cm)) {
      groups_get_activity_group($cm, true);
      groups_print_activity_menu($cm, $CFG->wwwroot . '/mod/certificate/report.php?id='.$id);
      }
      are executed even if we are in download mode
      So some refactoring of the code is needed to correct the problem (see other Moodle modules with a similar feature to download report like choice or others

        Attachments

          Activity

            People

            Assignee:
            markn Mark Nelson
            Reporter:
            jmvedrine Jean-Michel Vedrine
            Participants:
            Component watchers:
            Mark Nelson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: