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

algebra questiontype import_from_xml is not compatible with other third party questiontypes

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.9.7
    • None
    • Question type: Algebra
    • None
    • Any
    • Easy
    • MOODLE_19_STABLE

    Description

      In the import_from_xml method the algebra questiontype is not checking the type of the imported questions so if other third party questiontypes are installed and algebra method is called first it think that the question is an algebra one (even if it is not) and try to import it.
      the code I use in my questionstypes (and wich is also the one Joseph Rezeau is using in its regexp questiontype) is :

      if (!array_key_exists('@', $data))

      { return false; }
      if (!array_key_exists('type', $data['@'])) { return false; }

      if ($data['@']['type'] == 'algebra') {

      I don't use algebra myself but noticed that because one of the testers of the next version of the jme questiontype wich include xml import/export reported a problem because he had algebra installed.
      If algebra is the only third party questiontype installed there is no problem. Problem arise when you have algebra and an other one installed

      Attachments

        Activity

          People

            moore Roger Moore
            jmvedrine Jean-Michel Vedrine
            Roger Moore
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: