Feature #4200
Courses catalogue as block on homepage
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
Related issues
Associated revisions
Adding hot courses block (partial) see #4200
Adding hot courses block (partial) see #4200
Creating new function to save the course login + adding the course ranking updates there (suggested by ywarnier) see #4200
Fixing the refreshing issue when voting for courses + changing points to total_score in the ranking table see #4200
Anon user can't vote see #4200
Course ranking: adding SQL schema in migrate-db-1.8.8-1.9.0 see #4200
History
Updated by Julio Montoya about 9 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
Updated by Julio Montoya about 9 years ago
not finished yet, just showing the course id
http://code.google.com/p/chamilo/source/detail?r=e058c2d064fb504d9c3baba65d083f1ab6846cb1&repo=classic
Updated by Yannick Warnier about 9 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.
Updated by Julio Montoya about 9 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.
Updated by Julio Montoya about 9 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.
Updated by Yannick Warnier about 9 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 :-)
Updated by Yannick Warnier about 9 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.
Updated by Julio Montoya about 9 years ago
I did a lot of changes, I'm going to work in the "refreshing issue"
Updated by Julio Montoya about 9 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 ...
Updated by Julio Montoya about 9 years ago
- Assignee changed from Julio Montoya to Yannick Warnier
I added some changes:
Course ranking: adding SQL schema in migrate-db-1.8.8-1.9.0 see #4200
Anon user can't vote see #4200
http://code.google.com/p/chamilo/source/detail?r=f2f202b660f4ec7ef1770414720984369333b19b&repo=classic
Updated by Yannick Warnier almost 9 years ago
- Target version changed from 1.9 Stable to 1.9 Beta
Updated by Michela Mosquera almost 9 years ago
- File catalogo-portada.png catalogo-portada.png added
- Status changed from Needs more info to Assigned
- Assignee changed from Yannick Warnier to Julio Montoya
- % Done changed from 80 to 60
Verificado en IE8 y FF12
- 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)
Updated by Julio Montoya over 8 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]" ..
Updated by Yannick Warnier over 8 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.
Updated by Julio Montoya over 8 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.
Updated by Yannick Warnier over 8 years ago
- Status changed from Needs more info to Feature implemented
- % Done changed from 80 to 100
Ya lo ví. Resuelto.
Minor changes due the new hot courses feature see #4200