Best practice forum (Archived)

הדיון בפורום זה הוסר

 
פרסום זה הוסר
10/03/2014, 11:51
פרסום זה הוסר ואינו זמין יותר.
פרסום זה הוסר
11/03/2014, 01:16
פרסום זה הוסר ואינו זמין יותר.
? ?
Re: Default My Learning Page Reset
על ידי ? ? בתאריך 11/03/2014, 18:21
 

Just deleting the records from mdl_my_pages might potentially cause some problems if some users have blocks set up which will then be orphaned. I've attached a script to reset all dashboards and clean up associated blocks which might be a good starting point.

Put this file in totara folder, open command line, navigate to totara folder, and run it with command "php dashboardreset.php"

Also if you remove the moodle/my:manageblocks capability from the Authenticated User and Learner roles then that should stop the users from making any changes to their blocks in future.

? ?
Re: Default My Learning Page Reset
על ידי ? ? בתאריך 11/03/2014, 20:51
 

Thanks for this Ciaran. Really, thanks! Like you said, you risk orphaned records in related tables and it was a pain to "get it all right" when resetting blocks for a specific user. 

To be clear, your script will reset the dashboard for all users, correct?

? ?
Re: Default My Learning Page Reset
על ידי ? ? בתאריך 11/03/2014, 21:13
 

It's not mine, thank Yuliya for that script :-)

It goes through all users, sees if they have my_pages configured, removes any associated block instances, then cleans up the my_page. Should be fairly straightforward.

Is this a common problem then, would it make sense to actually have this incorporated into Core functionality?

? ?
Re: Default My Learning Page Reset
על ידי ? ? בתאריך 11/03/2014, 21:24
 

Thanks Yuliya!

 

I had actually seen this discussed on some Moodle forums a while back, that perhaps it was coming to a Moodle near you. I don't know if I can fine the thread now, but I know there was discussion of putting this into Moodle. I think it would be nice to have in Core functionality.

The lesson here is, implementors should probably disable the ability to customize the my learning page right from the start, and re-introduce it later if the functionality is really desired. More often than not, in corporate, they don't want users customizing anything (in my own experience). It requires too much support down the road and is considered to be too confusing to the end user. The same goes for customizing the users' user profile page.

? ?
Re: Default My Learning Page Reset
על ידי ? ? בתאריך 13/03/2014, 06:33
 

Here is the Moodle bug tracker I referenced. https://tracker.moodle.org/browse/MDL-26680

? ?
Re: Default My Learning Page Reset
על ידי ? ? בתאריך 13/03/2014, 15:21
 

Thanks for that Jamie, I've added the Moodle tracker link to the feature request, so when we start on 2.7 we can see if the Moodle fix is sufficient or whether we want to extend it :-)

פרסום זה הוסר
12/03/2014, 07:35
פרסום זה הוסר ואינו זמין יותר.