Project

General

Profile

Bug #7776

[1.9.10.x] Can create and work in a course for a non existant session

Added by Hubert Borderiou about 4 years ago. Updated almost 4 years ago.

Status:
Bug resolved
Priority:
Normal
Assignee:
Category:
Sessions
Target version:
Start date:
15/07/2015
Due date:
% Done:

100%

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

Description

Hi,
ever student or tutor or teacher
I go to a course homepage URL
http://chamilodev.fr/chamilo19102hub/courses/TESTSIMSU001/index.php?id_session=0

This is the genuine URL of the course, thaht's fine.

I can go to URL in session, for exemple, 1999 (that does not exists)

http://chamilodev.fr/chamilo19102hub/courses/TESTSIMSU001/index.php?id_session=1999
....................................................................^^^^^^^^^^^^^^^

Each datas I write in this course will be written in the database for session 1999 (that doesn't exists)
In the group tool with documents allowed, for exemple, I can create or upload documents thaht will be only visible for me (or people who know the URL ?id_session=1999)

quite tricky...

Associated revisions

Revision 08cfb03f (diff)
Added by Julio Montoya about 4 years ago

api_not_allowed(true); if session doesn't exist see #7776

Revision 2a79af92 (diff)
Added by Julio Montoya about 4 years ago

Fix lang var when api_not allowed see #7776

History

#1

Updated by Julio Montoya about 4 years ago

I can confirm this bug.
I just applied a fix.
If session does not exist then there's a api_not_allowed() fired.

#2

Updated by Julio Montoya about 4 years ago

  • Status changed from New to Needs more info
#3

Updated by Yannick Warnier about 4 years ago

  • Status changed from Needs more info to Assigned

I just checked and the commit is into 1.10.x, so I tested it. It's fine, but for some reason when the api_not_allowed page appears, translations are not working. For example, if I'm in a course in Spanish, all variables appear as NotAllowedClickBack etc (including the main menu).

Apparently, this is due to the fact that the api_not_allowed() is triggered too soon in the local.inc.php process. Maybe save this message for later or force it to English.

#4

Updated by Yannick Warnier about 4 years ago

  • Assignee set to Julio Montoya
  • % Done changed from 0 to 50
#5

Updated by Julio Montoya about 4 years ago

  • Status changed from Assigned to Needs testing

Should be fixed now.

#6

Updated by Julio Montoya about 4 years ago

  • Assignee changed from Julio Montoya to Yannick Warnier
#7

Updated by Yannick Warnier about 4 years ago

  • Status changed from Needs testing to Bug resolved
  • Assignee changed from Yannick Warnier to Julio Montoya
  • % Done changed from 50 to 100

Tested and approved

#8

Updated by Yannick Warnier almost 4 years ago

This required changes in the order of languages and local.inc.php loading, which provoked an issue in the loading of languages. We're working on this #7882

Also available in: Atom PDF