Details

    • Database:
      MySQL
    • Affected Branches:
      MOODLE_20_STABLE
    • Rank:
      4597

      Description

      Script for generating all sorts of course data, through web browser or CLI. Migrated from Contrib CONTRIB-490

      Progress
      Resolved Sub-Tasks Unresolved Sub-Tasks

      Sub-Tasks

        Activity

        Hide
        Tim Hunt added a comment -

        Nico, what is the status of this? Isn't it done?

        Show
        Tim Hunt added a comment - Nico, what is the status of this? Isn't it done?
        Hide
        Martin Dougiamas added a comment -

        Reassigning this to moodle.com for the time being, since Mark Nielsen is not maintaining Lesson any more. Please comment/vote/patch any crucial bugs that affect you for 2.0 to help us prioritise fixes for the upcoming release.

        Show
        Martin Dougiamas added a comment - Reassigning this to moodle.com for the time being, since Mark Nielsen is not maintaining Lesson any more. Please comment/vote/patch any crucial bugs that affect you for 2.0 to help us prioritise fixes for the upcoming release.
        Hide
        Tomasz Muras added a comment -

        Patch in MDL-25796 and commits on github:
        https://github.com/enovation/moodle/tree/MDL-16177
        will make the generator script usable again.

        After those two are merged, there will be still work left on MDL-16420 - this can be done on module by module basis.

        Show
        Tomasz Muras added a comment - Patch in MDL-25796 and commits on github: https://github.com/enovation/moodle/tree/MDL-16177 will make the generator script usable again. After those two are merged, there will be still work left on MDL-16420 - this can be done on module by module basis.
        Hide
        Wen Hao Chuang added a comment -

        Can we make some efforts to push this into the core code? Personally I really like this script as it can save a lot of time generating a lot of testing data.. Just my 2 cents. Thanks!

        Show
        Wen Hao Chuang added a comment - Can we make some efforts to push this into the core code? Personally I really like this script as it can save a lot of time generating a lot of testing data.. Just my 2 cents. Thanks!
        Hide
        Dan Marsden added a comment -

        I'm not sure I'd like to see this in core - generator scripts are for developers - if we add it to core and someone runs it on their production site it could be a pain to tidy up - unless we write a reliable/safe clean up script at the same time.

        If this did land in core - it should only be possible to enable it by hard coding a CFG var - it should always be disabled by default.

        Show
        Dan Marsden added a comment - I'm not sure I'd like to see this in core - generator scripts are for developers - if we add it to core and someone runs it on their production site it could be a pain to tidy up - unless we write a reliable/safe clean up script at the same time. If this did land in core - it should only be possible to enable it by hard coding a CFG var - it should always be disabled by default.
        Hide
        Tomasz Muras added a comment -

        The actual generation doesn't need to be in the core but see MDL-16420 - what we need is plugins supporting generating random data. And this should be in the core - simply as part of core activities.
        Keep in mind that this adds maintenance overhead for the modules - whenever some logic is updated, random data generation functions may need to be updated.

        Show
        Tomasz Muras added a comment - The actual generation doesn't need to be in the core but see MDL-16420 - what we need is plugins supporting generating random data. And this should be in the core - simply as part of core activities. Keep in mind that this adds maintenance overhead for the modules - whenever some logic is updated, random data generation functions may need to be updated.
        Hide
        Dan Marsden added a comment -

        that makes sense - is there some code around already for this?

        Show
        Dan Marsden added a comment - that makes sense - is there some code around already for this?
        Hide
        Tim Hunt added a comment -

        I think that anything done here should build upon the same framework that is used to generate data for the PHPunit and Behat tests. That infrastructure is in Moodle core, and the bits specific to each plug-in are in that plugin. For example in mod/quiz/tests/generator/.... What this issue should be about is about exposing a UI to let developers randomly generate lots of stuff for testing. That should be done as a plugin (an admin tool?). Does that plugin go in core (like XMLDB or phpunit) or does it go in contrib (like codechecker)? Well, it does not matter for now. It should be developed in contrib, and it would be great if someone could work on it.

        Show
        Tim Hunt added a comment - I think that anything done here should build upon the same framework that is used to generate data for the PHPunit and Behat tests. That infrastructure is in Moodle core, and the bits specific to each plug-in are in that plugin. For example in mod/quiz/tests/generator/.... What this issue should be about is about exposing a UI to let developers randomly generate lots of stuff for testing. That should be done as a plugin (an admin tool?). Does that plugin go in core (like XMLDB or phpunit) or does it go in contrib (like codechecker)? Well, it does not matter for now. It should be developed in contrib, and it would be great if someone could work on it.
        Hide
        Tomasz Muras added a comment -

        +1 to make it the same effort as mod/*/tests/generator. The UI for the actual generation of the random data should be a contrib plugin, there is no need to make it part of core. I wouldn't even be interested in UI, just a CLI interface, so I can automate it easily.

        The framework is there but there is a lot of work for core modules to support it. Most of the modules don't have anything under mod/*/tests/generator and those that do - only support basics, e.g. I can see that quiz module can create new quiz instance but generator can't fill it with random data (random questions and then random answers for user's data).

        Show
        Tomasz Muras added a comment - +1 to make it the same effort as mod/*/tests/generator. The UI for the actual generation of the random data should be a contrib plugin, there is no need to make it part of core. I wouldn't even be interested in UI, just a CLI interface, so I can automate it easily. The framework is there but there is a lot of work for core modules to support it. Most of the modules don't have anything under mod/*/tests/generator and those that do - only support basics, e.g. I can see that quiz module can create new quiz instance but generator can't fill it with random data (random questions and then random answers for user's data).
        Hide
        Tim Hunt added a comment -

        Well, this will happen with time. For example, Jamie Pratt is just starting some work on the quiz reports, which will involve extneding the generator to be able to generate questions and quiz attempts.

        Show
        Tim Hunt added a comment - Well, this will happen with time. For example, Jamie Pratt is just starting some work on the quiz reports, which will involve extneding the generator to be able to generate questions and quiz attempts.
        Hide
        Tomasz Muras added a comment -

        In that case, I think that generator work should be postponed until we have at least few core modules supporting data generation. Unless we get someone interested in the development and willing to push it forward.

        Show
        Tomasz Muras added a comment - In that case, I think that generator work should be postponed until we have at least few core modules supporting data generation. Unless we get someone interested in the development and willing to push it forward.

          People

          • Votes:
            11 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

            • Created:
              Updated: