mirror of
https://github.com/moodle/moodle.git
synced 2025-08-09 10:56:56 +02:00
Merge branch 'MDL-62228_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE
This commit is contained in:
commit
17d4aeacb4
7 changed files with 0 additions and 25 deletions
|
@ -313,9 +313,6 @@ class provider implements
|
||||||
// Don't belong to the modifier user.
|
// Don't belong to the modifier user.
|
||||||
|
|
||||||
// Remove data from role_assignments.
|
// Remove data from role_assignments.
|
||||||
if (empty($context)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$DB->delete_records('role_assignments', ['contextid' => $context->id]);
|
$DB->delete_records('role_assignments', ['contextid' => $context->id]);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -120,10 +120,6 @@ class provider implements
|
||||||
* @param \context $context The context to delete data for.
|
* @param \context $context The context to delete data for.
|
||||||
*/
|
*/
|
||||||
public static function delete_data_for_all_users_in_context(\context $context) {
|
public static function delete_data_for_all_users_in_context(\context $context) {
|
||||||
if (empty($context)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($context->contextlevel != CONTEXT_USER) {
|
if ($context->contextlevel != CONTEXT_USER) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -187,10 +187,6 @@ class provider implements
|
||||||
* @param context $context Transform the specific context to delete data for.
|
* @param context $context Transform the specific context to delete data for.
|
||||||
*/
|
*/
|
||||||
public static function delete_data_for_all_users_in_context(\context $context) {
|
public static function delete_data_for_all_users_in_context(\context $context) {
|
||||||
if (empty($context)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Delete all Calendar Events in the specified context in batches.
|
// Delete all Calendar Events in the specified context in batches.
|
||||||
if ($eventids = array_keys(self::get_calendar_event_ids_by_context($context))) {
|
if ($eventids = array_keys(self::get_calendar_event_ids_by_context($context))) {
|
||||||
self::delete_batch_records('event', 'id', $eventids);
|
self::delete_batch_records('event', 'id', $eventids);
|
||||||
|
|
|
@ -143,10 +143,6 @@ class provider implements
|
||||||
* @param context $context A user context.
|
* @param context $context A user context.
|
||||||
*/
|
*/
|
||||||
public static function delete_data_for_all_users_in_context(\context $context) {
|
public static function delete_data_for_all_users_in_context(\context $context) {
|
||||||
if (empty($context)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$context instanceof \context_system && !$context instanceof \context_coursecat) {
|
if (!$context instanceof \context_system && !$context instanceof \context_coursecat) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -164,9 +164,6 @@ class provider implements
|
||||||
public static function delete_data_for_all_users_in_context(\context $context) {
|
public static function delete_data_for_all_users_in_context(\context $context) {
|
||||||
global $DB;
|
global $DB;
|
||||||
|
|
||||||
if (empty($context)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// Sanity check that context is at the User context level.
|
// Sanity check that context is at the User context level.
|
||||||
if ($context->contextlevel == CONTEXT_COURSE) {
|
if ($context->contextlevel == CONTEXT_COURSE) {
|
||||||
$sql = "SELECT ue.id
|
$sql = "SELECT ue.id
|
||||||
|
|
|
@ -215,10 +215,6 @@ class provider implements
|
||||||
public static function delete_data_for_all_users_in_context(\context $context) {
|
public static function delete_data_for_all_users_in_context(\context $context) {
|
||||||
global $DB;
|
global $DB;
|
||||||
|
|
||||||
if (empty($context)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($context->contextlevel == CONTEXT_MODULE) {
|
if ($context->contextlevel == CONTEXT_MODULE) {
|
||||||
// Delete all assignment submissions for the assignment associated with the context module.
|
// Delete all assignment submissions for the assignment associated with the context module.
|
||||||
$assignment = self::get_assignment_by_context($context);
|
$assignment = self::get_assignment_by_context($context);
|
||||||
|
|
|
@ -240,9 +240,6 @@ class provider implements
|
||||||
*/
|
*/
|
||||||
public static function delete_data_for_all_users_in_context(\context $context) {
|
public static function delete_data_for_all_users_in_context(\context $context) {
|
||||||
global $DB;
|
global $DB;
|
||||||
if (empty($context)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($context->contextlevel != CONTEXT_MODULE) {
|
if ($context->contextlevel != CONTEXT_MODULE) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue