- Posts: 7
[Solved] Request UserType
- Guayo Mena
- Topic Author
- Offline
- New Member
-
Less
More
13 years 1 month ago - 13 years 3 weeks ago #1
by Guayo Mena
[Solved] Request UserType was created by Guayo Mena
Hello
I'd like to display some modules only for teachers.
I want to make something like this
<?php if ($userType=="teacher"): ?>
display module
<?php endif; ?>
So, how do I get that $userType value from joomdle?
Thanks in advance
BTW, I'm using joomdle 0.82, joomla 2.5 and Moodle 2.3.2+ (Build: 20120927)
I'd like to display some modules only for teachers.
I want to make something like this
<?php if ($userType=="teacher"): ?>
display module
<?php endif; ?>
So, how do I get that $userType value from joomdle?
Thanks in advance
BTW, I'm using joomdle 0.82, joomla 2.5 and Moodle 2.3.2+ (Build: 20120927)
Last edit: 13 years 3 weeks ago by Antonio Durán.
The topic has been locked.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7902
13 years 1 month ago #2
by Antonio Durán
Replied by Antonio Durán on topic Request UserType
There is no such thing as usertype=teacher.
You could try using the joomla groups integration to put teachers in the "teachers" joomla group, and then publish the modules for teachers only.
You could try using the joomla groups integration to put teachers in the "teachers" joomla group, and then publish the modules for teachers only.
The topic has been locked.
- Chris
-
- Offline
- Moderator
-
13 years 1 month ago #3
by Chris
Replied by Chris on topic Request UserType
Also, you may wish to look at specific 3rd party extensions such as metamod. With metamod you can write conditions, I believe groups / profiletypes should be ok, that will display or hide modules.
The topic has been locked.
- Guayo Mena
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 7
13 years 1 month ago #4
by Guayo Mena
Replied by Guayo Mena on topic Request UserType
Thanks for both answers. I'll come back and share which of both methods worked better.
The topic has been locked.
- Guayo Mena
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 7
13 years 3 weeks ago - 13 years 3 weeks ago #5
by Guayo Mena
Replied by Guayo Mena on topic Request UserType
Metamod didn't work for what I was trying.
I created different custom user groups and access levels and made different modules for each one, as Antonio suggested. It works great.
Thanks
I created different custom user groups and access levels and made different modules for each one, as Antonio suggested. It works great.
Thanks
Last edit: 13 years 3 weeks ago by Guayo Mena. Reason: typo
The topic has been locked.