mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
MDL-11511, revert the changes, see tracker
This commit is contained in:
parent
73b36bca84
commit
046dd7dcf6
5 changed files with 7 additions and 58 deletions
|
@ -305,18 +305,7 @@
|
|||
|
||||
/// Delete any requested records
|
||||
|
||||
if ($delete){
|
||||
|
||||
if (!confirm_sesskey()) {
|
||||
print_error('confirmsesskeybad', 'error');
|
||||
}
|
||||
|
||||
if(data_isowner($delete)){
|
||||
require_capability('mod/data:deleteownentries', $context);
|
||||
}else{
|
||||
require_capability('mod/data:manageentries', $context);
|
||||
}
|
||||
|
||||
if ($delete && confirm_sesskey() && (has_capability('mod/data:manageentries', $context) or data_isowner($delete))) {
|
||||
if ($confirm = optional_param('confirm',0,PARAM_INT)) {
|
||||
if ($deleterecord = get_record('data_records', 'id', $delete)) { // Need to check this is valid
|
||||
if ($deleterecord->dataid == $data->id) { // Must be from this database
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue