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

Front page (student view): Error reading from database

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Labels:
      None
    • Environment:
    • Database:
      Microsoft SQL
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      I installed a fresh new instance of Moodle 2.0 Preview 3 (Build: 20100623) (2010062100) with a completely new database on MSSQL 2005. The installation ran perfectly without any errors or problems.

      I then logged in as Admin and got no problems or errors on the site, so I created one student user. At this stage the only user accounts on this instance of Moodle are the Admin user and one Student user. I have not created any courses yet or added any content.

      Then I logged out and the Front Page displayed correctly. It correctly shows the "(No news has been posted yet)" message under Site News and "No courses in this category" is displayed under Available Courses. So far so good...

      Then I logged in as the STUDENT and Moodle displayed the My Courses page for the Student user. Under the My Courses heading I see a "Error reading from database" message. See Screenshot1.gif.
      The 'More information about this error' link points to http://docs.moodle.org/en/error/moodle/dmlreadexception which has not been created yet.

      If I click on the 'My home' link in the Navigation block there is no error and the My home page shows the Course overview heading with "No course information to show" below it. This is correct since there are no courses on the site yet. If I click on the 'Home' link in the Navigation block again I see the 'Error reading from database' message again.

      I get the above error on both Firefox 3.6.3 and Internet Explorer 7.0.5730.11.

      I am running another instance of Moodle (Release: 1.9.6+ (Build: 20091104) Version: 2007101560) on this same server and that instance does not exhibit this 'Error reading from database' problem. I only get it on the Moodle 2 instance.

      NTFS permissions are identical on the Explorer directories of the two sites. The MoodleData directories of the two sites and the Directory Security settings in IIS are the same for both sites (Anonymous access and Integrated Windows Authentication are enabled), so it's not a permissions problem.

      To investigate further I made the student user a Site Administrator under Site Admin / Users / Permissions / Site Administrators and then logged in as the student again. The 'Error reading from database' problem was NOT exhibited. After removing the students' Site Administrator proviledges and logging in as the student again I continued to get the 'Error reading from database' error. So, the error is only displayed when I'm logged in as a student.

      Then I thought that perhaps the problem was caused by me not having any courses on the site yet. So I created a course. I added just one quiz to the course with two True/False questions. The only content in the course is the default News Forum and this Quiz.

      The above error is still displayed when I login as the student. No error is displayed when I'm logged in as Admin.

      Then I try to enrol the Student into the course while still logged in as Admin: I go into the course and click on Users / Enrolled Users on the Settings block in the course. Now I DO get the 'Error reading from database' error - even though I'm logged in as Admin.

      To enroll the student I go to Course Admin / Users / Enrolment methods / Manual enrolments and add the student. When I login as the student again I still get the 'Error reading from database' error. If I expand My courses in the Navigation block it shows that I am enrolled in the course. See Screenshot2.gif. This shows that the problem isn't related to me not having any courses on the site or the student not being enrolled in any courses.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  24/Nov/10