MDL-52054 forum: Prevent error when clicking move without a destination
This commit is contained in:
@@ -325,7 +325,7 @@ if ($forum->type != 'single'
|
||||
if (!empty($forummenu)) {
|
||||
echo '<div class="movediscussionoption">';
|
||||
$select = new url_select($forummenu, '',
|
||||
array(''=>get_string("movethisdiscussionto", "forum")),
|
||||
array('/mod/forum/discuss.php?d=' . $discussion->id => get_string("movethisdiscussionto", "forum")),
|
||||
'forummenu', get_string('move'));
|
||||
echo $OUTPUT->render($select);
|
||||
echo "</div>";
|
||||
|
||||
@@ -37,3 +37,5 @@ Feature: A teacher can move discussions between forums
|
||||
When I set the field "jump" to "Test forum 2"
|
||||
And I press "Move"
|
||||
Then I should see "This discussion has been moved to 'Test forum 2'."
|
||||
And I press "Move"
|
||||
And I should see "Discussion 1"
|
||||
|
||||
Reference in New Issue
Block a user