Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
chamilo-lms/plugin/studentfollowup/demo_content.php

28 lines
658 B

<?php
exit;
require_once __DIR__.'/../../main/inc/global.inc.php';
$em = Database::getManager();
$insertUserInfo = api_get_user_entity(api_get_user_id());
$userInfo = api_get_user_entity(16);
$title = uniqid('title', true);
$post = new \Chamilo\PluginBundle\Entity\StudentFollowUp\CarePost();
$post
->setTitle($title)
->setContent($title)
->setExternalCareId(2)
->setCreatedAt(new DateTime())
->setUpdatedAt(new DateTime())
->setPrivate(false)
->setInsertUser($insertUserInfo)
->setExternalSource(0)
//->setParent($parent)
->setTags(['php', 'react'])
->setUser($userInfo)
;
$em->persist($post);
$em->flush();