Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5, 2.6
    • Fix Version/s: 2.5.1
    • Component/s: Backup, Course
    • Labels:
    • Testing Instructions:
      Hide
      1. Change settings for the front page so all courses and categories list and category combo are all displayed
      2. Create a course backup
      3. Restore course as another course
      4. Make sure courses list and categories list on the front page are updated immediately
      5. Restore course by merging with existing, during restore rename course (don't forget to select "overwrite configuration")
      6. Make sure courses list on the front page is updated immediately
      7. Hide one course
      8. In another window login as student
      9. In first window restore course by merging with existing hidden (don't forget to select "overwrite configuration"). Course should become visible after that
      10. Make sure courses list and categories list on the front page are updated immediately
      11. In student's window make sure the lists are correct too.
      Show
      Change settings for the front page so all courses and categories list and category combo are all displayed Create a course backup Restore course as another course Make sure courses list and categories list on the front page are updated immediately Restore course by merging with existing, during restore rename course (don't forget to select "overwrite configuration") Make sure courses list on the front page is updated immediately Hide one course In another window login as student In first window restore course by merging with existing hidden (don't forget to select "overwrite configuration"). Course should become visible after that Make sure courses list and categories list on the front page are updated immediately In student's window make sure the lists are correct too.
    • Affected Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull Master Branch:
      wip-MDL-38773-master

      Description

      Course list cache (helps browsing categories) is purged already when any course is added or updated through form or web services. But when course is created or updated as a result of restore, neither create_course() nor update_course() functions is called and course list cache is not purged.

      This is not a huge problem because course list cache has lifetime of 10 minutes anyway.

      To purge caches we only need to call

      cache_helper::purge_by_event('changesincourse');
      

      the only problem is to find where to insert it

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            salvetore Michael de Raadt added a comment -

            I'm not sure if you want to be assigned to this, Marina, as you didn't assign yourself. I've assigned Dan as Course maintainer.

            Show
            salvetore Michael de Raadt added a comment - I'm not sure if you want to be assigned to this, Marina, as you didn't assign yourself. I've assigned Dan as Course maintainer.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Hi Marina, while adding those resets after each insert/update/set_fieldxxx operation looks ok, I'm guessing if it won't have more sense to add it properly to restore_final_task, as an "formal" execution step instead.

            There, we have already the "restore_rebuild_course_cache" step. perhaps we can add the caches purging there, together with the modinfo/sectioninfo stuff. IMO that way we are proceeding to cleanup those caches within the execution of the restore and not based on some helper/ui flow.

            Same final effect, but from the "corpus" of restore. I think it's better and will help to find a common place where any other cache can be invalidated in the future.

            Ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Hi Marina, while adding those resets after each insert/update/set_fieldxxx operation looks ok, I'm guessing if it won't have more sense to add it properly to restore_final_task, as an "formal" execution step instead. There, we have already the "restore_rebuild_course_cache" step. perhaps we can add the caches purging there, together with the modinfo/sectioninfo stuff. IMO that way we are proceeding to cleanup those caches within the execution of the restore and not based on some helper/ui flow. Same final effect, but from the "corpus" of restore. I think it's better and will help to find a common place where any other cache can be invalidated in the future. Ciao
            Hide
            cibot CiBoT added a comment -

            Moving this reopened issue out from current integration. Please, re-submit it for integration once ready.

            Show
            cibot CiBoT added a comment - Moving this reopened issue out from current integration. Please, re-submit it for integration once ready.
            Hide
            marina Marina Glancy added a comment -

            corrected. Thanks Eloy, the backup/restore code is still very complicated for me
            Can I still make it in this integration cycle? I'm only 6 minutes late...

            Show
            marina Marina Glancy added a comment - corrected. Thanks Eloy, the backup/restore code is still very complicated for me Can I still make it in this integration cycle? I'm only 6 minutes late...
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Integrated (25 & master), thanks!

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Integrated (25 & master), thanks!
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            And passed, tried as student, not logged-in. And the information in the combos was updated properly all with all the combinations.

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - And passed, tried as student, not logged-in. And the information in the combos was updated properly all with all the combinations.
            Hide
            poltawski Dan Poltawski added a comment -

            Feature: Thanks to our superb contributors
              In order to make Moodle better
              As an integrator
              I need to thank all our contributors
             
              Scenario: Dan thanks you all
                Given I log in as "dan"
                And I see "lots of fixed issues"
                When I follow "Close integrated issues"
                Then I should see "Lots of thanks to all our contributors"
            

            Your changes are upstream

            Show
            poltawski Dan Poltawski added a comment - Feature: Thanks to our superb contributors In order to make Moodle better As an integrator I need to thank all our contributors   Scenario: Dan thanks you all Given I log in as "dan" And I see "lots of fixed issues" When I follow "Close integrated issues" Then I should see "Lots of thanks to all our contributors" Your changes are upstream

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  8/Jul/13