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:
+6
-3
@@ -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>';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user