Merge branch 'MDL-50049-master' of git://github.com/ankitagarwal/moodle
This commit is contained in:
@@ -53,7 +53,7 @@ function tool_generator_pluginfile($course, $cm, $context, $filearea, $args, $fo
|
||||
$file = $fs->get_file($context->id, 'tool_generator', $filearea, $args[0], '/', $args[1]);
|
||||
|
||||
// Send the file, always forcing download, we don't want options.
|
||||
session_get_instance()->write_close();
|
||||
\core\session\manager::write_close();
|
||||
send_stored_file($file, 0, 0, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ navigation_node::override_active_url(new moodle_url('/admin/tool/phpunit/index.p
|
||||
admin_externalpage_setup('toolphpunitwebrunner');
|
||||
|
||||
if (!$CFG->debugdeveloper) {
|
||||
error('Not available on production sites, sorry.');
|
||||
print_error('notlocalisederrormessage', 'error', '', null, 'Not available on production sites, sorry.');
|
||||
}
|
||||
|
||||
core_php_time_limit::raise(60*30);
|
||||
|
||||
+3
-3
@@ -2174,8 +2174,8 @@ class calendar_event {
|
||||
* Pass in a object containing the event properties and this function will
|
||||
* insert it into the database and deal with any associated files
|
||||
*
|
||||
* @see add_event()
|
||||
* @see update_event()
|
||||
* @see self::create()
|
||||
* @see self::update()
|
||||
*
|
||||
* @param stdClass $data object of event
|
||||
* @param bool $checkcapability if moodle should check calendar managing capability or not
|
||||
@@ -2391,7 +2391,7 @@ class calendar_event {
|
||||
* This function deletes an event, any associated events if $deleterepeated=true,
|
||||
* and cleans up any files associated with the events.
|
||||
*
|
||||
* @see delete_event()
|
||||
* @see self::delete()
|
||||
*
|
||||
* @param bool $deleterepeated delete event repeatedly
|
||||
* @return bool succession of deleting event
|
||||
|
||||
@@ -343,95 +343,6 @@ class core_cohort_cohortlib_testcase extends advanced_testcase {
|
||||
$this->assertTrue(cohort_is_member($cohort->id, $user->id));
|
||||
}
|
||||
|
||||
public function test_cohort_get_visible_list() {
|
||||
global $DB;
|
||||
|
||||
$this->resetAfterTest();
|
||||
|
||||
$category1 = $this->getDataGenerator()->create_category();
|
||||
$category2 = $this->getDataGenerator()->create_category();
|
||||
|
||||
$course1 = $this->getDataGenerator()->create_course(array('category'=>$category1->id));
|
||||
$course2 = $this->getDataGenerator()->create_course(array('category'=>$category2->id));
|
||||
$course3 = $this->getDataGenerator()->create_course();
|
||||
|
||||
$cohort1 = $this->getDataGenerator()->create_cohort(array('contextid'=>context_coursecat::instance($category1->id)->id));
|
||||
$cohort2 = $this->getDataGenerator()->create_cohort(array('contextid'=>context_coursecat::instance($category2->id)->id));
|
||||
$cohort3 = $this->getDataGenerator()->create_cohort(array('contextid'=>context_system::instance()->id));
|
||||
$cohort4 = $this->getDataGenerator()->create_cohort(array('contextid'=>context_system::instance()->id));
|
||||
|
||||
$user1 = $this->getDataGenerator()->create_user();
|
||||
$user2 = $this->getDataGenerator()->create_user();
|
||||
$user3 = $this->getDataGenerator()->create_user();
|
||||
$user4 = $this->getDataGenerator()->create_user();
|
||||
$user5 = $this->getDataGenerator()->create_user();
|
||||
|
||||
$manualenrol = enrol_get_plugin('manual');
|
||||
$enrol1 = $DB->get_record('enrol', array('courseid'=>$course1->id, 'enrol'=>'manual'));
|
||||
$enrol2 = $DB->get_record('enrol', array('courseid'=>$course2->id, 'enrol'=>'manual'));
|
||||
|
||||
$manualenrol->enrol_user($enrol1, $user1->id);
|
||||
$manualenrol->enrol_user($enrol1, $user3->id);
|
||||
$manualenrol->enrol_user($enrol1, $user4->id);
|
||||
$manualenrol->enrol_user($enrol2, $user2->id);
|
||||
|
||||
cohort_add_member($cohort1->id, $user1->id);
|
||||
cohort_add_member($cohort3->id, $user1->id);
|
||||
cohort_add_member($cohort1->id, $user3->id);
|
||||
cohort_add_member($cohort2->id, $user2->id);
|
||||
|
||||
// Cohort1 (Cat1) has 2 users total, 2 user enrolled in course1, 0 users enrolled in course2.
|
||||
// Cohort2 (Cat2) has 1 users total, 0 user enrolled in course1, 1 users enrolled in course2.
|
||||
// Cohort3 (Syst) has 1 users total, 1 user enrolled in course1, 0 users enrolled in course2.
|
||||
// Cohort4 (Syst) has 0 users total.
|
||||
|
||||
$list = cohort_get_visible_list($course1);
|
||||
$this->assertDebuggingCalled();
|
||||
$this->assertEquals(2, count($list));
|
||||
$this->assertNotEmpty($list[$cohort1->id]);
|
||||
$this->assertRegExp('/\(2\)$/', $list[$cohort1->id]);
|
||||
$this->assertNotEmpty($list[$cohort3->id]);
|
||||
$this->assertRegExp('/\(1\)$/', $list[$cohort3->id]);
|
||||
|
||||
$list = cohort_get_visible_list($course1, false);
|
||||
$this->assertDebuggingCalled();
|
||||
$this->assertEquals(3, count($list));
|
||||
$this->assertNotEmpty($list[$cohort1->id]);
|
||||
$this->assertRegExp('/\(2\)$/', $list[$cohort1->id]);
|
||||
$this->assertNotEmpty($list[$cohort3->id]);
|
||||
$this->assertRegExp('/\(1\)$/', $list[$cohort3->id]);
|
||||
$this->assertNotEmpty($list[$cohort4->id]);
|
||||
$this->assertRegExp('/[^\)]$/', $list[$cohort4->id]);
|
||||
|
||||
$list = cohort_get_visible_list($course2);
|
||||
$this->assertDebuggingCalled();
|
||||
$this->assertEquals(1, count($list));
|
||||
$this->assertNotEmpty($list[$cohort2->id]);
|
||||
$this->assertRegExp('/\(1\)$/', $list[$cohort2->id]);
|
||||
|
||||
$list = cohort_get_visible_list($course2, false);
|
||||
$this->assertDebuggingCalled();
|
||||
$this->assertEquals(3, count($list));
|
||||
$this->assertNotEmpty($list[$cohort2->id]);
|
||||
$this->assertRegExp('/\(1\)$/', $list[$cohort2->id]);
|
||||
$this->assertNotEmpty($list[$cohort3->id]);
|
||||
$this->assertRegExp('/[^\)]$/', $list[$cohort3->id]);
|
||||
$this->assertNotEmpty($list[$cohort4->id]);
|
||||
$this->assertRegExp('/[^\)]$/', $list[$cohort4->id]);
|
||||
|
||||
$list = cohort_get_visible_list($course3);
|
||||
$this->assertDebuggingCalled();
|
||||
$this->assertEquals(0, count($list));
|
||||
|
||||
$list = cohort_get_visible_list($course3, false);
|
||||
$this->assertDebuggingCalled();
|
||||
$this->assertEquals(2, count($list));
|
||||
$this->assertNotEmpty($list[$cohort3->id]);
|
||||
$this->assertRegExp('/[^\)]$/', $list[$cohort3->id]);
|
||||
$this->assertNotEmpty($list[$cohort4->id]);
|
||||
$this->assertRegExp('/[^\)]$/', $list[$cohort4->id]);
|
||||
}
|
||||
|
||||
public function test_cohort_get_cohorts() {
|
||||
global $DB;
|
||||
|
||||
|
||||
@@ -168,7 +168,7 @@ abstract class completion_criteria extends data_object {
|
||||
global $CFG, $COMPLETION_CRITERIA_TYPES;
|
||||
|
||||
if (!isset($params['criteriatype']) || !isset($COMPLETION_CRITERIA_TYPES[$params['criteriatype']])) {
|
||||
error('invalidcriteriatype', 'completion');
|
||||
print_error('invalidcriteriatype', 'completion');
|
||||
}
|
||||
|
||||
$class = 'completion_criteria_'.$COMPLETION_CRITERIA_TYPES[$params['criteriatype']];
|
||||
|
||||
@@ -861,7 +861,7 @@ class grade_edit_tree_column_select extends grade_edit_tree_column {
|
||||
|
||||
public function get_item_cell($item, $params) {
|
||||
if (empty($params['itemtype']) || empty($params['eid'])) {
|
||||
error('Array key (itemtype or eid) missing from 2nd param of grade_edit_tree_column_select::get_item_cell($item, $params)');
|
||||
print_error('missingitemtypeoreid', 'core_grades');
|
||||
}
|
||||
$itemcell = parent::get_item_cell($item, $params);
|
||||
|
||||
|
||||
@@ -466,6 +466,7 @@ $string['minmaxupgradefixbutton'] = 'Resolve inconsistencies';
|
||||
$string['minmaxupgradewarning'] = 'Note: An inconsistency has been detected with some grades due to a change in the minimum and maximum grades used when calculating the grade displayed in the gradebook. It is recommended that the inconsistency is resolved by clicking the button below, though this will result in some grades being changed.';
|
||||
$string['minimum_show'] = 'Show minimum grade';
|
||||
$string['minimum_show_help'] = 'Minimum grade is used in calculating grades and weights. If not shown, minimum grade will default to zero and cannot be edited.';
|
||||
$string['missingitemtypeoreid'] = 'Array key (itemtype or eid) missing from 2nd param of grade_edit_tree_column_select::get_item_cell($item, $params)';
|
||||
$string['missingscale'] = 'Scale must be selected';
|
||||
$string['mode'] = 'Mode';
|
||||
$string['modgradeerrorbadpoint'] = 'Invalid Grade Value. This must be an integer between 0 and {$a}';
|
||||
|
||||
+431
-2436
File diff suppressed because it is too large
Load Diff
@@ -68,7 +68,7 @@ class SimplePie_Enclosure
|
||||
|
||||
/**
|
||||
* @var array
|
||||
* @see get_categories()
|
||||
* @see coursecat::get_children()
|
||||
*/
|
||||
var $categories;
|
||||
|
||||
|
||||
@@ -2872,154 +2872,19 @@ class core_accesslib_testcase extends advanced_testcase {
|
||||
// Note: watch out, the fake site might be pretty borked already.
|
||||
|
||||
$this->assertEquals(get_system_context(), context_system::instance());
|
||||
$this->assertDebuggingCalled('get_system_context() is deprecated, please use context_system::instance() instead.', DEBUG_DEVELOPER);
|
||||
|
||||
foreach ($DB->get_records('context') as $contextid => $record) {
|
||||
$context = context::instance_by_id($contextid);
|
||||
$this->assertEquals($context, get_context_instance($record->contextlevel, $record->instanceid));
|
||||
$this->assertEquals($context->get_parent_context_ids(), get_parent_contexts($context));
|
||||
if ($context->id == SYSCONTEXTID) {
|
||||
$this->assertFalse(get_parent_contextid($context));
|
||||
} else {
|
||||
$this->assertSame($context->get_parent_context()->id, get_parent_contextid($context));
|
||||
}
|
||||
$this->assertDebuggingCalled('get_context_instance() is deprecated, please use context_xxxx::instance() instead.', DEBUG_DEVELOPER);
|
||||
}
|
||||
|
||||
$children = get_child_contexts($systemcontext);
|
||||
// Using assertEquals here as assertSame fails for some reason...
|
||||
$this->assertEquals($children, $systemcontext->get_child_contexts());
|
||||
$this->assertEquals(count($children), $DB->count_records('context')-1);
|
||||
$this->resetDebugging();
|
||||
unset($children);
|
||||
|
||||
// Make sure a debugging is thrown.
|
||||
get_context_instance($record->contextlevel, $record->instanceid);
|
||||
$this->assertDebuggingCalled('get_context_instance() is deprecated, please use context_xxxx::instance() instead.', DEBUG_DEVELOPER);
|
||||
get_system_context();
|
||||
$this->assertDebuggingCalled('get_system_context() is deprecated, please use context_system::instance() instead.', DEBUG_DEVELOPER);
|
||||
get_parent_contexts($context);
|
||||
$this->assertDebuggingCalled('get_parent_contexts() is deprecated, please use $context->get_parent_context_ids() instead.', DEBUG_DEVELOPER);
|
||||
get_parent_contextid($context);
|
||||
$this->assertDebuggingCalled('get_parent_contextid() is deprecated, please use $context->get_parent_context() instead.', DEBUG_DEVELOPER);
|
||||
get_child_contexts($frontpagecontext);
|
||||
$this->assertDebuggingCalled('get_child_contexts() is deprecated, please use $context->get_child_contexts() instead.', DEBUG_DEVELOPER);
|
||||
|
||||
$DB->delete_records('context', array('contextlevel'=>CONTEXT_BLOCK));
|
||||
create_contexts();
|
||||
$this->assertDebuggingCalled('create_contexts() is deprecated, please use context_helper::create_instances() instead.', DEBUG_DEVELOPER);
|
||||
$this->assertFalse($DB->record_exists('context', array('contextlevel'=>CONTEXT_BLOCK)));
|
||||
|
||||
$DB->set_field('context', 'depth', 0, array('contextlevel'=>CONTEXT_BLOCK));
|
||||
build_context_path();
|
||||
$this->assertDebuggingCalled('build_context_path() is deprecated, please use context_helper::build_all_paths() instead.', DEBUG_DEVELOPER);
|
||||
$this->assertFalse($DB->record_exists('context', array('depth'=>0)));
|
||||
|
||||
$lastcourse = $DB->get_field_sql("SELECT MAX(id) FROM {course}");
|
||||
$DB->delete_records('course', array('id'=>$lastcourse));
|
||||
$lastcategory = $DB->get_field_sql("SELECT MAX(id) FROM {course_categories}");
|
||||
$DB->delete_records('course_categories', array('id'=>$lastcategory));
|
||||
$lastuser = $DB->get_field_sql("SELECT MAX(id) FROM {user} WHERE deleted=0");
|
||||
$DB->delete_records('user', array('id'=>$lastuser));
|
||||
$DB->delete_records('block_instances', array('parentcontextid'=>$frontpagepagecontext->id));
|
||||
$DB->delete_records('course_modules', array('id'=>$frontpagepagecontext->instanceid));
|
||||
cleanup_contexts();
|
||||
$this->assertDebuggingCalled('cleanup_contexts() is deprecated, please use context_helper::cleanup_instances() instead.', DEBUG_DEVELOPER);
|
||||
$count = 1; // System.
|
||||
$count += $DB->count_records('user', array('deleted'=>0));
|
||||
$count += $DB->count_records('course_categories');
|
||||
$count += $DB->count_records('course');
|
||||
$count += $DB->count_records('course_modules');
|
||||
$count += $DB->count_records('block_instances');
|
||||
$this->assertEquals($count, $DB->count_records('context'));
|
||||
|
||||
// Test legacy rebuild_contexts().
|
||||
$context = context_course::instance($testcourses[2]);
|
||||
rebuild_contexts(array($context));
|
||||
$this->assertDebuggingCalled('rebuild_contexts() is deprecated, please use $context->reset_paths(true) instead.', DEBUG_DEVELOPER);
|
||||
$context = context_course::instance($testcourses[2]);
|
||||
$this->assertSame($context->path, $DB->get_field('context', 'path', array('id' => $context->id)));
|
||||
$this->assertSame($context->depth, $DB->get_field('context', 'depth', array('id' => $context->id)));
|
||||
$this->assertEquals(0, $DB->count_records('context', array('depth' => 0)));
|
||||
$this->assertEquals(0, $DB->count_records('context', array('path' => null)));
|
||||
|
||||
context_helper::reset_caches();
|
||||
preload_course_contexts($SITE->id);
|
||||
$this->assertDebuggingCalled('preload_course_contexts() is deprecated, please use context_helper::preload_course() instead.', DEBUG_DEVELOPER);
|
||||
$this->assertEquals(1 + $DB->count_records('course_modules', array('course' => $SITE->id)),
|
||||
context_inspection::test_context_cache_size());
|
||||
|
||||
context_helper::reset_caches();
|
||||
list($select, $join) = context_instance_preload_sql('c.id', CONTEXT_COURSECAT, 'ctx');
|
||||
$this->assertDebuggingCalled('context_instance_preload_sql() is deprecated, please use context_helper::get_preload_record_columns_sql() instead.', DEBUG_DEVELOPER);
|
||||
$this->assertEquals(', ' . context_helper::get_preload_record_columns_sql('ctx'), $select);
|
||||
$this->assertEquals('LEFT JOIN {context} ctx ON (ctx.instanceid = c.id AND ctx.contextlevel = ' . CONTEXT_COURSECAT . ')', $join);
|
||||
$sql = "SELECT c.id $select FROM {course_categories} c $join";
|
||||
$records = $DB->get_records_sql($sql);
|
||||
foreach ($records as $record) {
|
||||
context_instance_preload($record);
|
||||
$this->assertDebuggingCalled('context_instance_preload() is deprecated, please use context_helper::preload_from_record() instead.',
|
||||
DEBUG_DEVELOPER);
|
||||
$record = (array)$record;
|
||||
$this->assertEquals(1, count($record)); // Only id left.
|
||||
}
|
||||
$this->assertEquals(count($records), context_inspection::test_context_cache_size());
|
||||
|
||||
accesslib_clear_all_caches(true);
|
||||
$DB->delete_records('cache_flags', array());
|
||||
mark_context_dirty($systemcontext->path);
|
||||
$this->assertDebuggingCalled('mark_context_dirty() is deprecated, please use $context->mark_dirty() instead.', DEBUG_DEVELOPER);
|
||||
$dirty = get_cache_flags('accesslib/dirtycontexts', time()-2);
|
||||
$this->assertTrue(isset($dirty[$systemcontext->path]));
|
||||
|
||||
accesslib_clear_all_caches(false);
|
||||
$DB->delete_records('cache_flags', array());
|
||||
$course = $DB->get_record('course', array('id'=>$testcourses[2]));
|
||||
$context = context_course::instance($course->id);
|
||||
$oldpath = $context->path;
|
||||
$miscid = $DB->get_field_sql("SELECT MIN(id) FROM {course_categories}");
|
||||
$categorycontext = context_coursecat::instance($miscid);
|
||||
$course->category = $miscid;
|
||||
$DB->update_record('course', $course);
|
||||
context_moved($context, $categorycontext);
|
||||
$this->assertDebuggingCalled('context_moved() is deprecated, please use context::update_moved() instead.', DEBUG_DEVELOPER);
|
||||
$context = context_course::instance($course->id);
|
||||
$this->assertEquals($categorycontext, $context->get_parent_context());
|
||||
|
||||
$this->assertTrue($DB->record_exists('context', array('contextlevel'=>CONTEXT_COURSE, 'instanceid'=>$testcourses[2])));
|
||||
delete_context(CONTEXT_COURSE, $testcourses[2]);
|
||||
$this->assertDebuggingCalled('delete_context() is deprecated, please use context_helper::delete_instance() instead.', DEBUG_DEVELOPER);
|
||||
$this->assertFalse($DB->record_exists('context', array('contextlevel'=>CONTEXT_COURSE, 'instanceid'=>$testcourses[2])));
|
||||
delete_context(CONTEXT_COURSE, $testcourses[2], false);
|
||||
$this->assertDebuggingCalled('delete_context() is deprecated, please use $context->delete_content() instead.', DEBUG_DEVELOPER);
|
||||
|
||||
$name = get_contextlevel_name(CONTEXT_COURSE);
|
||||
$this->assertDebuggingCalled('get_contextlevel_name() is deprecated, please use context_helper::get_level_name() instead.', DEBUG_DEVELOPER);
|
||||
$this->assertFalse(empty($name));
|
||||
|
||||
$context = context_course::instance($testcourses[2]);
|
||||
$name = print_context_name($context);
|
||||
$this->assertDebuggingCalled('print_context_name() is deprecated, please use $context->get_context_name() instead.', DEBUG_DEVELOPER);
|
||||
$this->assertFalse(empty($name));
|
||||
|
||||
$url1 = get_context_url($coursecontext);
|
||||
$this->assertDebuggingCalled('get_context_url() is deprecated, please use $context->get_url() instead.', DEBUG_DEVELOPER);
|
||||
$url2 = $coursecontext->get_url();
|
||||
$this->assertEquals($url1, $url2);
|
||||
$this->assertInstanceOf('moodle_url', $url2);
|
||||
|
||||
$pagecm = get_coursemodule_from_id('page', $testpages[7]);
|
||||
$context = context_module::instance($testpages[7]);
|
||||
$coursecontext1 = get_course_context($context);
|
||||
$this->assertDebuggingCalled('get_course_context() is deprecated, please use $context->get_course_context(true) instead.', DEBUG_DEVELOPER);
|
||||
$coursecontext2 = $context->get_course_context(true);
|
||||
$this->assertEquals($coursecontext1, $coursecontext2);
|
||||
$this->assertEquals(CONTEXT_COURSE, $coursecontext2->contextlevel);
|
||||
$this->assertEquals($pagecm->course, get_courseid_from_context($context));
|
||||
$this->assertDebuggingCalled('get_courseid_from_context() is deprecated, please use $context->get_course_context(false) instead.', DEBUG_DEVELOPER);
|
||||
|
||||
$caps = fetch_context_capabilities($systemcontext);
|
||||
$this->assertDebuggingCalled('fetch_context_capabilities() is deprecated, please use $context->get_capabilities() instead.', DEBUG_DEVELOPER);
|
||||
$this->assertEquals($caps, $systemcontext->get_capabilities());
|
||||
unset($caps);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+106
@@ -15,6 +15,112 @@ information provided here is intended especially for developers.
|
||||
** core_group_external::get_groupings
|
||||
** core_group_external::get_course_groupings
|
||||
** core_group_external::get_course_user_groups
|
||||
* Following functions are removed from core. See MDL-50049 for details.
|
||||
password_compat_not_supported()
|
||||
session_get_instance()
|
||||
session_is_legacy()
|
||||
session_kill_all()
|
||||
session_touch($sid)
|
||||
session_kill($sid)
|
||||
session_kill_user()
|
||||
session_set_user()
|
||||
session_is_loggedinas()
|
||||
session_get_realuser()
|
||||
session_loginas()
|
||||
js_minify()
|
||||
css_minify_css()
|
||||
update_login_count()
|
||||
reset_login_count()
|
||||
update_log_display_entry()
|
||||
get_recent_enrolments()
|
||||
groups_filter_users_by_course_module_visible()
|
||||
groups_course_module_visible()
|
||||
error()
|
||||
formerr()
|
||||
editorhelpbutton()
|
||||
editorshortcutshelpbutton()
|
||||
choose_from_menu()
|
||||
update_event()
|
||||
get_generic_section_name()
|
||||
get_all_sections()
|
||||
add_mod_to_section()
|
||||
get_all_mods()
|
||||
get_course_section()
|
||||
format_weeks_get_section_dates()
|
||||
get_print_section_cm_text()
|
||||
print_section_add_menus()
|
||||
make_editing_buttons()
|
||||
print_section()
|
||||
print_overview()
|
||||
print_recent_activity()
|
||||
delete_course_module()
|
||||
update_category_button()
|
||||
make_categories_list()
|
||||
category_delete_move()
|
||||
category_delete_full()
|
||||
move_category()
|
||||
course_category_hide()
|
||||
course_category_show()
|
||||
get_course_category()
|
||||
create_course_category()
|
||||
get_all_subcategories()
|
||||
get_child_categories()
|
||||
get_categories()
|
||||
print_course_search()
|
||||
print_my_moodle()
|
||||
print_remote_course()
|
||||
print_remote_host()
|
||||
print_whole_category_list()
|
||||
print_category_info()
|
||||
get_course_category_tree()
|
||||
print_courses()
|
||||
print_course()
|
||||
get_category_courses_array()
|
||||
get_category_courses_array_recursively()
|
||||
blog_get_context_url()
|
||||
get_courses_wmanagers()
|
||||
convert_tree_to_html()
|
||||
convert_tabrows_to_tree()
|
||||
can_use_rotated_text()
|
||||
get_parent_contexts()
|
||||
get_parent_contextid()
|
||||
get_child_contexts()
|
||||
create_contexts(()
|
||||
cleanup_contexts()
|
||||
build_context_path()
|
||||
rebuild_contexts()
|
||||
preload_course_contexts()
|
||||
context_moved()
|
||||
fetch_context_capabilities()
|
||||
context_instance_preload()
|
||||
get_contextlevel_name()
|
||||
print_context_name()
|
||||
mark_context_dirty()
|
||||
delete_context()
|
||||
get_context_url()
|
||||
get_course_context()
|
||||
get_user_courses_bycap()
|
||||
get_role_context_caps()
|
||||
get_courseid_from_context()
|
||||
context_instance_preload_sql()
|
||||
get_related_contexts_string()
|
||||
get_plugin_list_with_file()
|
||||
check_browser_operating_system()
|
||||
check_browser_version()
|
||||
get_device_type()
|
||||
get_device_type_list()
|
||||
get_selected_theme_for_device_type()
|
||||
get_device_cfg_var_name()
|
||||
get_user_device_type()
|
||||
get_browser_version_classes()
|
||||
generate_email_supportuser()
|
||||
badges_get_issued_badge_info()
|
||||
can_use_html_editor()
|
||||
enrol_cohort_get_cohorts()
|
||||
enrol_cohort_can_view_cohort()
|
||||
cohort_get_visible_list()
|
||||
enrol_cohort_enrol_all_users()
|
||||
enrol_cohort_search_cohorts()
|
||||
|
||||
=== 2.9.1 ===
|
||||
|
||||
|
||||
@@ -72,6 +72,7 @@ $string['browsed'] = 'Browsed';
|
||||
$string['browsemode'] = 'Preview mode';
|
||||
$string['browserepository'] = 'Browse repository';
|
||||
$string['calculatedweight'] = 'Calculated weight';
|
||||
$string['cannotaccess'] = 'You cannot call this script in that way';
|
||||
$string['cannotfindsco'] = 'Could not find SCO';
|
||||
$string['collapsetocwinsize'] = 'Collapse TOC when window size below';
|
||||
$string['collapsetocwinsizedesc'] = 'This setting lets you specify the window size below which the TOC should automatically collapse.';
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
if (empty($scorm)) {
|
||||
error('You cannot call this script in that way');
|
||||
print_error('cannotaccess', 'mod_scorm');
|
||||
}
|
||||
if (!isset($currenttab)) {
|
||||
$currenttab = '';
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
if (empty($scorm)) {
|
||||
error('You cannot call this script in that way');
|
||||
print_error('cannotaccess', 'mod_scorm');
|
||||
}
|
||||
if (!isset($currenttab)) {
|
||||
$currenttab = '';
|
||||
|
||||
@@ -29,6 +29,7 @@ $string['completion:view'] = 'View course completion report';
|
||||
$string['completiondate'] = 'Completion date';
|
||||
$string['id'] = 'ID';
|
||||
$string['name'] = 'Name';
|
||||
$string['nocapability'] = 'Can not access user completion report';
|
||||
$string['page-report-completion-x'] = 'Any completion report';
|
||||
$string['page-report-completion-index'] = 'Course completion report';
|
||||
$string['page-report-completion-user'] = 'User course completion report';
|
||||
|
||||
@@ -47,7 +47,7 @@ if ($USER->id != $user->id and has_capability('moodle/user:viewuseractivitiesrep
|
||||
|
||||
if (!report_completion_can_access_user_report($user, $course, true)) {
|
||||
// this should never happen
|
||||
error('Can not access user completion report');
|
||||
print_error('nocapability', 'report_completion');
|
||||
}
|
||||
|
||||
$stractivityreport = get_string('activityreport');
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
$string['eventreportviewed'] = 'Statistics report viewed';
|
||||
$string['eventuserreportviewed'] = 'User statistics report viewed';
|
||||
$string['nocapability'] = 'Can not access user statistics report';
|
||||
$string['pluginname'] = 'Statistics';
|
||||
$string['page-report-stats-x'] = 'Any statistics report';
|
||||
$string['page-report-stats-index'] = 'Course statistics report';
|
||||
|
||||
@@ -53,7 +53,7 @@ if ($USER->id != $user->id and has_capability('moodle/user:viewuseractivitiesrep
|
||||
|
||||
if (!report_stats_can_access_user_report($user, $course, true)) {
|
||||
// this should never happen
|
||||
error('Can not access user statistics report');
|
||||
print_error('nocapability', 'report_stats');
|
||||
}
|
||||
|
||||
$stractivityreport = get_string('activityreport');
|
||||
|
||||
Reference in New Issue
Block a user