mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
MDL-15114 resource mod converted
This commit is contained in:
parent
1b81b0a412
commit
5f5cd33c1d
6 changed files with 61 additions and 71 deletions
|
@ -45,9 +45,9 @@
|
|||
$inpopup = optional_param ('inpopup', 0, PARAM_BOOL);
|
||||
|
||||
/// Fetch some records from DB
|
||||
$course = get_record ('course', 'id', $courseid);
|
||||
$course = $DB->get_record ('course', array('id'=>$courseid));
|
||||
$cm = get_coursemodule_from_id('resource', $cmid);
|
||||
$resource = get_record ('resource', 'id', $cm->instance);
|
||||
$resource = $DB->get_record ('resource', array('id'=>$cm->instance));
|
||||
|
||||
/// Get some needed strings
|
||||
$strdeploy = get_string('deploy','resource');
|
||||
|
@ -73,9 +73,9 @@
|
|||
|
||||
/// Security Constraints (sesskey and isteacheredit)
|
||||
if (!confirm_sesskey()) {
|
||||
error(get_string('confirmsesskeybad', 'error'));
|
||||
print_error('confirmsesskeybad', 'error');
|
||||
} else if (!has_capability('moodle/course:manageactivities', get_context_instance(CONTEXT_COURSE, $courseid))) {
|
||||
error(get_string('onlyeditingteachers', 'error'));
|
||||
print_error('onlyeditingteachers', 'error');
|
||||
}
|
||||
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue