mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
Removed tabs
This commit is contained in:
parent
bee7ee3815
commit
dabfd0ed85
67 changed files with 8204 additions and 8204 deletions
|
@ -26,11 +26,11 @@
|
|||
}
|
||||
|
||||
require_login($course->id);
|
||||
|
||||
$cm = data_get_cm($data);
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
|
||||
if ($commentid) {
|
||||
$cm = data_get_cm($data);
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
|
||||
if ($commentid) {
|
||||
if (! $comment = get_record('data_comments', 'id', $commentid)) {
|
||||
error('Comment ID is misconfigured');
|
||||
}
|
||||
|
|
|
@ -65,8 +65,8 @@
|
|||
|
||||
require_course_login($course, true, $cm);
|
||||
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
has_capability('mod/data:managetemplates', $context->id, true);
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
has_capability('mod/data:managetemplates', $context->id, true);
|
||||
|
||||
|
||||
if (!isteacheredit($course->id)){
|
||||
|
|
|
@ -57,8 +57,8 @@
|
|||
}
|
||||
}
|
||||
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
has_capability('mod/data:uploadentries', $context->id, true);
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
has_capability('mod/data:uploadentries', $context->id, true);
|
||||
|
||||
if (has_capability('mod/data:managetemplates', $context->id)) {
|
||||
if (!count_records('data_fields','dataid',$data->id)) { // Brand new database!
|
||||
|
|
|
@ -557,7 +557,7 @@ function data_add_record($data, $groupid=0){
|
|||
$record->groupid = $groupid;
|
||||
$record->timecreated = $record->timemodified = time();
|
||||
if (has_capability('mod/data:approve', $context->id)) {
|
||||
//if (isteacher($data->course)) {
|
||||
//if (isteacher($data->course)) {
|
||||
$record->approved = 1;
|
||||
} else {
|
||||
$record->approved = 0;
|
||||
|
@ -839,8 +839,8 @@ function data_get_coursemodule_info($coursemodule) {
|
|||
function data_print_template($template, $records, $data, $search='',$page=0, $return=false) {
|
||||
global $CFG;
|
||||
|
||||
$cm = data_get_cm($data);
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
$cm = data_get_cm($data);
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
|
||||
static $fields = NULL;
|
||||
static $isteacher;
|
||||
|
@ -991,9 +991,9 @@ function data_print_preference_form($data, $perpage, $search, $sort='', $order='
|
|||
function data_print_ratings($data, $record) {
|
||||
global $USER;
|
||||
|
||||
$cm = data_get_cm($data);
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
|
||||
$cm = data_get_cm($data);
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
|
||||
$ratingsmenuused = false;
|
||||
if ($data->ratings and !empty($USER->id)) {
|
||||
if ($ratings->scale = make_grades_menu($data->scale)) {
|
||||
|
@ -1165,10 +1165,10 @@ function data_print_comment($data, $comment, $page=0) {
|
|||
|
||||
global $USER, $CFG;
|
||||
|
||||
$cm = data_get_cm($data);
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
$cm = data_get_cm($data);
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
|
||||
$stredit = get_string('edit');
|
||||
$stredit = get_string('edit');
|
||||
$strdelete = get_string('delete');
|
||||
|
||||
$user = get_record('user','id',$comment->userid);
|
||||
|
@ -1254,13 +1254,13 @@ function data_convert_arrays_to_strings(&$fieldinput) {
|
|||
|
||||
// returns the $cm given $data
|
||||
function data_get_cm($data) {
|
||||
global $CFG, $course;
|
||||
$datamod = get_record('modules', 'name', 'data');
|
||||
$SQL = "select * from {$CFG->prefix}course_modules
|
||||
where course = $course->id and
|
||||
module = $datamod->id and
|
||||
instance = $data->id";
|
||||
return get_record_sql($SQL);
|
||||
global $CFG, $course;
|
||||
$datamod = get_record('modules', 'name', 'data');
|
||||
$SQL = "select * from {$CFG->prefix}course_modules
|
||||
where course = $course->id and
|
||||
module = $datamod->id and
|
||||
instance = $data->id";
|
||||
return get_record_sql($SQL);
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -92,11 +92,11 @@ function data_restore_mods($mod,$restore) {
|
|||
$mod->id, $newid);
|
||||
//Now check if want to restore user data and do it.
|
||||
if (function_exists('restore_userdata_selected')) {
|
||||
// Moodle 1.6
|
||||
$restore_userdata_selected = restore_userdata_selected($restore, 'data', $mod->id);
|
||||
// Moodle 1.6
|
||||
$restore_userdata_selected = restore_userdata_selected($restore, 'data', $mod->id);
|
||||
} else {
|
||||
// Moodle 1.5
|
||||
$restore_userdata_selected = $restore->mods['data']->userinfo;
|
||||
$restore_userdata_selected = $restore->mods['data']->userinfo;
|
||||
}
|
||||
if ($restore_userdata_selected) {
|
||||
//Restore data_fields first!!! need to hold an array of [oldid]=>newid due to double dependencies
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
}
|
||||
|
||||
$cm = data_get_cm($data);
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
|
||||
$inactive = NULL;
|
||||
$row = array();
|
||||
|
@ -46,7 +46,7 @@
|
|||
//if (isloggedin() and !isguest()) {
|
||||
if (isloggedin()) {
|
||||
if (has_capability('mod/data:writeentry', $context->id)) { // took out participation list here!
|
||||
$addstring = empty($editentry) ? get_string('add', 'data') : get_string('editentry', 'data');
|
||||
$addstring = empty($editentry) ? get_string('add', 'data') : get_string('editentry', 'data');
|
||||
$row[] = new tabobject('add', $CFG->wwwroot.'/mod/data/edit.php?d='.$data->id, $addstring, '', true);
|
||||
}
|
||||
if (has_capability('mod/data:managetemplates', $context->id)) {
|
||||
|
|
|
@ -56,9 +56,9 @@
|
|||
}
|
||||
|
||||
require_course_login($course, true, $cm);
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
has_capability('mod/data:managetemplates', $context->id, true);
|
||||
/*
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
has_capability('mod/data:managetemplates', $context->id, true);
|
||||
/*
|
||||
if (!isteacheredit($course->id)){
|
||||
error(get_string('noaccess','data'));
|
||||
}
|
||||
|
|
|
@ -82,9 +82,9 @@
|
|||
}
|
||||
|
||||
require_course_login($course, true, $cm);
|
||||
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
has_capability('mod/data:readentry', $context->id, true);
|
||||
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
has_capability('mod/data:readentry', $context->id, true);
|
||||
|
||||
/// If it's hidden then it's don't show anything. :)
|
||||
if (empty($cm->visible) and !has_capability('mod/data:managetemplates', $context->id)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue