Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-30273

Students and teachers can add additional topics to a simple forum discussion

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 2.2
    • 1.9.15, 2.0.7, 2.1.4
    • Forum
    • qa.moodle.net
    • Any
    • MOODLE_22_STABLE
    • MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE
    • wip-MDL-30273-master
    • Hide

      1. Login as a teacher and start a discussion in a single simple discussion forum.
      2. Login as a student and enter the manual URL.
      3. Check that, as a student, it is not possible to start a discussion.

      Show
      1. Login as a teacher and start a discussion in a single simple discussion forum. 2. Login as a student and enter the manual URL. 3. Check that, as a student, it is not possible to start a discussion.

    Description

      This was revealed by MDLQA-1196. It's possible for teachers and students to add new topics to a simple forum discussion by manually going to the appropriate URL (your.moodle.instance/mod/forum/post.php?forum=FORUMID). The forum page itself will still only show the first forum posting since it uses get_record() to pull the discussions, but if you have debugging turned on you'll get a db error since multiple records were found:

      Error: mdb->get_record() found more than one record!
      line 1302 of /lib/dml/moodle_database.php: call to debugging()
      line 1262 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
      line 1242 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
      line 144 of /mod/forum/view.php: call to moodle_database->get_record()

      The forum shouldn't rely on the interface alone to control this behavior.

      Attachments

        Issue Links

          Activity

            People

              abgreeve Adrian Greeve
              cfulton Charles Fulton
              Ankit Agarwal Ankit Agarwal
              Sam Hemelryk Sam Hemelryk
              Sam Hemelryk Sam Hemelryk
              Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                28/Nov/11