Project

General

Profile

Bug #4676

HRM : accessibility of the data

Added by Marko Kastelic over 7 years ago. Updated about 7 years ago.

Status:
Bug resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
27/04/2012
Due date:
% Done:

80%

Estimated time:
Spent time:
Complexity:
Normal
SCRUM pts - complexity:
?

Description

a) overview page of HRM users does not supply correct data for the test score (no score at all?)
b) HRM user cannot access to users details from learners list (with message No data available. But data can be accessed from reporting for both : teacher and user. and admin too.

Associated revisions

Revision 211f2b79 (diff)
Added by Julio Montoya about 7 years ago

drh role can access the exercise reports see #4676

Revision 20548e67 (diff)
Added by Julio Montoya about 7 years ago

Adding some fixes for the drh role see #4676

History

#1

Updated by Marko Kastelic over 7 years ago

little update for the item b)
HRM user CAN access user data from specific course if this specific course is assigned to HRM user.
From here: Time spent in the course for any course user shows 0 (i spent at least 5 minutes for viewing documents, solving tests, ...), All attempts from the user course returns empty list (at least 2 attempts)

The logic is a king of ... distorted:
if i (as hrm) want to follow the user, i have to be registered to all the courses that user is assigned or i can't get the user's info for that courses. If the user enrolls new course later, i got a problem. Admin, do it for me please .. Whaw. Let me see : i want to follow progress/work for the little gropu of 6 users, each enrolled for 6 courses, let's take half of them overlaping, remains 18 courses which i'm assigned in. First off all, if there is a need to assign HRM to the course (to see course content which is desirable, but can be done through 'borrowing' student identity too), that should be done automaticaly when the user is assigned to HRM (and if user is already assigned to HRM, when the user is enrolled to the new course) and for the second, those 'watched' courses could be labeled as watched in the 'my courses' list or even removed from there. Access to the those courses can be done from reporting -- user list -- user -- course following the logic : user X, where are his/her weakness ? which course ? what's there ?

sorry for this long (second) post,

#2

Updated by Marko Kastelic over 7 years ago

HRM role : admin, but view only

add hrm for single quiz view : exercice_show.php

1) add hrm role :
line 69 :
from:

$is_allowedToEdit    = api_is_allowed_to_edit(null,true) || $is_courseTutor || api_is_session_admin()

to:
$is_allowedToEdit    = api_is_allowed_to_edit(null,true) || $is_courseTutor || api_is_session_admin() || api_is_drh();

2) disable comments by removing link
somewhere near line 495:

    if ($show_results) {            

        echo '<table width="100%" border="0" cellspacing="3" cellpadding="0">';
        // if ($is_allowedToEdit )
        if ($is_allowedToEdit && !api_is_drh() ) {
            echo '<tr><td>';
            $name = "fckdiv".$questionId;

for the quiz reports HRM role has to be added to the
main/exercise: exercise.lib.php, exercise_report.php,
main/inc/ajax/model.ajax.php

#3

Updated by Marko Kastelic over 7 years ago

model.ajax.php
somewhere around line 190:

//used inside get_exam_results_data()
        $documentPath                = api_get_path(SYS_COURSE_PATH) . $course['path'] . "/document";         
        if ($is_allowedToEdit || $is_tutor  ) {
            $columns = array('firstname', 'lastname', 'username', 'group_name', 'exe_duration', 'start_date', 'exe_date', 'score','status','actions');

change if to add hrm role:
if ($is_allowedToEdit || $is_tutor || api_is_drh() ) {

#4

Updated by Marko Kastelic over 7 years ago

exercise.lib.php
modificatation to the method get_exam_results_data
(line 810)
from:

$is_allowedToEdit           = api_is_allowed_to_edit(null,true);

to
$is_allowedToEdit           = api_is_allowed_to_edit(null,true) || api_is_drh();

#5

Updated by Marko Kastelic over 7 years ago

for the exercise_report.php

- enable export for hrm (line 76)

    if (api_is_platform_admin() || api_is_course_admin() || api_is_course_tutor() || api_is_course_coach() || api_is_drh() )

- toolbars ( line 216)
// removed livestats link for the HRM

if (($is_allowedToEdit || api_is_drh() )&& $origin != 'learnpath') {
    // the form - back&stats&export
    if (api_is_platform_admin() || api_is_course_admin() || api_is_course_tutor() || api_is_course_coach() ) {        
        $actions .= '<a href="admin.php?exerciseId='.intval($_GET['exerciseId']).'">' . Display :: return_icon('back.png', get_lang('GoBackToQuestionList'),'',ICON_SIZE_MEDIUM).'</a>';        
        $actions .='<a href="live_stats.php?' . api_get_cidreq() . '&exerciseId='.$exercise_id.'">'.Display :: return_icon('activity_monitor.png', get_lang('LiveResults'),'',ICON_SIZE_MEDIUM).'</a>';

        $actions .= '<a id="export_opener" href="'.api_get_self().'?export_report=1&hotpotato_name='.Security::remove_XSS($_GET['path']).'&exerciseId='.intval($_GET['exerciseId']).'" >'.
                     Display::return_icon('save.png',   get_lang('Export'),'',ICON_SIZE_MEDIUM).'</a>';          
    }
    else 
      if ( api_is_drh() ){
           $actions .= '<a onclick="window.back();">' . Display :: return_icon('back.png', get_lang('GoBackToQuestionList'),'',ICON_SIZE_MEDIUM).'</a>';
           $actions .= '<a id="export_opener" href="'.api_get_self().'?export_report=1&hotpotato_name='.Security::remove_XSS($_GET['path']).'&exerciseId='.intval($_GET['exerciseId']).'" >'.
                     Display::return_icon('save.png',   get_lang('Export'),'',ICON_SIZE_MEDIUM).'</a>';
       }
       else {
         $actions .= '<a href="exercice.php">' . Display :: return_icon('back.png', get_lang('GoBackToQuestionList'),'',ICON_SIZE_MEDIUM).'</a>';
}}

as for back links : origin changes from admin to myspace, and i believe, there are at least to 2 entry points to this script, depend on role. I suggest to use window.back() as i do for hrm

-- for the model (line 341)

if ($is_allowedToEdit || $is_tutor || api_is_drh() ) {

    //The order is important you need to check the the $column variable in the model.ajax.php file 
    $columns        = array(get_lang('FirstName'), get_lang('LastName'), get_lang('LoginName'),

-- jquery function (line 454)

$(function() {    
    <?php 
        echo Display::grid_js('results', $url,$columns,$column_model, $extra_params, array(), $action_links, true);      

    if ($is_allowedToEdit || $is_tutor || api_is_drh() ) { ?>       

        //setSearchSelect("status");

--- check code at line 248 / if the access change is needed

if ($is_allowedToEdit || $is_tutor  ) {
    $nameTools = get_lang('StudentScore');
    $interbreadcrumb[] = array("url" => "exercice.php?gradebook=$gradebook","name" => get_lang('Exercices'));
    $objExerciseTmp = new Exercise();      
    if ($objExerciseTmp->read($exercise_id)) {
        $interbreadcrumb[] = array("url" => "admin.php?exerciseId=".$exercise_id, "name" => $objExerciseTmp->name);    
    }    
} else {    
    $interbreadcrumb[] = array("url" => "exercice.php?gradebook=$gradebook","name" => get_lang('Exercices'));
    $objExerciseTmp = new Exercise();        
    if ($objExerciseTmp->read($exercise_id)) {
        $nameTools = get_lang('Results').': '.$objExerciseTmp->name; 
    }
}

#6

Updated by Marko Kastelic over 7 years ago

note:
main/work/work.php
hrm does not have access to the list of submitted assignemt of the 'tracked' user
(discussion: since hrm cannot enroll the course, cannot post the assignment(see below), we could give him/her RO access to the course or even download access to the submitted document as: let me see your work)
edit: uploading for the hrm is currently possible !!!
edit 2: work.lib.php - add access as teacher, than change query to select only those, that are tracked by current hrm user (user_rel_user: relation type = 7 && friend_user_id = current_usr_id )
edit3: useless- the role inside the course isn't specified strict enought

#7

Updated by Yannick Warnier over 7 years ago

  • Target version set to 1.9 RC1
#8

Updated by Julio Montoya about 7 years ago

  • Status changed from New to Assigned
  • Assignee set to Julio Montoya
#9

Updated by Julio Montoya about 7 years ago

  • % Done changed from 0 to 60

I added part of the code and some variations so the drh have access to the exercise show and exercise_reports

#10

Updated by Julio Montoya about 7 years ago

  • Status changed from Assigned to Needs more info
  • Assignee deleted (Julio Montoya)
#11

Updated by Marko Kastelic about 7 years ago

good for start. Just few points to highlite:

reporting -> overview -> followed courses : shows 20 (total number of courses on the platform)

reporting : 2 sections are present (overview, learners), 2 sections are missing (courses, sessions)

existing reports are looking ok for now, access to results of the tests is ok too.

for those below i only guessing:
- dhr should not be able to execute any test
- drh should be able to access the course even when this course is closed.

#12

Updated by Marko Kastelic about 7 years ago

  • Assignee set to Julio Montoya
#13

Updated by Julio Montoya about 7 years ago

  • Assignee deleted (Julio Montoya)

There are some problems with this role:

We can assign users, courses and sessions to a drh user. That's ok.

But you can have access to all the courses of a student if you are assign to this user.
So what's going to be the real number of "Followed courses"?

Maybe just removing that overview for drh?

#14

Updated by Marko Kastelic about 7 years ago

  • Assignee set to Yannick Warnier

i mentioned before, that the role of the hrm/drh isn't defined strict enough.

in short:

hrm/drh : follow users (not other organisational units)
assign course/class/... to the hrm is just mass assigning (all learners from the course)

from the hrm view, i want to see what 'my' user is doing, how's he/she progressing, success and progress compared to others in the group(class/course/..), strengths, weaknesses, ... this is very near to the individual teacher role : as for course resources access as for reporting, but no writing rights (better: reports as seen as a teacher, course resources access as student with no write access)

for those, home of the hrm/drh need to be changed; there should not be 'my courses' (), but 'tracked' users, that can be
grouped by (hm?????) ... maybe admin/or session admin inteface with users/courses/session isn't a bad idea ?

since it is a primary goal to 'track' users, i would suggest that the access to the course/session resources/tools is strictly done trough the user selection; as sequence: list of users - select user - report - link to course resources

and btw:
  • one would wish to 'track' teachers too (there should be no problem)
  • single user 'tracking' : gain support for 'parents' in primary & secondary education
  • multirole for hrm/drh : as teacher : could be teacher or learner, why drh cannot be drh+learner+teacher if we solve a conflict of interest

this is just my point of view. Assigning this to Yannick for now.

#15

Updated by Yannick Warnier about 7 years ago

  • Status changed from Needs more info to Assigned

I agree we need to define it more. I suggest we move it to the next version for now as, clearly, we don't have hands enough to manage this for this release (only 3-4 days left for 88 issues).
As it is now, very little users use it (probably because of the problems you mention) so it will not be a problem not to improve it straight away.http://www.upc.edu.pe/

Julio, about:

But you can have access to all the courses of a student if you are assign to this user.

This should actually be the case. The original intention of this role was to be able to review everything the student has done (but not change anything), so I'm kind of surprised that it doesn't work anymore.

I'll try to do something about this "course access" problem this week-end, otherwise I'll move it to 1.9.2

#16

Updated by Yannick Warnier about 7 years ago

Yannick Warnier wrote:

Julio, about:

But you can have access to all the courses of a student if you are assign to this user.

This should actually be the case. The original intention of this role was to be able to review everything the student has done (but not change anything), so I'm kind of surprised that it doesn't work anymore.

:-o, I read too fast. You can have access, yes. We agree then.

#17

Updated by Yannick Warnier about 7 years ago

  • Assignee changed from Yannick Warnier to Julio Montoya

reporting -> overview -> followed courses : shows 20 (total number of courses on the platform)

That should be the number of courses directly assigned (and not the total number of courses to which he has access indirectly). The courses that appear in the reporting are those directly assigned. The other ones are courses to which the DRH can access but he can't view the results of these courses in the Dashboard tab (not either in the reporting tab). That's not because we want to "hide" it from him, it's just because that's not the job of this DRH to track the progress of the course itself.

In that sense, it goes against the idea of Marko of making the DRH able to compare the results of his student against others, but that's just because nobody assigned the course to him. If the global administrator wants him to be able to compare to other students, he should assign the course to the DRH.

reporting : 2 sections are present (overview, learners), 2 sections are missing (courses, sessions)

OK, I guess we can add those sections in the global reporting tab. That's common sense.

existing reports are looking ok for now, access to results of the tests is ok too.

for those below i only guessing:
- dhr should not be able to execute any test

Correct (read-only access)

- drh should be able to access the course even when this course is closed.

I don't agree with that, but I think there is a nuance. A closed course is normally a course in maintenance. An "expired" course is a course inside a session that has expired. If people want to "expire" courses, they should use the sessions, and not close the courses.

Julio, I'm letting you add the reporting for the DRH and change the total number of courses in the dashboard plugin. Afterwards thsis task should be closed and Marko, please transfer the remaining discussion to a new task for 1.9.2. Everybody agrees that way?

#18

Updated by Marko Kastelic about 7 years ago

ok for me ...

#19

Updated by Julio Montoya about 7 years ago

  • Status changed from Assigned to Needs testing
  • Assignee deleted (Julio Montoya)
  • % Done changed from 60 to 80

fixed added

#20

Updated by Yannick Warnier about 7 years ago

  • Target version changed from 1.9 RC1 to 1.9 Stable

Code looks good to me. Could be closed but I'd like to have Marko's opinion. Moving the goal to stable.

#21

Updated by Yannick Warnier about 7 years ago

  • Status changed from Needs testing to Bug resolved
  • Assignee set to Julio Montoya

Assuming OK

Also available in: Atom PDF