MDL-52054 forum: Prevent error when clicking move without a destination

This commit is contained in:
John Okely
2015-11-10 16:43:19 +08:00
parent d7f95392ac
commit 616dd1b594
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -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"