It's slightly more subtle...
Actually, with the update I suggested yesterday, I could no longer log in
directly as the WebPA admin...
I now have the code below in includes/classes/class_engcis.php, in function
get_user.
It seems to work all right.
I hope that a WebPA V2 developer will look into this and will check whether
a better solution is possible.
Should I report the two problems (this one and the one about submitted / not
submitted) in the sourceforge bugtracker?
René.
} else { // else, just return one row
$sql = "SELECT u.*, um.user_type
FROM " . APP__DB_TABLE_PREFIX . "user u LEFT OUTER JOIN " .
APP__DB_TABLE_PREFIX . "user_module um ON u.user_id = um.user_id
WHERE (u.user_id IN {$user_set}) AND (um.module_id =
{$_module_id})
LIMIT 1";
if (($result = $this->_DAO->fetch_row($sql))) return $result;
$sql = "SELECT u.*, um.user_type
FROM " . APP__DB_TABLE_PREFIX . "user u LEFT OUTER JOIN " .
APP__DB_TABLE_PREFIX . "user_module um ON u.user_id = um.user_id
WHERE (u.user_id IN {$user_set})
LIMIT 1";
return $this->_DAO->fetch_row($sql);
}
----- Original Message -----
From: "René Haentjens" <[log in to unmask]>
To: "WebPA" <[log in to unmask]>
Sent: Wednesday, September 05, 2012 3:20 PM
Subject: WebPA2: Tutor/Student confusion when user has different roles in
two modules
> Could it be that in includes/classes/class_engcis.php, in function
> get_user, second case, where $user_id is not an array,
> WHERE (u.user_id IN {$user_set})
> should be completed as:
> WHERE (u.user_id IN {$user_set}) AND (um.module_id = {$_module_id})
> just like in the first case?
>
> René.
> ----- Original Message -----
> From: "René Haentjens" <[log in to unmask]>
> To: "WebPA" <[log in to unmask]>
> Sent: Wednesday, September 05, 2012 11:18 AM
> Subject: Re: UGent WebPA2 questions
>
>
>> "a user can be a tutor in one module and a student in another" - indeed
>> what I thought I had read about V2 and data can be entered into WebPA2 in
>> that way.
>>
>> So the bug is a bug? Depending on the order of the module_id's, not
>> depending on the currently selected module, the user gets different
>> functionality...
>>
>> René.
>>
>> ----- Original Message -----
>> From: "Stephen P Vickers" <[log in to unmask]>
>> To: <[log in to unmask]>
>> Sent: Wednesday, September 05, 2012 11:11 AM
>> Subject: Re: UGent WebPA2 questions
>>
>>
>>>I should also have said in my previous message that the student/tutor
>>>roles in WebPA 2 are per module - a user can be a tutor in one module and
>>>a student in another. The administrator role is system-wide, and
>>>administrators cannot be enrolled in modules - it is an entirely separate
>>>and distinct role.
>>>
>>> Stephen
>>>
>>> On 05/09/2012 09:58, Stephen P Vickers wrote:
>>>> In WebPA 2 a user is either a student, a tutor or an administrator;
>>>> they
>>>> cannot have more than one role. Whilst the menu may provide "Admin"
>>>> options, this does not mean that the user is an administrator in the
>>>> technical sense of the system definition of roles. Tutors have limited
>>>> "admin" rights over the currently selected module.
>>>>
>>>> For LTI integrations I think it would be useful to define administrator
>>>> roles which can manage just the data from that integration, but at
>>>> present administrators are system-wide.
>>>>
>>>> Hope that helps to clarify.
>>>>
>>>> Stephen
>>>>
>>>> On 05/09/2012 09:32, René Haentjens wrote:
>>>>> Although I called them typo's, they do break functionality!
>>>>> I've reported them on sourceforge.
>>>>>
>>>>> This is probably also a bug, I'll try to find it in the code:
>>>>>
>>>>> If a user is student in module 3 and tutor in module 4, he does not
>>>>> have
>>>>> Admin functions in the menu, regardless of what module he selected. If
>>>>> the
>>>>> same user is tutor in module 3 and student in module 4, he has Admin
>>>>> functions in the menu, regardless of what module he selected.
>>>>>
>>>>> René.
>>>>>
>>>>> ----- Original Message ----- From: "Stephen P Vickers"
>>>>> <[log in to unmask]>
>>>>> To: <[log in to unmask]>
>>>>> Sent: Tuesday, September 04, 2012 4:46 PM
>>>>> Subject: Re: UGent WebPA2 questions
>>>>>
>>>>>
>>>>>> On 04/09/2012 15:35, René Haentjens wrote:
>>>>>>> ...We discovered a couple of typo's in the includes/requires...
>>>>>>
>>>>>> With any bugs, my personal recommendation would be to report them in
>>>>>> which
>>>>>> ever way is easiest for you to ensure that other users find out about
>>>>>> them
>>>>>> ASAP. But in the end they need to find their way into the bug
>>>>>> tracker
>>>>>> list on sourceforge (https://sourceforge.net/projects/webpa/) which I
>>>>>> believe is the official channel for notifying the project team. I
>>>>>> reported one there earlier today. I suspect most members of this
>>>>>> list
>>>>>> are
>>>>>> likely to be only interested in issues of functionality and not
>>>>>> syntax
>>>>>> errors!
>>>>>>
>>>>>> Stephen
>>>>>>
>>>
>>
>
|