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

ext. database enrollment plugin ignores sitewide default settings for course creation

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.1
    • Fix Version/s: 2.1.4, 2.2.1
    • Component/s: Enrolments
    • Labels:
      None
    • Environment:
      Centos 5.6 x86_64, Apache 2.2.3, php 5.3.3, postgresql 8.4
      External database is also a postgresql 8.4
    • Database:
      PostgreSQL
    • Testing Instructions:
      Hide
      • Provide a database with sample courses (fields: idnumber, shortname, fullnumber, category) ; specifically ommit the value for the template course
      • Provide a database with enrollment information (fields: idnumber, username, role shortname )
      • Configure enrollment plugin to use this external database
      • at the command line perform

      sudo -u apache /usr/bin/php /path/to/moodle/enrol/database/cli/sync.php

      Observe that the newly created courses

      • have only one section in numsections
      • have an NULL value for summary

      Note
      There may be an additional bug (if it is not an intended feature) that prevents courses with NULL value in the summary column to be found by using moodle/course/search.php, at least when using postgresql as database. If not already present (have to investigate), i will add an issue report for that

      Show
      Provide a database with sample courses (fields: idnumber, shortname, fullnumber, category) ; specifically ommit the value for the template course Provide a database with enrollment information (fields: idnumber, username, role shortname ) Configure enrollment plugin to use this external database at the command line perform sudo -u apache /usr/bin/php /path/to/moodle/enrol/database/cli/sync.php Observe that the newly created courses have only one section in numsections have an NULL value for summary Note There may be an additional bug (if it is not an intended feature) that prevents courses with NULL value in the summary column to be found by using moodle/course/search.php, at least when using postgresql as database. If not already present (have to investigate), i will add an issue report for that
    • Affected Branches:
      MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w51_MDL-29117_m23_enrolnewcourse

      Description

      If the external database enrollment plugin is configured to create courses (enrol_database|newcoursetable, etc.) and no valid value for enrol_database|templatecourse is provided, then newly created courses do not contain the values from the sitewide course default configuration menu, as could be expected.

      Moreover, due to the unconfigured values for attributes like numsections and especially summary, some functionality of moodle is not working properly with the newly created courses.

      Expected Behaviour

      • Either make the template course setting mandatory OR
      • (IMHO better) use the config settings from the site - wide default course setting module
      • It would be very nice if a warning / info message could be displayed at the command line (probably in combination with the upcoming verbose flag) in order to hint at the source of unintended behaviour

      Cf. http://moodle.org/mod/forum/discuss.php?d=169175 for a potentially related discussion (well, maybe?)

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            martinschwinzerl Martin Schwinzerl added a comment -

            The problem with NULL summarys + search when using postgresql databases can be found at http://tracker.moodle.org/browse/MDL-25481

            Show
            martinschwinzerl Martin Schwinzerl added a comment - The problem with NULL summarys + search when using postgresql databases can be found at http://tracker.moodle.org/browse/MDL-25481
            Hide
            skodak Petr Skoda added a comment -

            Thanks for the report!

            Show
            skodak Petr Skoda added a comment - Thanks for the report!
            Hide
            samhemelryk Sam Hemelryk added a comment -

            Thanks Petr this has been integrated now Much easier to review after reviewing MDL-30687

            Show
            samhemelryk Sam Hemelryk added a comment - Thanks Petr this has been integrated now Much easier to review after reviewing MDL-30687
            Hide
            nebgor Aparup Banerjee added a comment -

            i'm not feeling too good here. stopping the test for others to pick up.

            Show
            nebgor Aparup Banerjee added a comment - i'm not feeling too good here. stopping the test for others to pick up.
            Hide
            rajeshtaneja Rajesh Taneja added a comment -

            Works Great
            Thanks for fixing this, Petr.

            Show
            rajeshtaneja Rajesh Taneja added a comment - Works Great Thanks for fixing this, Petr.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Whoever decided one week was worth 14 days had really one bad idea. Anyway, the nightmare is over, so thanks for your, once again, amazing contributions. Many, many thanks!

            Now... disconnect, relax and enjoy the next days, yay!

            Closing...ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Whoever decided one week was worth 14 days had really one bad idea. Anyway, the nightmare is over, so thanks for your, once again, amazing contributions. Many, many thanks! Now... disconnect, relax and enjoy the next days, yay! Closing...ciao

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  9/Jan/12