Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6.4, 1.7, 1.7.1, 1.8, 1.9
    • Fix Version/s: 1.6.5, 1.7.2, 1.8, 1.9
    • Component/s: Administration, Survey
    • Labels:
      None
    • Affected Branches:
      MOODLE_16_STABLE, MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_16_STABLE, MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      When you look at the Admin=>Modules (Activities in 1.7 and on) you see that the count of Surveys is 5 when no surveys have been created anywhere on the site. This is the case with a completely new site. Checking the database shows that they have a course id of 0. I guess that these may be created for a reason, but in that case they should not form part of the count.

      SQL dump as follows....

      mysql> select * from mdl_survey\G

                                                          • 1. row ***************************
                                                            id: 1
                                                            course: 0
                                                            template: 0
                                                            days: 0
                                                            timecreated: 985017600
                                                            timemodified: 985017600
                                                            name: collesaname
                                                            intro: collesaintro
                                                            questions: 25,26,27,28,29,30,43,44
                                                          • 2. row ***************************
                                                            id: 2
                                                            course: 0
                                                            template: 0
                                                            days: 0
                                                            timecreated: 985017600
                                                            timemodified: 985017600
                                                            name: collespname
                                                            intro: collespintro
                                                            questions: 31,32,33,34,35,36,43,44
                                                          • 3. row ***************************
                                                            id: 3
                                                            course: 0
                                                            template: 0
                                                            days: 0
                                                            timecreated: 985017600
                                                            timemodified: 985017600
                                                            name: collesapname
                                                            intro: collesapintro
                                                            questions: 37,38,39,40,41,42,43,44
                                                          • 4. row ***************************
                                                            id: 4
                                                            course: 0
                                                            template: 0
                                                            days: 0
                                                            timecreated: 985017600
                                                            timemodified: 985017600
                                                            name: attlsname
                                                            intro: attlsintro
                                                            questions: 65,67,68
                                                          • 5. row ***************************
                                                            id: 5
                                                            course: 0
                                                            template: 0
                                                            days: 0
                                                            timecreated: 985017600
                                                            timemodified: 985017600
                                                            name: ciqname
                                                            intro: ciqintro
                                                            questions: 69,70,71,72,73
                                                            5 rows in set (0.00 sec)

        Gliffy Diagrams

          Activity

          Hide
          dougiamas Martin Dougiamas added a comment -

          Yes, those are the base templates. I guess the count could be fixed.

          Show
          dougiamas Martin Dougiamas added a comment - Yes, those are the base templates. I guess the count could be fixed.
          Hide
          dougiamas Martin Dougiamas added a comment -

          Nicolas, can you fix this please? It's a one-line fix (to exclude all the lines with "course = 0" from the count).

          Show
          dougiamas Martin Dougiamas added a comment - Nicolas, can you fix this please? It's a one-line fix (to exclude all the lines with "course = 0" from the count).
          Hide
          dougiamas Martin Dougiamas added a comment -

          hint: the function that produces the count has a brother next to it.

          Show
          dougiamas Martin Dougiamas added a comment - hint: the function that produces the count has a brother next to it.
          Hide
          howardsmiller Howard Miller added a comment -

          I was about there anyway, so I just fixed it. Modules with course=0 are not counted.

          Show
          howardsmiller Howard Miller added a comment - I was about there anyway, so I just fixed it. Modules with course=0 are not counted.
          Hide
          dougiamas Martin Dougiamas added a comment -

          I was actually using this bug as a little test for a potential new programmer but that's OK, thanks, Howard!

          Show
          dougiamas Martin Dougiamas added a comment - I was actually using this bug as a little test for a potential new programmer but that's OK, thanks, Howard!
          Hide
          howardsmiller Howard Miller added a comment -

          Oops sorry - I was having a keen day yesterday

          Show
          howardsmiller Howard Miller added a comment - Oops sorry - I was having a keen day yesterday

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                30/Mar/07