Perfect. Thank you Stuart! I knew it had to be there! Doug
Douglas Mills Director of Instructional Technology Department of Chemistry University of Illinois On 10/1/18, 3:26 PM, "LON-CAPA-users on behalf of Raeburn, Stuart" <lon-capa-users-boun...@mail.lon-capa.org on behalf of raeb...@msu.edu> wrote: Doug, In a script block use: $role = &EXT('user.role.value'); $extent = &EXT('user.role.extent'); where $role would be: cc, ta, st etc., and $extent would be: /<domain>/<num>, with /<section> appended, if the user's current role had a section, where <domain> is course's domain, <num> is course number. e.g., 7k12240ee787451eauiucl1, and <section> is the section. Note: if the user's current role is a custom role, $role would be of the form: cr/<domain>/<username>/<rolename> where <domain> and <username> are the domain and username of the user who defined the custom role, and <rolename> is the name of the customrole. Stuart Raeburn LON-CAPA Academic Consortium ________________________________________ From: LON-CAPA-users <lon-capa-users-boun...@mail.lon-capa.org> on behalf of Mills, Douglas G <dmi...@illinois.edu> Sent: Monday, October 1, 2018 3:36 PM To: Discussion list for LON-CAPA users Cc: Mills, Douglas G Subject: [LON-CAPA-users] how to access user's role? Hi All, Recently I learned how to find out if a user is a member of a group or not and that has been very useful for us. Now I'm wondering if there is a way to determine a user's role? Specifically, we have a resource that we're blocking access to on a per section password basis (we're not using slots but rather a stringresponse where the answer is determined by which section the user is in). The TA is going to give that password to the students who come to class to participate (and yes, a student could text the password to a student who is not there -- we'll have our eyes open for absent students working on the assignment for now...) What I would like to do is to display the password to the TA. Instructorcomment would be perfect for this, except that they do not display to the Teaching Assistant role. Is there a corresponding <tacomment> or something? Otherwise, I'm thinking that if the "role" information is available as section and group and lots of other information is, I can just w rap the display of the password up in block tags which will have as their condition that the role eq "Teaching Assistant" I've tried &EXT("user.course.role") so far with no success. Thanks as always! Doug Douglas Mills Director of Instructional Technology Department of Chemistry University of Illinois _______________________________________________ LON-CAPA-users mailing list LON-CAPA-users@mail.lon-capa.org http://mail.lon-capa.org/mailman/listinfo/lon-capa-users _______________________________________________ LON-CAPA-users mailing list LON-CAPA-users@mail.lon-capa.org http://mail.lon-capa.org/mailman/listinfo/lon-capa-users