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

Missing reset for workshop module

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.7
    • Fix Version/s: 1.9.8
    • Component/s: Workshop
    • Labels:
      None
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      The workshop module does not has the reset implemented. The attached patch should be able to implement the reset.

      The patch is created against 1.9.7 and we tested it on testing environments.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              andreabix Andrea Bicciolo added a comment -

              Forgot to mention it is needed to add the following language string in workshop.php: $string['resetworkshopall'] ='Delete all workshop elements';

              Show
              andreabix Andrea Bicciolo added a comment - Forgot to mention it is needed to add the following language string in workshop.php: $string ['resetworkshopall'] ='Delete all workshop elements';
              Hide
              mudrd8mz David Mudrák added a comment -

              There are some issues with the patch:

              • it defines reset_certificate_all form field instead of reset_workshop_all - the provided version could not work actually - fixing
              • is uses subselects where not actually needed - I am fixing to preload the workshop ids once and re-use the list
              • it removes assessment forms definition. Which is IMO wrong because the reset should remove just students' participation info (submissions, grades etc) but the assessment forms which are part of the workshop settings - fixing

              Anyway, thanks a lot for the patch. Committing soon

              Show
              mudrd8mz David Mudrák added a comment - There are some issues with the patch: it defines reset_certificate_all form field instead of reset_workshop_all - the provided version could not work actually - fixing is uses subselects where not actually needed - I am fixing to preload the workshop ids once and re-use the list it removes assessment forms definition. Which is IMO wrong because the reset should remove just students' participation info (submissions, grades etc) but the assessment forms which are part of the workshop settings - fixing Anyway, thanks a lot for the patch. Committing soon
              Hide
              mudrd8mz David Mudrák added a comment -

              Also, the order of the tables clean up matters. We can't remove, for example, assessments before comments as comments depend on assessments (referential integrity)

              Show
              mudrd8mz David Mudrák added a comment - Also, the order of the tables clean up matters. We can't remove, for example, assessments before comments as comments depend on assessments (referential integrity)
              Hide
              mudrd8mz David Mudrák added a comment - - edited

              After reset, workshop_elements table values will be set to:

              • stdev to 0 (zero) - should be NULL but can't be because of the DB definition
              • totalassessments to 0 (zero)
              Show
              mudrd8mz David Mudrák added a comment - - edited After reset, workshop_elements table values will be set to: stdev to 0 (zero) - should be NULL but can't be because of the DB definition totalassessments to 0 (zero)
              Hide
              mudrd8mz David Mudrák added a comment -

              Committed into MOODLE_19_STABLE. Thanks for providing the patch.

              Show
              mudrd8mz David Mudrák added a comment - Committed into MOODLE_19_STABLE. Thanks for providing the patch.
              Hide
              andreabix Andrea Bicciolo added a comment -

              Thanks to you for examining and refining the patch!

              Show
              andreabix Andrea Bicciolo added a comment - Thanks to you for examining and refining the patch!
              Hide
              andyjdavis Andrew Davis added a comment -

              I was able to successfully reset a workshop. Closing.

              Show
              andyjdavis Andrew Davis added a comment - I was able to successfully reset a workshop. Closing.

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    25/Mar/10