diff --git a/mod/wiki/pagelib.php b/mod/wiki/pagelib.php index 5ddbf76ebdf..3020e107f07 100644 --- a/mod/wiki/pagelib.php +++ b/mod/wiki/pagelib.php @@ -1943,16 +1943,10 @@ class page_wiki_deletecomment extends page_wiki { /** * Prints the comment deletion confirmation form - * - * @param page $page The page whose version will be restored - * @param int $versionid The version to be restored - * @param bool $confirm If false, shows a yes/no confirmation page. - * If true, restores the old version and redirects the user to the 'view' tab. */ private function printconfirmdelete() { global $OUTPUT; - $strdeletecheck = get_string('deletecommentcheck', 'wiki'); $strdeletecheckfull = get_string('deletecommentcheckfull', 'wiki'); //ask confirmation @@ -1960,18 +1954,7 @@ class page_wiki_deletecomment extends page_wiki { $deleteurl = new moodle_url('/mod/wiki/instancecomments.php', $optionsyes); $return = new moodle_url('/mod/wiki/comments.php', array('pageid'=>$this->page->id)); - echo $OUTPUT->container_start(); - echo html_writer::tag('p', $strdeletecheckfull); - echo $OUTPUT->container_start(false, 'wiki_deletecommentform'); - echo '
'; - echo '
'; - echo '
'; - echo '
'; - echo '
'; - echo '
'; - echo $OUTPUT->container_end(); - echo $OUTPUT->container_end(); + echo $OUTPUT->confirm($strdeletecheckfull, $deleteurl, $return); } } diff --git a/mod/wiki/tests/behat/wiki_comments.feature b/mod/wiki/tests/behat/wiki_comments.feature index 2f397512cd5..310dabb4d97 100644 --- a/mod/wiki/tests/behat/wiki_comments.feature +++ b/mod/wiki/tests/behat/wiki_comments.feature @@ -49,7 +49,7 @@ Feature: Users can comment on wiki pages And "Edit" "link" should exist in the "wiki-comments" "table" And "Delete" "link" should exist in the "wiki-comments" "table" And I click on "Delete" "link" in the "wiki-comments" "table" - And I press "Yes" + And I press "Continue" And I should not see "student 1 updated comment" @javascript