Moodle

Implement import/export "Permissions" settings for "Manage roles" tab

Details

  • Database:
    Any
  • Affected Branches:
    MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE

Description

Suggest to implement "import / export" settings for the role "permissions". See the two proposed solutions (probably only one need to be implemented)... This is particularly useful for larger "enterprise-level" moodle implementation as we often have staging, testing, and development moodle installations and if we have customized role settings, it is a pain in the butt to manually change all of them one by one (it's a long list of the "Permissions" for all the newly deployed moodle instances. Thanks!

  1. Import-export-roles.bmml
    15/Sep/09 3:55 AM
    6 kB
    Daniel Neis
  2. Import-export-roles.bmml
    14/Sep/09 9:10 PM
    6 kB
    Daniel Neis
  3. Import-export-roles.bmml
    14/Sep/09 9:01 PM
    6 kB
    Daniel Neis
  4. Import-export-roles.bmml
    14/Sep/09 8:46 PM
    3 kB
    Daniel Neis
  5. mdl17081.diff
    04/Mar/10 12:09 AM
    3 kB
    Luis Henrique Mulinari
  6. mdl17081.diff
    16/Nov/09 8:18 PM
    30 kB
    Daniel Neis
  7. mdl17081-v2.diff
    16/Nov/09 8:21 PM
    31 kB
    Daniel Neis
  8. mdl17081-v3.diff
    14/Jul/10 2:48 AM
    30 kB
    Jonathan Champ
  9. Pre-import-screen.bmml
    22/Sep/09 3:40 AM
    8 kB
    Daniel Neis
  10. Pre-import-screen.bmml
    15/Sep/09 4:19 AM
    8 kB
    Daniel Neis
  11. remap-of-roles.bmml
    22/Sep/09 4:04 AM
    5 kB
    Daniel Neis
  1. Import-export-roles.png
    74 kB
    15/Sep/09 3:55 AM
  2. Pre-import-screen.png
    80 kB
    22/Sep/09 3:40 AM
  3. remap-of-roles.png
    87 kB
    22/Sep/09 4:04 AM

Issue Links

Activity

Hide
Daniel Neis added a comment -

Hello, Wen

you have mentioned two proposed solutions, but where are they?

I work on a project in a Federal University of Santa Catarina in Brazil (http://moodle.ufsc.br), and we are really interested in help you develop this feature.

Show
Daniel Neis added a comment - Hello, Wen you have mentioned two proposed solutions, but where are they? I work on a project in a Federal University of Santa Catarina in Brazil (http://moodle.ufsc.br), and we are really interested in help you develop this feature.
Hide
Daniel Neis added a comment -

Added UI Mockup: <Import-export-roles>

Show
Daniel Neis added a comment - Added UI Mockup: <Import-export-roles>
Hide
Daniel Neis added a comment -

Edited UI Mockup <Import-export-roles>: The first step import/export process. The user is able to select which roles it want export to XML or upload a file to import

Show
Daniel Neis added a comment - Edited UI Mockup <Import-export-roles>: The first step import/export process. The user is able to select which roles it want export to XML or upload a file to import
Hide
Daniel Neis added a comment -

Added UI Mockup: <Pre-import-screen>

Show
Daniel Neis added a comment - Added UI Mockup: <Pre-import-screen>
Hide
Daniel Neis added a comment -

Hello,

we are working on implemente this feature here at Universidade Federal de Santa Catarina (http://moodle.ufsc.br).
As Yu Zhang noted, there is code that already do this in course backup. I have isolated these code snippets:

Here is the code that backup roles (export) :

moodle/backup/backuplib.php:
...
 615         ///Roles stuff goes in here
 616 
 617         fwrite ($bf, start_tag('ROLES', 1, true));
 618         $roles = backup_fetch_roles($preferences);
 619 
 620         $sitecontext = get_context_instance(CONTEXT_SYSTEM);
 621         $coursecontext = get_context_instance(CONTEXT_COURSE, $preferences->backup_course);
 622 
 623         foreach ($roles as $role) {
 624             fwrite ($bf,start_tag('ROLE',2,true));
 625             fwrite ($bf,full_tag('ID', 3, false, $role->id));
 626             fwrite ($bf,full_tag('NAME',3,false,$role->name));
 627             fwrite ($bf,full_tag('SHORTNAME',3,false,$role->shortname));
 628         /// Calculate $role name in course
 629             $nameincourse = role_get_name($role, $coursecontext);
 630             if ($nameincourse != $role->name) {
 631                 fwrite ($bf,full_tag('NAMEINCOURSE', 3, false, $nameincourse));
 632             }
 633             // find and write all default capabilities
 634             fwrite ($bf,start_tag('CAPABILITIES',3,true));
 635             // pull out all default (site context) capabilities
 636             if ($capabilities = role_context_capabilities($role->id, $sitecontext)) {
 637                 foreach ($capabilities as $capability=>$value) {
 638                     fwrite ($bf,start_tag('CAPABILITY',4,true));
 639                     fwrite ($bf,full_tag('NAME', 5, false, $capability));
 640                     fwrite ($bf,full_tag('PERMISSION', 5, false, $value));
 641                     // use this to pull out the other info (timemodified and modifierid)
 642 
 643                     $cap = get_record_sql("SELECT *
 644                                            FROM {$CFG->prefix}role_capabilities
 645                                            WHERE capability = '$capability'
 646                                                  AND contextid = $sitecontext->id
 647                                                  AND roleid = $role->id");
 648                     fwrite ($bf, full_tag("TIMEMODIFIED", 5, false, $cap->timemodified));
 649                     fwrite ($bf, full_tag("MODIFIERID", 5, false, $cap->modifierid));
 650                     fwrite ($bf,end_tag('CAPABILITY',4,true));
 651                 }
 652             }
 653             fwrite ($bf,end_tag('CAPABILITIES',3,true));
 654             fwrite ($bf,end_tag('ROLE',2,true));
 655         }
 656         fwrite ($bf,end_tag('ROLES', 1, true));
...

And here is the code for restore roles (import):

moodle/backup/restorelib.php:
...
8693     /**
8694      * This function restores all the needed roles for this course
8695      * i.e. roles with an assignment in any of the mods or blocks,
8696      * roles assigned on any user (e.g. parent role) and roles
8697      * assigned at course levle
8698      * This function should check for duplicate roles first
8699      * It isn't now, just overwriting
8700      */
8701     function restore_create_roles($restore, $xmlfile) {
...
8810     /**
8811      * this function restores role assignments and role overrides
8812      * in course/user/block/mod level, it passed through
8813      * the xml file again
8814      */
8815     function restore_roles_settings($restore, $xmlfile)

Reading the comments to such code, seems to me that is a good chance to refactor the code to do such checks, like shown in the interface mock up.

Show
Daniel Neis added a comment - Hello, we are working on implemente this feature here at Universidade Federal de Santa Catarina (http://moodle.ufsc.br). As Yu Zhang noted, there is code that already do this in course backup. I have isolated these code snippets: Here is the code that backup roles (export) :
moodle/backup/backuplib.php:
...
 615         ///Roles stuff goes in here
 616 
 617         fwrite ($bf, start_tag('ROLES', 1, true));
 618         $roles = backup_fetch_roles($preferences);
 619 
 620         $sitecontext = get_context_instance(CONTEXT_SYSTEM);
 621         $coursecontext = get_context_instance(CONTEXT_COURSE, $preferences->backup_course);
 622 
 623         foreach ($roles as $role) {
 624             fwrite ($bf,start_tag('ROLE',2,true));
 625             fwrite ($bf,full_tag('ID', 3, false, $role->id));
 626             fwrite ($bf,full_tag('NAME',3,false,$role->name));
 627             fwrite ($bf,full_tag('SHORTNAME',3,false,$role->shortname));
 628         /// Calculate $role name in course
 629             $nameincourse = role_get_name($role, $coursecontext);
 630             if ($nameincourse != $role->name) {
 631                 fwrite ($bf,full_tag('NAMEINCOURSE', 3, false, $nameincourse));
 632             }
 633             // find and write all default capabilities
 634             fwrite ($bf,start_tag('CAPABILITIES',3,true));
 635             // pull out all default (site context) capabilities
 636             if ($capabilities = role_context_capabilities($role->id, $sitecontext)) {
 637                 foreach ($capabilities as $capability=>$value) {
 638                     fwrite ($bf,start_tag('CAPABILITY',4,true));
 639                     fwrite ($bf,full_tag('NAME', 5, false, $capability));
 640                     fwrite ($bf,full_tag('PERMISSION', 5, false, $value));
 641                     // use this to pull out the other info (timemodified and modifierid)
 642 
 643                     $cap = get_record_sql("SELECT *
 644                                            FROM {$CFG->prefix}role_capabilities
 645                                            WHERE capability = '$capability'
 646                                                  AND contextid = $sitecontext->id
 647                                                  AND roleid = $role->id");
 648                     fwrite ($bf, full_tag("TIMEMODIFIED", 5, false, $cap->timemodified));
 649                     fwrite ($bf, full_tag("MODIFIERID", 5, false, $cap->modifierid));
 650                     fwrite ($bf,end_tag('CAPABILITY',4,true));
 651                 }
 652             }
 653             fwrite ($bf,end_tag('CAPABILITIES',3,true));
 654             fwrite ($bf,end_tag('ROLE',2,true));
 655         }
 656         fwrite ($bf,end_tag('ROLES', 1, true));
...
And here is the code for restore roles (import):
moodle/backup/restorelib.php:
...
8693     /**
8694      * This function restores all the needed roles for this course
8695      * i.e. roles with an assignment in any of the mods or blocks,
8696      * roles assigned on any user (e.g. parent role) and roles
8697      * assigned at course levle
8698      * This function should check for duplicate roles first
8699      * It isn't now, just overwriting
8700      */
8701     function restore_create_roles($restore, $xmlfile) {
...
8810     /**
8811      * this function restores role assignments and role overrides
8812      * in course/user/block/mod level, it passed through
8813      * the xml file again
8814      */
8815     function restore_roles_settings($restore, $xmlfile)
Reading the comments to such code, seems to me that is a good chance to refactor the code to do such checks, like shown in the interface mock up.
Hide
Daniel Neis added a comment -

Edited UI Mockup <Pre-import-screen>: rethink interface to do the import in two steps

Show
Daniel Neis added a comment - Edited UI Mockup <Pre-import-screen>: rethink interface to do the import in two steps
Hide
Daniel Neis added a comment -

Added UI Mockup: <remap-of-roles>

Show
Daniel Neis added a comment - Added UI Mockup: <remap-of-roles>
Hide
Daniel Neis added a comment -

While discussing this issue with co-workers, we have found that the import process must be done in two steps:

  • first, choose which roles to import and if they will be imported as new roles or will overwrite existing ones
  • second, for all unknown roles in "allow assign" or "allow override", the user must select an existing role to user intead or select ignore role assigns and override for that role

this process must be done this way cause we can have assigns/overrides cross-referencing the roles being imported

Show
Daniel Neis added a comment - While discussing this issue with co-workers, we have found that the import process must be done in two steps:
  • first, choose which roles to import and if they will be imported as new roles or will overwrite existing ones
  • second, for all unknown roles in "allow assign" or "allow override", the user must select an existing role to user intead or select ignore role assigns and override for that role
this process must be done this way cause we can have assigns/overrides cross-referencing the roles being imported
Hide
Daniel Neis added a comment -

sorry, i have linked it to MDL-16985 but it is wrong, it is just a non-specific relation....

Show
Daniel Neis added a comment - sorry, i have linked it to MDL-16985 but it is wrong, it is just a non-specific relation....
Hide
Anthony Borrow added a comment -

As I recall, there was a previous discussion about importing/exporting roles and the biggest concern was security and being able to have an audit history of the changes that could be undone. The sentiment was that It seemed dangerous to have a file which was uploadable able to modify such key things. I can appreciate both the concern and the need for this especially in larger institutions. Peace - Anthony

Show
Anthony Borrow added a comment - As I recall, there was a previous discussion about importing/exporting roles and the biggest concern was security and being able to have an audit history of the changes that could be undone. The sentiment was that It seemed dangerous to have a file which was uploadable able to modify such key things. I can appreciate both the concern and the need for this especially in larger institutions. Peace - Anthony
Hide
Daniel Neis added a comment -

I agree that is dangeours too have a file which is uploadable and able to modify role definitions, but i think that like deleting sections (MDL-10405), there will be a confirmation step and may be restricted only to admin.
It would really be good to have log of capabilities redefinition, by now we have can have at least a log entry saying "admin uploaded X roles and substitute Y and Z" (maybe because, here, we rely on our database backups in case something goes wrong).

Show
Daniel Neis added a comment - I agree that is dangeours too have a file which is uploadable and able to modify role definitions, but i think that like deleting sections (MDL-10405), there will be a confirmation step and may be restricted only to admin. It would really be good to have log of capabilities redefinition, by now we have can have at least a log entry saying "admin uploaded X roles and substitute Y and Z" (maybe because, here, we rely on our database backups in case something goes wrong).
Hide
Daniel Neis added a comment -

Hello, i have attached a patch (mdl17081.diff) that offers import and export of roles capabilities.
I have discarded the "allow overrides" and "allow assign" parts because it would result in a unnecessary complexity, both in the interface and source code.

The patch is so big because i did a copy and paste of the code that does de import/export in moodle/backup/backuplib.php and moodle/backup/restorelib.php . If people really like this functionality we can refact the code and remove the duplicated parts.

Thanks and good luck.
=o)

Show
Daniel Neis added a comment - Hello, i have attached a patch (mdl17081.diff) that offers import and export of roles capabilities. I have discarded the "allow overrides" and "allow assign" parts because it would result in a unnecessary complexity, both in the interface and source code. The patch is so big because i did a copy and paste of the code that does de import/export in moodle/backup/backuplib.php and moodle/backup/restorelib.php . If people really like this functionality we can refact the code and remove the duplicated parts. Thanks and good luck. =o)
Hide
Daniel Neis added a comment -

Sorry, the first version has some lines with just blank spaces. mdl17081-v2.dif is the full patch, without these unnecessary spaces.

Show
Daniel Neis added a comment - Sorry, the first version has some lines with just blank spaces. mdl17081-v2.dif is the full patch, without these unnecessary spaces.
Hide
Daniel Neis added a comment -

Ah! I almost forgot, in the UI Mockups i have made, there was links to check and uncheck all checkboxes in roles list to export.
I have tried to implement it in an elegant way using YUI, thinking about no-javascript browsers, but i give up after 4 hours fighting with the library.

Show
Daniel Neis added a comment - Ah! I almost forgot, in the UI Mockups i have made, there was links to check and uncheck all checkboxes in roles list to export. I have tried to implement it in an elegant way using YUI, thinking about no-javascript browsers, but i give up after 4 hours fighting with the library.
Hide
Luis Henrique Mulinari added a comment -

I have made two changes on this feature. The first is marking checkboxes preselected (if role exists, select 'Do not import', if role does not exists, select 'Import, creating new role with this shortname'), the second one is putting suggested name for the shortname.

Show
Luis Henrique Mulinari added a comment - I have made two changes on this feature. The first is marking checkboxes preselected (if role exists, select 'Do not import', if role does not exists, select 'Import, creating new role with this shortname'), the second one is putting suggested name for the shortname.
Hide
Luis Henrique Mulinari added a comment -

Sorry, the comment above I forgot to mention the diff file I sent. The file is mdl17081.diff

Show
Luis Henrique Mulinari added a comment - Sorry, the comment above I forgot to mention the diff file I sent. The file is mdl17081.diff
Hide
Jonathan Champ added a comment -

Here (mdl17081-v3) is the initial version that I am planning to use. Other than spacing changes, this version sets a default value, performs an update on replace instead of a delete (so that user-role associations are maintained), and preserves role descriptions (as in MDL-21708).

Before applying it to core, you will likely want to:

  • put the inline css to display the unordered list bullets somewhere nicer
  • handle the get_records() call somewhat differently than injecting parameters by hand
  • consider better ways of handling the "Please verify the role assignments and role overrides using the tabs above." text as you might want to make it more noticeable or represent the same call to action in a different way

Additional core changes that would be nice:

  • refactoring the functions duplicated in this code so that this code can call those functions without triggering the parts of the existing code which has other side effects
  • a way to get_records() that can take multiple parameters, possible though the use of an associative array
Show
Jonathan Champ added a comment - Here (mdl17081-v3) is the initial version that I am planning to use. Other than spacing changes, this version sets a default value, performs an update on replace instead of a delete (so that user-role associations are maintained), and preserves role descriptions (as in MDL-21708). Before applying it to core, you will likely want to:
  • put the inline css to display the unordered list bullets somewhere nicer
  • handle the get_records() call somewhat differently than injecting parameters by hand
  • consider better ways of handling the "Please verify the role assignments and role overrides using the tabs above." text as you might want to make it more noticeable or represent the same call to action in a different way
Additional core changes that would be nice:
  • refactoring the functions duplicated in this code so that this code can call those functions without triggering the parts of the existing code which has other side effects
  • a way to get_records() that can take multiple parameters, possible though the use of an associative array
Hide
Daniel Neis added a comment -

Hello, Jonathan

i am happy that this issue helped you.
Thanks for your comments, sugestions and additions to the original patch.
Some considerations about my patch:

It is very straightforward, in terms that it changes moodle's code as least as possible. The Role API was rewritten for Moodle 2.0, so this patch will be rewritten to work in 2.0 and i hope it will be much less duplicated code. This is true for the get_records() calls, that in 2.0 handle parameters in another way (http://docs.moodle.org/en/Development:DB_layer_2.0).
About the handling of the ""Please verify the role assignments and role overrides using the tabs above." , i didn't have time to test your patch yet, but it seems it adds some modifications on the interface (i don't remember i was using tab for anything inside the import/export process, and also i don't handle overrides). Could you please post some screenshots of your interface?

Kind regards,
Daniel

Show
Daniel Neis added a comment - Hello, Jonathan i am happy that this issue helped you. Thanks for your comments, sugestions and additions to the original patch. Some considerations about my patch: It is very straightforward, in terms that it changes moodle's code as least as possible. The Role API was rewritten for Moodle 2.0, so this patch will be rewritten to work in 2.0 and i hope it will be much less duplicated code. This is true for the get_records() calls, that in 2.0 handle parameters in another way (http://docs.moodle.org/en/Development:DB_layer_2.0). About the handling of the ""Please verify the role assignments and role overrides using the tabs above." , i didn't have time to test your patch yet, but it seems it adds some modifications on the interface (i don't remember i was using tab for anything inside the import/export process, and also i don't handle overrides). Could you please post some screenshots of your interface? Kind regards, Daniel
Hide
Jonathan Champ added a comment -

I didn't change anything with the tabs. As you remember, you added the Import/Export fourth tab as in the mockup. The second and third tabs are used to control the "Allow Role Assigns" and "Allow Role Overrides". While these two items might have been able to transfer between two systems, it was decided that those two screens are simple enough to manage manually and far more complicated (and dangerous) to handle automatically. As such, I thought it would be important to remind someone using the Import/Export tool to verify that those two screens were correctly configured once an import had completed.

When I said "better ways of handling", I meant visually. I added the text to the "Import finished" text, but it isn't bold or bigger than the surrounding text, and it somewhat confuses the fact that I thought these translations are supposed to be reusable (but it seemed like an effective way to meet the need, while not spending additional developer time doing visual design - two things that usually mix poorly like oil and water).

Good point about the newer database and api changes. I think our goal was to have something that we could use with 1.9.x until we feel comfortable with 2.0 and can make that upgrade a success.

Show
Jonathan Champ added a comment - I didn't change anything with the tabs. As you remember, you added the Import/Export fourth tab as in the mockup. The second and third tabs are used to control the "Allow Role Assigns" and "Allow Role Overrides". While these two items might have been able to transfer between two systems, it was decided that those two screens are simple enough to manage manually and far more complicated (and dangerous) to handle automatically. As such, I thought it would be important to remind someone using the Import/Export tool to verify that those two screens were correctly configured once an import had completed. When I said "better ways of handling", I meant visually. I added the text to the "Import finished" text, but it isn't bold or bigger than the surrounding text, and it somewhat confuses the fact that I thought these translations are supposed to be reusable (but it seemed like an effective way to meet the need, while not spending additional developer time doing visual design - two things that usually mix poorly like oil and water). Good point about the newer database and api changes. I think our goal was to have something that we could use with 1.9.x until we feel comfortable with 2.0 and can make that upgrade a success.
Hide
Daniel Neis added a comment -

Now i understand the "better ways of handling". I agree it would be good to warn users about the overrides and assigns.

Let's wait for 2.0 to make a 2.0 version of this import export that will be a success! =)

Show
Daniel Neis added a comment - Now i understand the "better ways of handling". I agree it would be good to warn users about the overrides and assigns. Let's wait for 2.0 to make a 2.0 version of this import export that will be a success! =)
Hide
Elaine Blakeman added a comment -

Please enable export to excel as well!

Show
Elaine Blakeman added a comment - Please enable export to excel as well!
Hide
Glenn Ansley added a comment -

I've refreshed much of this code to work as a admin report plugin for Moodle 2.0 if someone wants to kick the tires on it for me.
Place the rolesmigration folder in the /admin/report/ directory
Get it here: https://github.com/glennansley/moodle-report_rolesmigration

Show
Glenn Ansley added a comment - I've refreshed much of this code to work as a admin report plugin for Moodle 2.0 if someone wants to kick the tires on it for me. Place the rolesmigration folder in the /admin/report/ directory Get it here: https://github.com/glennansley/moodle-report_rolesmigration
Hide
Nicholas Koeppen added a comment -

Glenn, I have your code working as a local plugin and will be testing the code. We can flush out any problems and add this code for easy inclusion in the core Moodle code. Thanks for your work on the code already.

Show
Nicholas Koeppen added a comment - Glenn, I have your code working as a local plugin and will be testing the code. We can flush out any problems and add this code for easy inclusion in the core Moodle code. Thanks for your work on the code already.
Hide
Nicholas Koeppen added a comment -

I have reworked a couple things in the role migration plugin and have it working well. The code seems to be working well, but I'll send it through some more detailed testing and publish it so everyone can look over it.

Show
Nicholas Koeppen added a comment - I have reworked a couple things in the role migration plugin and have it working well. The code seems to be working well, but I'll send it through some more detailed testing and publish it so everyone can look over it.
Hide
Daniel Neis added a comment -

Hello, Glenn

first, congratulations for the job! It is a great job!

I've forked the code on github and did some minor changes:

  • Moved the code outside rolesmigration directory, so i can clone it with "cd moodle/admin/report && git clone https://danielneis@github.com/danielneis/moodle-report_rolesmigration.git rolesmigration" and have everything inside that directory, just working
  • Changed the require path for config.php that was a hardcoded directory on your machine, i guess. It's common and i think it is not a problem, to use "../../../" in moodle admin reports and other plugins...

Also, i've noted that yout implementation don't automatically mark a default option on import, i will try to implement this soon and submit a merge request.

Thanks again for the code,
Daniel

Show
Daniel Neis added a comment - Hello, Glenn first, congratulations for the job! It is a great job! I've forked the code on github and did some minor changes:
  • Moved the code outside rolesmigration directory, so i can clone it with "cd moodle/admin/report && git clone https://danielneis@github.com/danielneis/moodle-report_rolesmigration.git rolesmigration" and have everything inside that directory, just working
  • Changed the require path for config.php that was a hardcoded directory on your machine, i guess. It's common and i think it is not a problem, to use "../../../" in moodle admin reports and other plugins...
Also, i've noted that yout implementation don't automatically mark a default option on import, i will try to implement this soon and submit a merge request. Thanks again for the code, Daniel
Hide
Nicholas Koeppen added a comment - - edited

For anyone's consumption here is the rolesmigration local plugin that we developed at the University of Wisconsin-Madison. It is in an SVN repository:

svn checkout https://code.doit.wisc.edu/svn/eCOW2/Moodle_2/plugins/local/rolesmigration/trunk

There should be no authentication required, but let me know if anyone has issues with that or the code itself.

Thanks,
Nick

Show
Nicholas Koeppen added a comment - - edited For anyone's consumption here is the rolesmigration local plugin that we developed at the University of Wisconsin-Madison. It is in an SVN repository: svn checkout https://code.doit.wisc.edu/svn/eCOW2/Moodle_2/plugins/local/rolesmigration/trunk There should be no authentication required, but let me know if anyone has issues with that or the code itself. Thanks, Nick
Hide
Nicholas Koeppen added a comment -

A few notes: the svn repo url has been fixed and the appearance has not changed much, but the code has been adjusted to what seems to be a more Moodle way of execution. All the credit to Glenn and others who put the work in on the code. Thanks everyone.

Show
Nicholas Koeppen added a comment - A few notes: the svn repo url has been fixed and the appearance has not changed much, but the code has been adjusted to what seems to be a more Moodle way of execution. All the credit to Glenn and others who put the work in on the code. Thanks everyone.
Hide
Glenn Ansley added a comment -

Thanks Nicholas, I'm evaluating your changes now and will update github in a bit. I already see several things I missed / did incorrectly. Some of your changes don't make sense to me but I'll chalk that up to artistic license Thanks for your contribution!

Show
Glenn Ansley added a comment - Thanks Nicholas, I'm evaluating your changes now and will update github in a bit. I already see several things I missed / did incorrectly. Some of your changes don't make sense to me but I'll chalk that up to artistic license Thanks for your contribution!
Hide
Anthony Borrow added a comment -

In response to http://moodle.org/mod/forum/discuss.php?d=181563, I have added the patch label to this issue in order to encourage someone to pick it up. There seem to be a couple of patches or ideas as to how this might be implemented. Peace - Anthony

Show
Anthony Borrow added a comment - In response to http://moodle.org/mod/forum/discuss.php?d=181563, I have added the patch label to this issue in order to encourage someone to pick it up. There seem to be a couple of patches or ideas as to how this might be implemented. Peace - Anthony
Hide
Glenn Ansley added a comment -

Updated plugin here. Just check it out and drop it in the admin/reports/ folder:
https://github.com/glennansley/moodle-report_rolesmigration/

Nick, thanks a ton. I'm only about 6 months into Moodle development so I went over all your changes line by line and learned quite a bit. I didn't merge all of your changes - namely moving it to the local directory. Most of them were welcomed improvements though. Thanks again!

Show
Glenn Ansley added a comment - Updated plugin here. Just check it out and drop it in the admin/reports/ folder: https://github.com/glennansley/moodle-report_rolesmigration/ Nick, thanks a ton. I'm only about 6 months into Moodle development so I went over all your changes line by line and learned quite a bit. I didn't merge all of your changes - namely moving it to the local directory. Most of them were welcomed improvements though. Thanks again!
Hide
Nicholas Koeppen added a comment -

Glenn,

Glad you found some of our code useful. The move to a local plugin is definitely not a big deal, it just matches how we organize our code here. In fact I found that local plugins lack support for CSS, which reports have. This alone makes for a better reason to have it in reports. I might end up switching ours as well.

Show
Nicholas Koeppen added a comment - Glenn, Glad you found some of our code useful. The move to a local plugin is definitely not a big deal, it just matches how we organize our code here. In fact I found that local plugins lack support for CSS, which reports have. This alone makes for a better reason to have it in reports. I might end up switching ours as well.

Dates

  • Created:
    Updated: