Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-5130

backup and restore to new course doesn't populate settings in navbuttons db table



    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.6.2
    • Fix Version/s: None
    • Component/s: Block: Navbuttons
    • Labels:
    • Plugin Version:
    • Affected Branches:


      First some praise; we really like your navigation buttons block! It really solved a problem for us. Thanks!!

      Now, our issue
      We're on Moodle 2.6.2+ and I'm seeing an issue where we backup a course and then restore it into a new course and the instance_create() function doesn't appear to be firing. I say this because debug logging I put into the function doesn't get called when I perform the restore AND because there are no settings returned when I run 'select * from mdl_navbuttons where course=NEWIDNUM;' on our database for the newly restored course.

      The fix appears to be editing the navbuttons and clicking save which forces a write to the database. However, this isn't scalable as we have master courses that we create and then clone many times for use by our students.

      One hack that I'm investigating is to put a check to see if settings exists in the get_content() function and to create default DB entries if they don't exist, but, this is obviously a hack

      Any thoughts on this one? Anyone else having this issue? I've also tested and reproduced this in Moodle 2.5.2+.

      steps to reproduce:
      1. create course shell
      2. add navbuttons block
      3. configure navbuttons block for this shell
      4. validate navigation buttons appear and work as expected
      5. verify db entries 'select * from mdl_navbuttons where course=IDNUM;'
      6. backup shell
      7. restore shell to new course
      8. enter new shell
      9. attempt to use navigation buttons and see that they're not properly there
      10. look for db entries 'select * from mdl_navbuttons where course=NEWIDNUM;' and see that they're not there




            • Assignee:
              davosmith Davo Smith
              bubba Mike Buchanon
              Component watchers:
              Davo Smith
            • Votes:
              1 Vote for this issue
              2 Start watching this issue


              • Created: