Project

General

Profile

Bug #4651

Denied access in documents tool in student view mode

Added by Julio Bonifacio Aliaga about 8 years ago. Updated almost 8 years ago.

Status:
Rejected - Abandoned
Priority:
Normal
Assignee:
Julio Bonifacio Aliaga
Category:
-
Target version:
Start date:
25/04/2012
Due date:
% Done:

30%

Estimated time:
0.50 h
Spent time:
Complexity:
Normal
SCRUM pts - complexity:
5

Description

When using "View as student" (but registered as portal admin and teacher of the course), when I enter the documents tool (made invisible but still available through a link on another icon), I get a message saying I am not allowed: "Lo sentimos, no le está permitido acceder a esta página o su conexión ha caducado. Para volver a la página anterior pulse el enlace inferior o haga clic en el botón "Atrás" de su navegador.".

This happens when no document or directory is visible, but it also happens when I make the "Images" directory visible.


Files

learner_view.png (22.4 KB) learner_view.png Julio Montoya, 08/06/2012 12:38
admin.png (166 KB) admin.png Julio Montoya, 08/06/2012 12:38

History

#1

Updated by Julio Bonifacio Aliaga about 8 years ago

  • % Done changed from 0 to 10

When making the documents tool icon visible, it is OK (the student view shows the Images directory in the documents listing - no error message). This behaviour is wrong, as hiding the documents tool should have no impact on accessing it (it only hides the icon). -- Yannick_ (using Julio B's account)

#2

Updated by Julio Bonifacio Aliaga about 8 years ago

We tried the exercises tool, and its behaviour is good: when hidden, it is still accessible. Good. Only the documents tool is failing.

#3

Updated by Julio Bonifacio Aliaga about 8 years ago

  • % Done changed from 10 to 30

The problem is at line 346 of document.php:

if ($tool_visibility == '0' && $to_group_id == '0' && !($is_allowed_to_edit || $group_member_with_upload_rights)) {
  api_not_allowed(true);
}

At line 345, the condition on tool_visibility == 0 is breaking the idea of being able to access the course. As the check is also on $to_group_id, we assume it is meant to be related to groups. Is there a reason for this condition? Could we remove it if it has nothing to do with groups?

#4

Updated by Yannick Warnier about 8 years ago

  • Assignee set to Julio Montoya
#5

Updated by Yannick Warnier about 8 years ago

  • Target version changed from 1.9 Beta to 1.9 RC1
#6

Updated by Julio Montoya about 8 years ago

I can't reproduce the bug, maybe it was already fixed?

login as an admin/teacher all docs are invisible

login as an admin/teacher I clicked in the learner view

also when loading as a real student, he can access the document tool

#7

Updated by Yannick Warnier almost 8 years ago

  • Status changed from Needs more info to Rejected - Abandoned

The problem seems to have disappeared, indeed.

Also available in: Atom PDF