Moodle
  1. Moodle
  2. MDL-34215

Use original course's teacher name when restoring questions

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: 2.3
    • Fix Version/s: None
    • Component/s: Backup, Questions
    • Labels:
      None
    • Affected Branches:
      MOODLE_23_STABLE
    • Rank:
      42554

      Description

      Restore question from Moodle 19 backup to Moodle 2+ question bank should use original course's teacher name instead of current (doing the restore) user's name for question's creator's name.

        Activity

        Hide
        Tim Hunt added a comment -

        Well, restoring from 1.9 to 2.2 does not restore any user data, which means that it makes no attempt to match up user ids in the backup file with user ids on the system where the restore is happening.

        Therefore, there is no way to make it work like you want, and the only way to change this is all the work required to enable restore of 1.9 backups with user data into 2.x. That is up to Moodle.org, so I am re-assigning this.

        (Note that the 1.9 restore code correctly processes the userids in the file, in moodle1_question_bank_handler::process_question in backup/converter/moodle1/handlerlib.php. Any time you do a 2.x -> 2.x restore without user data, all the question get re-attributed to the user doing the restore. See restore_create_categories_and_questions::process_question in backup/moodle2/restore_stepslib.php.

        Show
        Tim Hunt added a comment - Well, restoring from 1.9 to 2.2 does not restore any user data, which means that it makes no attempt to match up user ids in the backup file with user ids on the system where the restore is happening. Therefore, there is no way to make it work like you want, and the only way to change this is all the work required to enable restore of 1.9 backups with user data into 2.x. That is up to Moodle.org, so I am re-assigning this. (Note that the 1.9 restore code correctly processes the userids in the file, in moodle1_question_bank_handler::process_question in backup/converter/moodle1/handlerlib.php. Any time you do a 2.x -> 2.x restore without user data, all the question get re-attributed to the user doing the restore. See restore_create_categories_and_questions::process_question in backup/moodle2/restore_stepslib.php.
        Hide
        Nadav Kavalerchik added a comment -

        Thanks you Tim, for your detailed response!

        It came up as an issue while i was restoring a course with (for) one of our teachers which was very sensitive to the fact that my name is displayed on the questions she worked very hard to put together.
        I guess, if she was logged in and was doing the restore... her name was attributed to the question creator name. and the whole issue would never come up.

        Again, thanks!

        Show
        Nadav Kavalerchik added a comment - Thanks you Tim, for your detailed response! It came up as an issue while i was restoring a course with (for) one of our teachers which was very sensitive to the fact that my name is displayed on the questions she worked very hard to put together. I guess, if she was logged in and was doing the restore... her name was attributed to the question creator name. and the whole issue would never come up. Again, thanks!
        Hide
        Tim Hunt added a comment -

        Yes, or you could login-as that teacher when you do the restore for her. That would probably work.

        Anyway, since this is working by design, I am going to close this won't fix.

        Show
        Tim Hunt added a comment - Yes, or you could login-as that teacher when you do the restore for her. That would probably work. Anyway, since this is working by design, I am going to close this won't fix.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: