Skip to content

Commit

Permalink
MDL-64332 questions: idnumber should not prevent easy duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
timhunt committed Dec 6, 2018
1 parent cb7f6a6 commit d6388d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions question/question.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
if ($makecopy) {
// If we are duplicating a question, add some indication to the question name.
$question->name = get_string('questionnamecopy', 'question', $question->name);
$question->idnumber = null;
$question->beingcopied = true;
}

Expand Down
4 changes: 2 additions & 2 deletions question/tests/behat/copy_questions.feature
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ Feature: A teacher can duplicate questions in the question bank
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist:
| questioncategory | qtype | name | questiontext |
| Test questions | essay | Test question to be copied | Write about whatever you want |
| questioncategory | qtype | name | questiontext | idnumber |
| Test questions | essay | Test question to be copied | Write about whatever you want | qid |
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Question bank > Questions" in current page administration
Expand Down

0 comments on commit d6388d0

Please sign in to comment.