MDL-26854 COMMENT

1. added pluginname_comment_validate callback to comments api
2. change permission callback defaults to false
3. Tidied up serveal areas of comments and implemented callback to
ignore system permissions for view (credits to Sam Hemelryk)

AMOS BEGIN
    MOV [modulerejectcomment,error],[callbackrejectcomment,error]
AMOS END
This commit is contained in:
Dongsheng Cai
2011-05-04 17:23:46 +08:00
parent b8df9414bd
commit c1951ea953
16 changed files with 924 additions and 275 deletions
+6 -3
View File
@@ -20,7 +20,7 @@
*/
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once('locallib.php');
require_once($CFG->dirroot.'/comment/locallib.php');
require_login();
admin_externalpage_setup('comments', '', null, '', array('pagelayout'=>'report'));
@@ -81,8 +81,11 @@ if (!empty($err)) {
}
if (empty($action)) {
echo '<form method="post">';
$manager->print_comments($page);
echo '<input type="submit" id="comments_delete" name="batchdelete" value="'.get_string('delete').'" />';
$return = $manager->print_comments($page);
// if no comments available, $return will be false
if ($return) {
echo '<input type="submit" id="comments_delete" name="batchdelete" value="'.get_string('delete').'" />';
}
echo '</form>';
}