Skip to content

AI Helper for learning paths #4594

@ywarnier

Description

@ywarnier

Add a feature to the AI helper plugin, in the form of an additional icon in the learning path list's actions toolbar.

Show a form that asks for a topic, a number of chapters, a length (in words) for each chapter.

Ask ChatGPT for the following: Generate the table of contents of a course in [$courseLanguage] in [$chaptersCount] or less chapters on the topic of "[$topic]" in the CSV format, with the chapter number in the first column and the chapter title in the second column..

This will return a CSV with the chapters. Prepare this as the structure for a new learning path in Chamilo: create one learning path of title [$topic], then create one empty document (in a flat learning path structure) for each chapter with the following content:

<!DOCTYPE html>
<html>
<head>
  <title>La science de la navigation spatiale</title>
  <meta charset="utf-8">
</head>
<body>
  PLACEHOLDER
</body>
</html>

Then, for each chapter, make an additional request: In the context of "[$topic]", generate a document with HTML tags in [$courseLanguage] with [$wordsCount] words of content or less, about "[$chapterTitle]".

With the results, replace the PLACEHOLDER in the document created previously.

Make the learning path invisible by default (the teacher needs to review it before students can access it) and send the teacher to the learning path edition view. Do not offer textarea review during the creation process like we do in the Aiken import section. Just generate the documents.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions