Project

General

Profile

Feature #7272

Extend buy_course plugin to include sessions

Added by Yannick Warnier about 5 years ago. Updated almost 5 years ago.

Status:
Feature implemented
Priority:
Normal
Category:
Plugins
Target version:
Start date:
19/09/2014
Due date:
% Done:

100%

Estimated time:
Spent time:
Complexity:
Difficult
SCRUM pts - complexity:
20

Description

The current buy_courses plugin provides the possibility to sell courses, but it doesn't handle sessions at all.
The current plugin_buy_course table contains only the course_id and code, so it is impossible, at this point, to just extend it to sessions without a database modification. However, considering it is a plugin, the database structure can be changed to include a session_id field.

The development requires 4 main points:
  • extend the database and sales logic to allow someone to buy access to a session instead of a course (you can buy a course or a session, but not a specific course inside a specific session)
  • add a plugin configuration setting to "include sessions"
  • extend the admin's list of courses (in the page to configure the price for each) to include sessions
  • extend the final user's (student) list to show sessions as well as courses

Files

1-EnablePlugin.png (106 KB) 1-EnablePlugin.png main/admin/settings.php?category=Plugins Imanol Losada, 30/09/2014 23:37
2-BuyCourseTab.png (94.4 KB) 2-BuyCourseTab.png main/admin/settings.php?category=Plugins Imanol Losada, 30/09/2014 23:37
3-PluginConfig.png (52.6 KB) 3-PluginConfig.png main/admin/configure_plugin.php?name=buycourses Imanol Losada, 30/09/2014 23:37
4-PluginMenu.png (59.1 KB) 4-PluginMenu.png plugin/buycourses/index.php Imanol Losada, 30/09/2014 23:37
5-SetCourses.png (93.8 KB) 5-SetCourses.png plugin/buycourses/src/configuration.php Imanol Losada, 30/09/2014 23:37
6-SetSessions.png (66.9 KB) 6-SetSessions.png plugin/buycourses/src/configuration.php#tabs-2 Imanol Losada, 30/09/2014 23:37
7-PaymentConfig.png (75.1 KB) 7-PaymentConfig.png plugin/buycourses/src/paymentsetup.php Imanol Losada, 30/09/2014 23:37
8-PendingOrders.png (52.8 KB) 8-PendingOrders.png plugin/buycourses/src/pending_orders.php Imanol Losada, 30/09/2014 23:37
9-ListCourses.png (78.2 KB) 9-ListCourses.png plugin/buycourses/src/list.php Imanol Losada, 30/09/2014 23:43
10-BuyCourse.png (64.3 KB) 10-BuyCourse.png plugin/buycourses/src/process.php Imanol Losada, 30/09/2014 23:43
11-PayPalCourse.png (58.2 KB) 11-PayPalCourse.png Imanol Losada, 30/09/2014 23:43
12-CourseConfirm.png (73.1 KB) 12-CourseConfirm.png http://chamilo19x/plugin/buycourses/src/success.php Imanol Losada, 30/09/2014 23:43
13-CourseFinished.png (91 KB) 13-CourseFinished.png plugin/buycourses/src/list.php Imanol Losada, 30/09/2014 23:43
14-ListSessions.png (80.6 KB) 14-ListSessions.png plugin/buycourses/src/list.php#tabs-2 Imanol Losada, 30/09/2014 23:43
15-BuySession.png (81.3 KB) 15-BuySession.png plugin/buycourses/src/process.php Imanol Losada, 30/09/2014 23:43
16-PayPalSession.png (53.4 KB) 16-PayPalSession.png Imanol Losada, 30/09/2014 23:43
17-SessionConfirm.png (87.5 KB) 17-SessionConfirm.png http://chamilo19x/plugin/buycourses/src/success.php Imanol Losada, 30/09/2014 23:43
18-SessionFinished.png (91.3 KB) 18-SessionFinished.png plugin/buycourses/src/list.php Imanol Losada, 30/09/2014 23:43
lis.png (20.8 KB) lis.png Alex Aragon, 15/10/2014 00:34
icon (50.3 KB) icon Alex Aragon, 16/10/2014 01:24
icon_buy.png (63.3 KB) icon_buy.png Alex Aragon, 18/10/2014 01:11

Related issues

Related to Chamilo LMS - Feature #7353: Add possibility for plugins to use main tabs optionallyFeature implemented27/10/2014

Actions

Associated revisions

Revision 4601849a (diff)
Added by Imanol Losada about 5 years ago

Extend buy_course plugin to include sessions (session mailing not done yet) - refs #7272

Revision be487d6b (diff)
Added by Imanol Losada about 5 years ago

Extend buy_course plugin to include sessions - refs #7272

Revision 763e420e (diff)
Added by Imanol Losada about 5 years ago

Minor - Fix typo - refs #7272

Revision 66db6347 (diff)
Added by Imanol Losada about 5 years ago

Fix many coding style issues, warnings and notice messages. Test and working. Please, DO NOT consider this as a minor commit - refs #7272

Revision f672ade5 (diff)
Added by Imanol Losada about 5 years ago

Minor - Remove an extra trailing semicolon and add a couple of comments - refs #7272

Revision c0f6a325 (diff)
Added by Yannick Warnier about 5 years ago

Additional changes to course purchase plugin - refs #7272

Revision d64a02c1 (diff)
Added by Imanol Losada about 5 years ago

Fix SQL injection threats and replace SESSION variable with api_get_user_id - refs #7272

Revision 6aa3e137 (diff)
Added by Yannick Warnier almost 5 years ago

Merge @aragonc style improvements and add French translation - refs #7272

Revision 40ea9ccc (diff)
Added by Imanol Losada almost 5 years ago

If user has only one option to choose from buy courses menu, redirect it there - refs #7272

Revision 7e0404a2 (diff)
Added by Imanol Losada almost 5 years ago

Fix. Replace a pair of id_user with user_id - refs #7272

Revision 1a6a4a92 (diff)
Added by Imanol Losada almost 5 years ago

Add manageTab function to plugin main class - refs #7272

Revision 222ed28c
Added by Imanol Losada almost 5 years ago

Conflict solved when merging - refs #7272

Revision 1f565793 (diff)
Added by Imanol Losada almost 5 years ago

Minor - Remove a useless commented line - refs #7272

Revision b2fb1b88 (diff)
Added by Imanol Losada almost 5 years ago

Add comments. Fix french translation. Change redirection process to a much cleaner one. - refs #7272

Revision 8e914611 (diff)
Added by Imanol Losada almost 5 years ago

Fix manageTab issue when changing language - refs #7272

Revision 56efeba2 (diff)
Added by Imanol Losada almost 5 years ago

[Fix] Custom tab titles are now translated. Translations must be in trad4all - refs #7272

Revision 93e52708 (diff)
Added by Imanol Losada almost 5 years ago

Minor - Add comment - refs #7272

History

#1

Updated by Yannick Warnier about 5 years ago

  • Complexity changed from Normal to Difficult
  • SCRUM pts - complexity changed from ? to 20
#2

Updated by Alex Aragon about 5 years ago

Necesitare capturas de pantallas y descripción del comportamiento para ver la UI del Plugins.

#3

Updated by Imanol Losada about 5 years ago

  • Status changed from Assigned to Needs testing
  • Assignee changed from Imanol Losada to Yannick Warnier
  • % Done changed from 0 to 70
#4

Updated by Imanol Losada about 5 years ago

Alex Aragon wrote:

Necesitare capturas de pantallas y descripción del comportamiento para ver la UI del Plugins.

#6

Updated by Alex Aragon about 5 years ago

Me he descargado la rama para una instalación y configuración en local para pruebas de usabilidad del plugin

#7

Updated by Yannick Warnier about 5 years ago

  • Status changed from Needs testing to Feature implemented
  • Assignee changed from Yannick Warnier to Imanol Losada

The update PR for the plugin code has been merged into 1.9.x.

Alex, has podido revisarlo? Voy a cerrar esta tarea, pero si necesitas aplicar cambios, me avisas para ver si abrimos otra o si los agregamos aquí.

#8

Updated by Alex Aragon about 5 years ago

Estaba revisando el plugin, y no me agrada como se muestra las opciones, deberia ser en forma de menú.

y no llama al estilo active cuando se encuentra seleccionado el menú.

#9

Updated by Alex Aragon about 5 years ago

Iconos para presentar mejor la parte anterior de la imagen con estos iconos así como al momento de crear un curso sale 4 opciones...

#10

Updated by Yannick Warnier almost 5 years ago

  • Status changed from Feature implemented to Assigned
  • Assignee changed from Imanol Losada to Alex Aragon

Iconos OK por mi.
Alex ha dicho que iba a terminar esto.

#11

Updated by Alex Aragon almost 5 years ago

Ultimos retoques para los iconos para el plugin by course

#12

Updated by Yannick Warnier almost 5 years ago

Alex, tienes una rama con estos cambios?
Quiero cerrar esta tarea, pero necesito los iconos en todos los formatos y el cambio de CSS.

#13

Updated by Alex Aragon almost 5 years ago

Enviado mi pull resquest con los cambios.

https://github.com/chamilo/chamilo-lms/pull/392

Queda pendiente la opción de listar la lista de cursos apenas el usuario le da clic en Comprar cursos, ya que solo muestra una opción y no tiene sentido añadir un paso adicional dando clic en el carrito de compras, eso debe ser solo para el administrador con sus 4 opciones de configuración

#14

Updated by Yannick Warnier almost 5 years ago

  • Assignee changed from Alex Aragon to Imanol Losada

Volviendo a asignar a Imanol para hacer un redirect en el caso del usuario final (para que no vea la lista de opciones) y añadir una opción para no mostrar la pestaña de "Buy courses" en la barra azul de menú principal.

Ya casi terminamos!

#15

Updated by Imanol Losada almost 5 years ago

  • Assignee changed from Imanol Losada to Yannick Warnier
#16

Updated by Yannick Warnier almost 5 years ago

  • Status changed from Assigned to Needs testing
  • Assignee deleted (Yannick Warnier)
  • % Done changed from 70 to 90

Everything has been merged. We only need functional testing now.

#17

Updated by Yannick Warnier almost 5 years ago

  • Status changed from Needs testing to Feature implemented
  • Assignee set to Imanol Losada
  • % Done changed from 90 to 100

Verified. There's only one minor issue in the tabs system: it checks for the term in a specific language.
For example, if I install the plugin in English, enable the tab, and then switch to Spanish and try to disable the tab, it doesn't work, and then it adds a tab in Spanish. I have to disable the tab in the specific language in which I enabled it.

I'm closing this issue as the feature has been developed and the tab activation has been added as an extension of the original task itself.

#18

Updated by Imanol Losada almost 5 years ago

  • Assignee changed from Imanol Losada to Yannick Warnier

Also available in: Atom PDF