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

Students cannot see discussions in forums made by teachers if timedposts enabled

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9.1
    • Component/s: Forum
    • Labels:
      None
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      Latest CVS updated last night. Make a new standard forum in a course set to use no groups, with forum also set to no groups. Teacher posts a discussion and the students can't see it, just getting a message saying there are no posts available. With debugging turned on to max, this error comes up:

      You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 1210156000) OR d.userid = 1871) ' at line 8

      SELECT p.id,p.subject,p.modified,p.discussion,p.userid, d.name, d.timemodified, d.usermodified, d.groupid, d.timestart, d.timeend, u.firstname, u.lastname, u.email, u.picture, u.imagealt , um.firstname AS umfirstname, um.lastname AS umlastname FROM mdl_forum_discussions d JOIN mdl_forum_posts p ON p.discussion = d.id JOIN mdl_user u ON p.userid = u.id LEFT JOIN mdl_user um ON (d.usermodified = um.id) WHERE d.forum = 369 AND p.parent = 0 AND ((d.timestart = < 1210156000) AND (d.timeend = 0 OR d.timeend > 1210156000) OR d.userid = 1871) ORDER BY d.timemodified DESC

      • line 686 of lib\dmllib.php: call to debugging()
      • line 966 of lib\dmllib.php: call to get_recordset_sql()
      • line 2250 of mod\forum\lib.php: call to get_records_sql()
      • line 4578 of mod\forum\lib.php: call to forum_get_discussions()
      • line 265 of mod\forum\view.php: call to forum_print_latest_discussions()

        Attachments

          Activity

            People

            • Assignee:
              skodak Petr Skoda
              Reporter:
              mattgibson Matt Gibson
              Tester:
              Helen Foster
              Participants:
              Component watchers:
              Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                15/May/08