General help

 
 
Picture of Wast Eemail
My Moodle: Reset all users back to DEFAULT My Moodle page. How?
 

Moodle: 2.0.2

I need to reset all users back to the DEFAULT My Moodle page.  How?

I have already made it so that new users cannot customize this page.  However, older users need to be reset back to default.

It would be great if there was an option to ONLY allow use of the DEFAULT My Moodle page setup.

Thanks!

 
Average of ratings: -
Picture of Kyle Egan
Re: My Moodle: Reset all users back to DEFAULT My Moodle page. How?
 

I have the same issue- 'older uses not getting the updates', I would also like a 'Reset to default' button next to the customise this page. Is there a tracker for this, I coulden't see one but i'm pretty new at this.  

I think the issue is here: 'my/index.php'

<!--

if (get_home_page() != HOMEPAGE_MY) {
    if (optional_param('setdefaulthome', false, PARAM_BOOL)) {
        set_user_preference('user_home_page_preference', HOMEPAGE_MY);
    } else if (!empty($CFG->defaulthomepage) && $CFG->defaulthomepage == HOMEPAGE_USER) {
        $PAGE->settingsnav->get('usercurrentsettings')->add(get_string('makethismyhome'), new moodle_url('/my/', array('setdefaulthome'=>true)), navigation_node::TYPE_SETTING);
    }
}

--!>

 

 
Average of ratings: -
Picture of Hubert Chathi
Re: My Moodle: Reset all users back to DEFAULT My Moodle page. How?
 
As far as I know, there is no way to reset a user's page to their My Moodle page, although you can use capabilities to control whether users can make further changes. I am not aware of an existing tracker issue for this, so please create one (and post it here so that I can follow it).
 
Average of ratings: -
Picture of Kyle Egan
Re: My Moodle: Reset all users back to DEFAULT My Moodle page. How?
 

Here we go, I have created a tracker for the issue.

http://tracker.moodle.org/browse/MDL-26680

 
Average of ratings: -
Guido
Re: My Moodle: Reset all users back to DEFAULT My Moodle page. How?
Group Moodle Course Creator Certificate holders

you should add 2.1 and higher to the tracker.

 

 
Average of ratings: -
Picture of Marcus Wynwood
Re: My Moodle: Reset all users back to DEFAULT My Moodle page. How?
 

To reset all users back to the default 'My Moodle' page, you can delete some records in the mdl_my_pages table.
Make sure you leave the records with a NULL userid though.
Something like this:

DELETE FROM mdl_my_pages WHERE userid <> 'NULL';

I've used this on Moodle 2.2 , but use this at your own RISK!
Test it on a non-production server first!

 
Average of ratings: -
Picture of Seung-Yong Oh
Re: My Moodle: Reset all users back to DEFAULT My Moodle page. How?
 

This method works well even in the moodle 2.3. 

Thanks !

 
Average of ratings: -
QED
Re: My Moodle: Reset all users back to DEFAULT My Moodle page. How?
 

mdl_my_pages???  We have just upgraded to 2.2 and I am working out kinks. I need to reset all my pages to default page so was happy when I came across this post. Only problem is I can't find that table in the database????

 
Average of ratings: -
QED
Re: My Moodle: Reset all users back to DEFAULT My Moodle page. How?
 

Hey self! You were being dumb. You were in the wrong moodle database!

 
Average of ratings: -
Sketch...
Re: My Moodle: Reset all users back to DEFAULT My Moodle page. How?
Group Particularly helpful Moodlers

LOL! Don't you just hate it when that happens!

 
Average of ratings: -
Picture of Pascal Rigaux
Re: My Moodle: Reset all users back to DEFAULT My Moodle page. How?
 

Based on code suggested in MDL-2668, i would say you need to remove corresponding 'my-index'  entries from table 'block_instances'. Here is what i have done:

delete from mdl_block_instances where pagetypepattern = 'my-index' and parentcontextid in (select id from mdl_context where instanceid in (select userid from mdl_my_pages));

delete from mdl_my_pages where userid <> 'NULL';

 
Average of ratings: -