Anybody have a way of Identifying a users type and version of browser they are using within moodle?
John
Do you have access to your web server logs? These will give you all the info you need about client browsers...
and we are logging this in the server logs now, so we have that at least.
Not sure if there is anything built into Moodle, but you could either do it using javascript or PHP, see the following...
Javascript:
http://www.quirksmode.org/js/detect.html
PHP:
http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/
Other solutions include using jQuery (Javascript), HTML conditional comments and even pure CSS (using hacks such as adding a * before the selector).
Javascript:
http://www.quirksmode.org/js/detect.html
PHP:
http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/
Other solutions include using jQuery (Javascript), HTML conditional comments and even pure CSS (using hacks such as adding a * before the selector).
As a matter of interest... why would you want to do such a thing (in a Moodle context anyway)?
Oh, forgot you wanted the users type too. I use seperate authentication plugins for this.
So for example... We use LDAP authentication for both teachers and students, to identify who is a teacher and who is a student I have an LDAP Auth plugin called "ldap" (the original plugin) looking at certain OU's in our Active Directory and one called "ldapstaff" (a copy of the original) looking at different OU's.
When I need to identify one type of user from the other (e.g. on the My Moodle page to display different/relavent info) I use...
if ($USER->auth == 'ldap') {
// Do something for students...
} else if ($USER->auth == 'ldapstaff') {
// Do something for staff...
}
Howard: I was wondering that too, especially in the context of this forum as the only answers I can give would be better suited to the General Developers forum (sorry).
So for example... We use LDAP authentication for both teachers and students, to identify who is a teacher and who is a student I have an LDAP Auth plugin called "ldap" (the original plugin) looking at certain OU's in our Active Directory and one called "ldapstaff" (a copy of the original) looking at different OU's.
When I need to identify one type of user from the other (e.g. on the My Moodle page to display different/relavent info) I use...
if ($USER->auth == 'ldap') {
// Do something for students...
} else if ($USER->auth == 'ldapstaff') {
// Do something for staff...
}
Howard: I was wondering that too, especially in the context of this forum as the only answers I can give would be better suited to the General Developers forum (sorry).
Not to worried about the forum... just wondered what is at the bottom of this. It's a very specific request and, I suspect, may lead to something truly terrible
We have had problems with the quiz module in secure mode and users using different browsers. I want a way to know which user was using what browser so I could identify the troublesome ones. I was hoping for a in Moodle solution.
The web server logs are probably the way to go.
The BEST advice is probably to find a way not to have to use quiz secure mode, however. That's never going to be entirely satisfactory. Unfortunately, that usually entails committing a large chunk of your life to writing hundreds of questions (you can always get the students to write them for you though!!).
If you get some useful data don't forget to let us know
The BEST advice is probably to find a way not to have to use quiz secure mode, however. That's never going to be entirely satisfactory. Unfortunately, that usually entails committing a large chunk of your life to writing hundreds of questions (you can always get the students to write them for you though!!).
If you get some useful data don't forget to let us know