mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
ROLES AND PERMISSIONS - FIRST CHECK-IN
======================================= WARNING: DEV IS CURRENTLY VERY UNSTABLE. This is a mega-checkin of the new Roles system. A lot of changes have been made in core and modules. Currently there are a lot of rough edges and known problems. We are working hard on these .. .the reason for getting this into HEAD at this stage is enable us to move faster (our branch was diverging from HEAD too much). Please keep an eye on http://docs.moodle.org/en/Roles for current status and information for developers on how to use the new Roles system.
This commit is contained in:
parent
394577c3e4
commit
bbbf2d4015
139 changed files with 40452 additions and 2001 deletions
|
@ -165,11 +165,7 @@
|
|||
$status = true;
|
||||
|
||||
//Get the discussions array
|
||||
if (!empty($info['MOD']['#']['SUBSCRIPTIONS'])) {
|
||||
$subscriptions = $info['MOD']['#']['SUBSCRIPTIONS']['0']['#']['SUBSCRIPTION'];
|
||||
} else {
|
||||
$subscriptions = array();
|
||||
}
|
||||
$subscriptions = $info['MOD']['#']['SUBSCRIPTIONS']['0']['#']['SUBSCRIPTION'];
|
||||
|
||||
//Iterate over subscriptions
|
||||
for($i = 0; $i < sizeof($subscriptions); $i++) {
|
||||
|
@ -226,11 +222,7 @@
|
|||
$status = true;
|
||||
|
||||
//Get the discussions array
|
||||
if (!empty($info['MOD']['#']['DISCUSSIONS'])) {
|
||||
$discussions = $info['MOD']['#']['DISCUSSIONS']['0']['#']['DISCUSSION'];
|
||||
} else {
|
||||
$discussions = array();
|
||||
}
|
||||
$discussions = $info['MOD']['#']['DISCUSSIONS']['0']['#']['DISCUSSION'];
|
||||
|
||||
//Iterate over discussions
|
||||
for($i = 0; $i < sizeof($discussions); $i++) {
|
||||
|
@ -331,11 +323,7 @@
|
|||
$status = true;
|
||||
|
||||
//Get the read array
|
||||
if (!empty($info['MOD']['#']['READPOSTS'])) {
|
||||
$readposts = $info['MOD']['#']['READPOSTS']['0']['#']['READ'];
|
||||
} else {
|
||||
$readposts = array();
|
||||
}
|
||||
$readposts = $info['MOD']['#']['READPOSTS']['0']['#']['READ'];
|
||||
|
||||
//Iterate over readposts
|
||||
for($i = 0; $i < sizeof($readposts); $i++) {
|
||||
|
@ -878,17 +866,6 @@
|
|||
$log->url = "search.php?id=".$log->course."&search=".urlencode($log->info);
|
||||
$status = true;
|
||||
break;
|
||||
case "user report":
|
||||
//recode the info field (it's the user id)
|
||||
$user = backup_getid($restore->backup_unique_code,"user",$log->info);
|
||||
if ($user) {
|
||||
$log->info = $user->new_id;
|
||||
//Now, extract the mode from the url field
|
||||
$mode = substr(strrchr($log->url,"="),1);
|
||||
$log->url = "user.php?course=".$log->course."&id=".$log->info."&mode=".$mode;
|
||||
$status = true;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (!defined('RESTORE_SILENTLY')) {
|
||||
echo "action (".$log->module."-".$log->action.") unknown. Not restored<br />"; //Debug
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue