Project

General

Profile

Feature #4200

Courses catalogue as block on homepage

Added by Yannick Warnier over 7 years ago. Updated over 7 years ago.

Status:
Feature implemented
Priority:
Normal
Category:
-
Target version:
Start date:
23/12/2011
Due date:
% Done:

100%

Estimated time:
2.00 h
Spent time:
Complexity:
Easy
SCRUM pts - complexity:
?

Description

This task is related to #4191 in that it would be better to implement it after #4191 is ready.

In short, show a block on the homepage (index.php) with the 6 hottest courses in the course catalogue, public or open (=super public).

If the course is public, show the description button.
If the course is open, also show a "Go to course" button.

The block should be optional and the admin should be able to remove it from the "homepage edition" page, but for new installations, it should be enabled by default.

The appearance can be exactly the same as the little course blocks in the catalogue.


Files

chamilo-home-course-blocks.png (13.5 KB) chamilo-home-course-blocks.png Yannick Warnier, 28/12/2011 01:21
catalogo-portada.png (14.5 KB) catalogo-portada.png Michela Mosquera, 20/05/2012 03:05

Related issues

Related to Chamilo LMS - Feature #4191: Courses analytics catalogFeature implemented22/12/2011

Actions

Associated revisions

Revision 385ab791 (diff)
Added by Julio Montoya over 7 years ago

Minor changes due the new hot courses feature see #4200

Revision b20c8f92 (diff)
Added by Julio Montoya over 7 years ago

Adding hot courses block (partial) see #4200

Revision dd485c16 (diff)
Added by Julio Montoya over 7 years ago

Adding hot courses block (partial) see #4200

Revision e52ff812 (diff)
Added by Julio Montoya over 7 years ago

Creating new function to save the course login + adding the course ranking updates there (suggested by ywarnier) see #4200

Revision 80817a2e (diff)
Added by Julio Montoya over 7 years ago

Fixing the refreshing issue when voting for courses + changing points to total_score in the ranking table see #4200

Revision 921688ef (diff)
Added by Julio Montoya over 7 years ago

Anon user can't vote see #4200

Revision b7413bfc (diff)
Added by Julio Montoya over 7 years ago

Course ranking: adding SQL schema in migrate-db-1.8.8-1.9.0 see #4200

History

#1

Updated by Julio Montoya over 7 years ago

  • Status changed from New to Needs more info
  • % Done changed from 0 to 50

what's the meaning of "hottest"? More accesses? More user votes? More accesses and user votes?

I'm going for the 3rd option

#3

Updated by Yannick Warnier over 7 years ago

  • Status changed from Needs more info to Assigned
  • Assignee set to Julio Montoya

"Hottest" is most accessed. Considering the time factor is very important in digital courses, it is a measure of the number of accesses to the course during the last 30 days, nothing more.

To avoid loading a long time to register this data in the database, I suggest just taking into account the track_e_course_access data for the current course, between today and today - 30 days (we already have a function that does that for the real courses catalogue) and store that value each time a user enters a course (not in every screen afterwards). That is, when the course ID changes from null to defined, or when there is a cidReset request.

Only one login per user per day should be taken into account, otherwise moving from one course to another for two different sessions would log loads of connections during a very short time.

#4

Updated by Julio Montoya over 7 years ago

Some comments:

1. I guess that task #4191 has nothing to do with this task after all, if we are going to use the track_e_course_access table.
In the new table track_course_ranking or (track_course_classification) we don't have the "accesses during time" we only have "total current accesses".

2. I guess this is another feature:

Store that value each time a user enters a course (not in every screen afterwards). That is, when the course ID changes from null to defined, or when there is a cidReset request.

Only one login per user per day should be taken into account, otherwise moving from one course to another for two different sessions would log loads of connections during a very short time.

#5

Updated by Julio Montoya over 7 years ago

  • Status changed from Assigned to Needs more info
  • Assignee deleted (Julio Montoya)
  • % Done changed from 50 to 70

If the course is public, show the description button.
If the course is public also show a "Go to course" button.

http://code.google.com/p/chamilo/source/detail?r=6c24b4ed8d44c93f7bc7df907fdb456d130023db&repo=classic

#6

Updated by Yannick Warnier over 7 years ago

  • Assignee set to Julio Montoya

I guess, but it can still be using the event() functions to store this value, and it should be right next to the call that updates track_e_course_access, but with a condition (if not already registered in track_e_course_access today).

So when inserting/updating track_e_course_access, we should also insert something (only once per day) in track_course_ranking.

The following code in main/inc/local.inc.php (line 747 and following) should be moved to an event_course_login() function in events.lib.php and the code to fill track_course_ranking table:

$sql="INSERT INTO $course_tracking_table(course_code, user_id, login_course_date, logout_course_date, counter, session_id)" .
                     "VALUES('".$_course['sysCode']."', '".$_user['user_id']."', '$time', '$time', '1', '".api_get_session_id()."')";

It definitely has to do with the other task but it was still getting defined :-)

#7

Updated by Yannick Warnier over 7 years ago

Just tried it locally:

  • the display on the homepage is not really finished
  • the image of the course (the picture you can configure inside the course) does not appear
  • the score of the course should appear as well (as the # of visits, which already appears, good for that!) as the small stars (which look great, by the way)
  • the name of the teachers should appear below the title
  • the buttons should appear on the right side (I think) so they leave enough space for the title, the image and the teachers and other "success" information
  • when opening the "description" popup, I get a nice popup, but in the top-left corner of that popup, I get a small vertical 1px-width line. This is apparently due to the fact that this space is reserved for a popup title but there is no title. For me, we could put "Course description" (the name of the tool we're calling) in small fonts there, if that helps removing this small black line.

#8

Updated by Julio Montoya over 7 years ago

I did a lot of changes, I'm going to work in the "refreshing issue"

#9

Updated by Julio Montoya over 7 years ago

  • % Done changed from 70 to 80

I fixed the refreshing issue, I also changed a field from points to total_score and the table name so it will not work in your current installation ...

#10

Updated by Julio Montoya over 7 years ago

  • Assignee changed from Julio Montoya to Yannick Warnier
#11

Updated by Yannick Warnier over 7 years ago

  • Target version changed from 1.9 Stable to 1.9 Beta
#12

Updated by Michela Mosquera over 7 years ago

Verificado en IE8 y FF12

Falta:
  • Nombre del tutor bajo el titulo del curso
  • Opción de administración para desactivar este bloque dentro de la configuración de la pagina principal.
  • Cuando el usuario ya ha votado, no debería cambiar el valor de "su voto" (Efecto JS)
#13

Updated by Julio Montoya over 7 years ago

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

Michela Mosquera wrote:

Verificado en IE8 y FF12

Falta:
  • Nombre del tutor bajo el titulo del curso

agregado

  • Opción de administración para desactivar este bloque dentro de la configuración de la pagina principal.

El admin puede desactivar el catálogo de cursos. Acabo de agregar una opción para desactivar los "hot courses" (por defecto esta true)

  • Cuando el usuario ya ha votado, no debería cambiar el valor de "su voto" (Efecto JS)

?? Cuando el usuario ha votado si se debería de actualizar su voto (creo que entendi mal?): Ahora dice "Your vote [?]" luego de votar aparece "Your vote [5]" ..

#14

Updated by Yannick Warnier over 7 years ago

  • Status changed from Needs more info to Assigned
  • Assignee set to Julio Montoya

Julio Montoya wrote:

Michela Mosquera wrote:

  • Opción de administración para desactivar este bloque dentro de la configuración de la pagina principal.

El admin puede desactivar el catálogo de cursos. Acabo de agregar una opción para desactivar los "hot courses" (por defecto esta true)

Desactivar el catálogo entero y desactivar este bloque en particular no es lo mismo (son dos elementos distintos y algunos usuarios no van a querer ver la lista de cursos como página de llegada).
Esto siendo dicho, no veo ahora el bloque de "hot courses" en el home... se perdió?

  • Cuando el usuario ya ha votado, no debería cambiar el valor de "su voto" (Efecto JS)

?? Cuando el usuario ha votado si se debería de actualizar su voto (creo que entendi mal?): Ahora dice "Your vote [?]" luego de votar aparece "Your vote [5]" ..

Bueno aquí sí empiezo a entender un poco mejor: el usuario puede votar cuando quiera y tantas veces como quiera, pero solo tiene un voto (si lo cambia, cambia su voto anterior, y no se trata de un segundo voto). Nosotros pensabamos que podía votar varias veces y que se grababan a cada vez.

Bueno, si resuelve la desaparición ahora, debería funcionar bien.

#15

Updated by Julio Montoya over 7 years ago

  • Status changed from Assigned to Needs more info
  • Assignee changed from Julio Montoya to Yannick Warnier

Yannick Warnier wrote:

Julio Montoya wrote:

Michela Mosquera wrote:

  • Opción de administración para desactivar este bloque dentro de la configuración de la pagina principal.

El admin puede desactivar el catálogo de cursos. Acabo de agregar una opción para desactivar los "hot courses" (por defecto esta true)

Desactivar el catálogo entero y desactivar este bloque en particular no es lo mismo (son dos elementos distintos y algunos usuarios no van a querer ver la lista de cursos como página de llegada).
Esto siendo dicho, no veo ahora el bloque de "hot courses" en el home... se perdió?

Hay una opción para activar/desactivar el catalogo de cursos
Hay otra opción para activar/desactivar los hot courses del index (si no se ve, se necesita reinstalar chamilo)

Pensandolo bien esto lo hubiera hecho en un plugin, pero cuando lo hice no habia el sistema que existe actualmente ...

  • Cuando el usuario ya ha votado, no debería cambiar el valor de "su voto" (Efecto JS)

?? Cuando el usuario ha votado si se debería de actualizar su voto (creo que entendi mal?): Ahora dice "Your vote [?]" luego de votar aparece "Your vote [5]" ..

Bueno aquí sí empiezo a entender un poco mejor: el usuario puede votar cuando quiera y tantas veces como quiera, pero solo tiene un voto (si lo cambia, cambia su voto anterior, y no se trata de un segundo voto). Nosotros pensabamos que podía votar varias veces y que se grababan a cada vez.

Exacto tiene 1 voto.

Bueno, si resuelve la desaparición ahora, debería funcionar bien.

#16

Updated by Yannick Warnier over 7 years ago

  • Status changed from Needs more info to Feature implemented
  • % Done changed from 80 to 100

Ya lo ví. Resuelto.

Also available in: Atom PDF