Project

General

Profile

Feature #6768

When use the course direct link, allow user to login and directly go into course

Added by Hubert Borderiou almost 7 years ago. Updated about 6 years ago.

Status:
Feature implemented
Priority:
High
Assignee:
Category:
Sessions
Target version:
Start date:
11/10/2013
Due date:
% Done:

100%

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

Description

Hi,

teacher want to give to student the direct link to a course, like http://campus.chamilo.org/courses/COURSPRIVE/?id_session=0
If the course is public, the user see the course, but cannot easily login in to the course.
If the course is private, the user has an error message, and have to go to the welcome page, login and click the course direct link again.

That's why, I've modifed this behaviour, for the 1.9.6 with CAS, for the moment.

Exemple :

If you are not logged


1. The course is public


You've got a button 'Login' in the menu bar.

If you click on it, you can login and go directly to the course.


2. The course is private

If you enter the direct URL of the course, you go to this page, when you can login and go to the course (if your are register, standard warning otherwise)

(if you are not using CAS, blue line and CAS line are removed)


regards,


Related issues

Related to Chamilo LMS - Bug #7111: Error when anonymous user acces lp_viewBug resolved29/04/2014

Actions
Related to Chamilo LMS - Bug #7627: CAS : failed login after direct access to private courseNew10/04/2015

Actions
Related to Chamilo LMS - Bug #7628: CAS : failed redirection after cas loginNew10/04/2015

Actions

Associated revisions

Revision 301fb962 (diff)
Added by Hubert Borderiou over 6 years ago

Ask for login after direct link to a course - ref #6768

Revision 4405d3db (diff)
Added by Yoselyn Castillo over 6 years ago

Fixing access error messsage -refs #6768

Revision 1ff71134
Added by Yannick Warnier over 6 years ago

Merge pull request #262 from ycastillo/yoselyn.6768

Fix error page when clicking on an exercise's direct link and the exercise doesn't exist - refs #6768

Revision a8136400 (diff)
Added by Julio Montoya about 6 years ago

Fixing anonymous link + lp view error see #6768 and 7111

Revision b085adca (diff)
Added by Julio Montoya about 6 years ago

Always loading the require_uri if entering the api_not_allowed see #6768

Revision f57467a9 (diff)
Added by Julio Montoya about 6 years ago

Fixing login button see #6768

History

#1

Updated by Yannick Warnier over 6 years ago

It's great, but unless you're going to do it soon, I think it's a bit too much to include in 1.9.8...

#2

Updated by Hubert Borderiou over 6 years ago

  • Status changed from New to Needs testing
  • Assignee deleted (Hubert Borderiou)

Hi, done in
https://github.com/chamilo/chamilo-lms/commit/301fb962da7eb87ddb8eff15deee92804228fda1

You can test it creating 3 course, 1 open world, 1 open platform and 1 private.
You'll have to delete twig cache.

Open Chamilo but do not login, and paste the URL to the home course's page.
You should be able to login to the platform and go to the course, if you have the right to.

You can use CAS auth if you have one.

regards,

#3

Updated by Yannick Warnier over 6 years ago

  • Assignee set to Yoselyn Castillo
  • % Done changed from 0 to 80

Yoselyn, can you review at the web level?
I have asked Hubert to review the code itself, as there are many changes that do not comply with our (new) coding conventions, but we need to confirm it at the functional level as well.

#4

Updated by Yoselyn Castillo over 6 years ago

  • Status changed from Needs testing to Needs more info

Well, I have tried in stable.chamilo.org
I am not registered into platform
I have tried to enter in CURSO2 which is public
I´ve got inscription.php

When I clicked in login link and I´ve got login page
I logged successfully and it redirected me to main/auth/gotocourse.php

I don't get to enter this course
This think behavior is not good, after login page, if course is public or open, the user may enter the course and if course is private the user would have access to this course, otherwise he will be redirect to a login failed page
Yannick, Shall I take this or leave it to Hubert?, please let me know soon

#5

Updated by Yoselyn Castillo over 6 years ago

  • Assignee changed from Yoselyn Castillo to Yannick Warnier
#6

Updated by Yannick Warnier over 6 years ago

  • Status changed from Needs more info to Assigned
  • Assignee changed from Yannick Warnier to Yoselyn Castillo
  • Priority changed from Normal to Urgent

Yoselyn, please take it in charge. I think Hubert is busy enough with other small tasks at the moment. I need this fixed this week-end (13/04) because I want to start preparing an alpha version for next week, with all the features implemented. There are only 5-6 features left. This is one of them.

#7

Updated by Yannick Warnier over 6 years ago

Yoselyn, last chance to fix this is this Monday 14/04. If you don't, I will move it (or part of it) to 1.10.

#8

Updated by Yoselyn Castillo over 6 years ago

this feature works ok now.
When tou try to access a course through its direct link you will be conducted to inscription.php with a login link in the top right. When you click there a login form is shown. If you have the rights to access the course you will be able to enter the course.
On the other side if you try to access through inscription.php, if the exercise doesn't exist you will receive an access error. I think we need to check if exercise exists before entering it, if not user will be redirected to course home page.
https://github.com/chamilo/chamilo-lms/pull/262

#9

Updated by Yannick Warnier over 6 years ago

  • Status changed from Assigned to Feature implemented
  • % Done changed from 80 to 100

Good for me, then. Hubert, if you get a chance, please have a last look (it should be on stable.chamilo.org by now). I'm closing it for now.

#10

Updated by Julio Montoya about 6 years ago

  • Status changed from Feature implemented to Needs more info
  • Assignee changed from Yoselyn Castillo to Hubert Borderiou
  • % Done changed from 100 to 90

I applied a fix to change the behaviour of the URL returned when entering to any URL that has the api_not_allowed() page with the login form.

Example:

Before this change:

URL requested: main/work/work.php?cidReq=CLINITOS&id_session=0&gidReq=0&origin=
URL returned: courses/CLINITOS/index.php

With this change:

URL requested: main/work/work.php?cidReq=CLINITOS&id_session=0&gidReq=0&origin=
URL returned: main/work/work.php?cidReq=CLINITOS&id_session=0&gidReq=0&origin=

So I'm not sure we need that "GotoCourse" cookie.

The changes:

https://github.com/chamilo/chamilo-lms/commit/82df5fb74a002097dbfc1028f63c61bafe8d8a06
https://github.com/chamilo/chamilo-lms/commit/9b1ddc01c432d62d3530a5821db32e8ed4934eba

#12

Updated by Yannick Warnier about 6 years ago

  • Status changed from Needs more info to Needs testing
  • Assignee deleted (Hubert Borderiou)
  • Priority changed from Urgent to High
#13

Updated by Hubert Borderiou about 6 years ago

Hi, there are 5 cases, depending of the course mode
Public, Open, Private, Close, Invisible

Public course

OK

Open course

- OK, I can login to enter the course

- but there is the "Login" button at the upper right of the blue area, it has to be removed

- If I click to "Page d'accueil" it does nothing, I should go to the home page

Private course - Closed course - Invisible course

- OK if I have the right to enter the course, I go in it

- If I haven't the right to enter the course (not registerd in the course User tool) I'm stuck in the page bellow, it does nothing if I click on a button (whatever the button I click)

- We should remove the "Login" button

- If I click to "Page d'accueil" it does nothing, I should go to the home page

#14

Updated by Yannick Warnier about 6 years ago

  • Status changed from Needs testing to Assigned
  • Assignee set to Julio Montoya
#15

Updated by Julio Montoya about 6 years ago

  • Assignee changed from Julio Montoya to Hubert Borderiou

I fixed the first error, I can't reproduce the error when using "Private course - Closed course - Invisible course".
Could you give it a try in stable.chamilo.org?

#16

Updated by Hubert Borderiou about 6 years ago

  • Status changed from Assigned to Feature implemented
  • Assignee deleted (Hubert Borderiou)

testeado y aprobado

Hice el test en stable.chamilo.org, todo funciona muy bien.

Es perfecto para mi, aun no he hecho el test en CAS en stable.chamilo.org

Saludos desde Grenoble.

(merci Ivan pour l'espagnol :) )

#17

Updated by Yannick Warnier about 6 years ago

  • Assignee set to Julio Montoya
  • % Done changed from 90 to 100

comment il se la pète :-)

#18

Updated by Hubert Borderiou about 6 years ago

;)

Also available in: Atom PDF