Forums | Mahara Community

Developers /
Mahara Themes and Institutions


anonymous profile picture
Account deleted
Posts: 8

21 May 2012, 7:18

Hello everyone,

I would like to use several Institutions and Institution themes in Mahara, allowing for a user to be a member of more than one Institution and when logged in from Moodle seeing the Institution theme depending on the Moodle theme the user comes from.
We use Moodle version: 1.9.4  and Mahara 1.4.1 version. 
  1. We use Mahoodle integration in our platform we want to make some changes in the code. 
  2. We have several themes in Moodle and several Institutions in Mahara. When the user comes from Moodle we use a variable in which the current Moodle theme is placed. 
    1. Then when the user is redirect to Mahara from Moodle over jump.php and land.php the variable is transported via url and that variable arrives in Mahara.
      1. For example if the user has 'test' theme variable in Moodle, the user becomes a member of 'test' Institution in Mahara (if he isn't member already). This code I have written and it works perfectly.
    2. But what I want to do now is to set default theme in 'test' institution to be 'test' theme, and I want the user who comes from Moodle with 'test' theme I want that user (a in 2.1.1 above) ALSO to see 'test' theme of that Instituion in Mahara. See alternative explanation below.
    3. However this doesn't work in Mahara when the user is a member of MORE INSTITUTIONS THAN ONE. 

What could I do in order for that (2.2 above) to work? Any idea is warmly welcome.
I am aware that this is not possible with existing default features in Mahara, so I am looking for a way to tweak the code. 

 

Alternative explanation:
Variables X, Y and Z
X = 'name of one theme' Y = 'name of another theme' Z = 'the user who is authenticated in Moodle'
When user Z is logged in Moodle he sees X theme - When user Z is logged in Mahara he becomes a member of X Institution and sees X theme. When user Z is logged in Moodle he sees Y theme - When user Z is logged in Mahara he becomes a member of Y institution and sees Y theme.
Kristina Hoeppner's profile picture
Posts: 4729

21 May 2012, 16:30

Hello Ilce,

There aren't code tweaks that I can suggest, but it would be great if your tweak of setting a theme for a user when they are in multiple institutions instead of choosing one more or less at random would become part of core Mahara. Wink

Just a quick question: Why do your users need to be members of multiple institutions?

Cheers

Kristina

anonymous profile picture
Account deleted
Posts: 8

22 May 2012, 1:43

Hello Kristina,

Thank you for response,  but how I've said, I need code correction maybe some new functions in Mahara's php scripts, or some changes in jum.php and land.php, that is my point. And about your quick question my answer is: My client wants that, I have to adapt :)

Best Regards,

Ilche 

Kristina Hoeppner's profile picture
Posts: 4729

23 May 2012, 4:40

Hello Ilche,

Thanks. I was just asking in case there were another way of doing it with the current functionalities. Sorry, but I can't help you with any coding. Hoepfully, somebody else can.

Cheers

Kristina

4 results