moodle-an-hochschulen / moodle-availability_role

Moodle availability plugin which lets users restrict resources, activities and sections based on roles
GNU General Public License v3.0
7 stars 13 forks source link

V3.1-r3: error by import when role names are changed #8

Closed gemguardian closed 6 years ago

gemguardian commented 7 years ago

Hello Alex,

I installed the V3.1-r3 on Moodle 3.1. We have courses where we changed the role name in the course settings. When we set the plug-in and we want to import the course into another course or make a back up and place the course back. We get the error below.

I don't have this error on other courses, just when we use the plug-in.

Gemma ss 2017-11-02 at 09 59 19 2

antton commented 6 years ago

This is your solution!!

https://github.com/moodleuulm/moodle-availability_role/commit/bd0cbbc51bb7817c54b06b6a0d2ee5a523405460

Just change 2 lines on classes/condition.php file and that all, your backups will restore properly!

abias commented 6 years ago

Thank you, Antton, for pointing out the patch which Gemma is missing in the 3.1 version. Unfortunately, the fix wasn't backported to the 3.1 version anymore.

Gemma, could you please verify that your problem can be solved when you include https://github.com/moodleuulm/moodle-availability_role/commit/bd0cbbc51bb7817c54b06b6a0d2ee5a523405460 into your 3.1 version? Or could you just give me an updated that you have updated to 3.2/3.3/3.4 in the meantime so that I can close this ticket?

Thanks, Alex

gemguardian commented 6 years ago

Hi Alex I am not a programmer but will try to do the change.  I am still working on 3.1 Gemma

Verzonden vanaf mijn Samsung Galaxy-smartphone. -------- Oorspronkelijk bericht --------Van: Alexander Bias notifications@github.com Datum: 20-01-18 13:57 (GMT+01:00) Aan: moodleuulm/moodle-availability_role moodle-availability_role@noreply.github.com Cc: gemguardian gemma@ltnc.nl, Author author@noreply.github.com Onderwerp: Re: [moodleuulm/moodle-availability_role] V3.1-r3: error by import   when role names are changed (#8) Thank you, Antton, for pointing out the patch which Gemma is missing in the 3.1 version. Unfortunately, the fix wasn't backported to the 3.1 version anymore. Gemma, could you please verify that your problem can be solved when you include bd0cbbc into your 3.1 version? Or could you just give me an updated that you have updated to 3.2/3.3/3.4 in the meantime so that I can close this ticket? Thanks,

Alex

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/moodleuulm/moodle-availability_role","title":"moodleuulm/moodle-availability_role","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/moodleuulm/moodle-availability_role"}},"updates":{"snippets":[{"icon":"PERSON","message":"@abias in #8: Thank you, Antton, for pointing out the patch which Gemma is missing in the 3.1 version. Unfortunately, the fix wasn't backported to the 3.1 version anymore.\r\n\r\nGemma, could you please verify that your problem can be solved when you include https://github.com/moodleuulm/moodle-availability_role/commit/bd0cbbc51bb7817c54b06b6a0d2ee5a523405460 into your 3.1 version? Or could you just give me an updated that you have updated to 3.2/3.3/3.4 in the meantime so that I can close this ticket?\r\n\r\nThanks,\r\nAlex"}],"action":{"name":"View Issue","url":"https://github.com/moodleuulm/moodle-availability_role/issues/8#issuecomment-359169598"}}}

abias commented 6 years ago

Hi Gemma,

thanks for your answer. I am sorry that we can't officially offer a patched version for 3.1 anymore.

If you don't want to patch your current version, you can also use the latest version (for 3.4) and just remove one line from version.php as described on https://github.com/moodleuulm/moodle-availability_role#moodle-release-support. Aside from Behat tests (which you won't need in production), there isn't anything in the latest version which shouldn't work on 3.1 as far as I see.

Thanks, Alex

gemguardian commented 6 years ago

Thank you Alex, I will tried this out.

We will be upgrading this year though not sure when 😊

Van: Alexander Bias [mailto:notifications@github.com] Verzonden: maandag 22 januari 2018 08:01 Aan: moodleuulm/moodle-availability_role moodle-availability_role@noreply.github.com CC: gemguardian gemma@ltnc.nl; Author author@noreply.github.com Onderwerp: Re: [moodleuulm/moodle-availability_role] V3.1-r3: error by import when role names are changed (#8)

Hi Gemma,

thanks for your answer. I am sorry that we can't officially offer a patched version for 3.1 anymore.

If you don't want to patch your current version, you can also use the latest version (for 3.4) and just remove one line from version.php as described on https://github.com/moodleuulm/moodle-availability_role#moodle-release-support. Aside from Behat tests (which you won't need in production), there isn't anything in the latest version which shouldn't work on 3.1 as far as I see.

Thanks, Alex

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/moodleuulm/moodle-availability_role/issues/8#issuecomment-359340600 , or mute the thread https://github.com/notifications/unsubscribe-auth/APyvf46tSRv2FzBoRiwz5B75nbLfXYsAks5tNDI5gaJpZM4QRQtn . https://github.com/notifications/beacon/APyvfybr0WYmnP4pVcnkDK47FgFDuJMgks5tNDI5gaJpZM4QRQtn.gif

gemguardian commented 6 years ago

Hi Alex, I did what you said and it indeed fixed the issue for 3.1 and I have no other issues instead. Thank you very much.

Gemma

abias commented 6 years ago

Thanks for the positive feedback, Gemma!