Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1, 2.2
    • Fix Version/s: 2.1.7, 2.2.4, 2.3.1
    • Component/s: Quiz
    • Labels:
      None
    • Testing Instructions:
      Hide

      1. Go to admin -> development -> XMLDB
      2. Run the check foreign keys script.
      3. Verify the results relating to quiz_attempts -> question_usages makes sense.

      Show
      1. Go to admin -> development -> XMLDB 2. Run the check foreign keys script. 3. Verify the results relating to quiz_attempts -> question_usages makes sense.
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
    • Rank:
      42028

      Description

      Checking foreign keys violations I realized a line in mod/quiz/db/install.xml seems wrong :
      <KEY NAME="uniqueid" TYPE="foreign-unique" FIELDS="uniqueid" REFTABLE="question_attempts" REFFIELDS="id" PREVIOUS="userid"/>
      to me it seems that REFFIELDS should be "questionusageid" and not "id", am I wrong ?
      Of course it doesn't really matter and this will not cause any harm
      But what surprise me is that I am surely not the first Moodle user to look at foreign keys violations since Moodle 2.1 is out ???

        Activity

        Hide
        Tim Hunt added a comment -

        Seemingly you are the first.

        Actually, it is the target table that is wrong.

        Show
        Tim Hunt added a comment - Seemingly you are the first. Actually, it is the target table that is wrong.
        Hide
        Jean-Michel Vedrine added a comment -

        Oh yes I see, with question_attempts table it would'nt be foreign-unique !!

        Show
        Jean-Michel Vedrine added a comment - Oh yes I see, with question_attempts table it would'nt be foreign-unique !!
        Hide
        Jean-Michel Vedrine added a comment -

        Oops my previous comment is wrong !! sorry but I just wake up ...

        Show
        Jean-Michel Vedrine added a comment - Oops my previous comment is wrong !! sorry but I just wake up ...
        Hide
        Tim Hunt added a comment -

        Rebased and 2.3 branch added.

        Show
        Tim Hunt added a comment - Rebased and 2.3 branch added.
        Hide
        Dan Poltawski added a comment -

        Integrated, thanks (21, 22, 23, master)

        Show
        Dan Poltawski added a comment - Integrated, thanks (21, 22, 23, master)
        Hide
        Aparup Banerjee added a comment -

        this works for me! (finally, had some vpn probs here)

        Show
        Aparup Banerjee added a comment - this works for me! (finally, had some vpn probs here)
        Hide
        Sam Hemelryk added a comment -

        Congratulations your code is upstream - gold star for you!

        This issue + 79 others made it in in time for the minor releases.
        Thank you everyone involved for your exuberant efforts.

        Show
        Sam Hemelryk added a comment - Congratulations your code is upstream - gold star for you! This issue + 79 others made it in in time for the minor releases. Thank you everyone involved for your exuberant efforts.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: