Actualización
59
plugin/advanced_subscription/README.md
Normal file
@@ -0,0 +1,59 @@
|
||||
Advanced subscription plugin for Chamilo LMS
|
||||
=======================================
|
||||
Plugin to manage the registration queue and communication to sessions
|
||||
from an external website creating a queue to control session subscription
|
||||
and sending emails to approve student subscription requests
|
||||
|
||||
# Requirements
|
||||
Chamilo LMS 1.10.0 or greater
|
||||
|
||||
# Settings
|
||||
|
||||
These settings have to be configured in the Configuration screen for the plugin
|
||||
|
||||
Parameters | Description
|
||||
------------- |-------------
|
||||
Webservice url | Url to external website to get user profile (SOAP)
|
||||
Induction requirement | Checkbox to enable induction as requirement
|
||||
Courses count limit | Number of times a student is allowed at most to course by year
|
||||
Yearly hours limit | Teaching hours a student is allowed at most to course by year
|
||||
Yearly cost unit converter | The cost of a taxation unit value (TUV)
|
||||
Yearly cost limit | Number of TUV student courses is allowed at most to cost by year
|
||||
Year start date | Date (dd/mm) when the year limit is renewed
|
||||
Minimum percentage profile | Minimum percentage required from external website profile
|
||||
|
||||
# Hooks
|
||||
|
||||
This plugin uses the following hooks (defined since Chamilo LMS 1.10.0):
|
||||
|
||||
* HookAdminBlock
|
||||
* HookWSRegistration
|
||||
* HookNotificationContent
|
||||
* HookNotificationTitle
|
||||
|
||||
|
||||
# Web services
|
||||
|
||||
This plugin also enables new webservices that can be used from registration.soap.php
|
||||
|
||||
* HookAdvancedSubscription..WSSessionListInCategory
|
||||
* HookAdvancedSubscription..WSSessionGetDetailsByUser
|
||||
* HookAdvancedSubscription..WSListSessionsDetailsByCategory
|
||||
|
||||
See `/plugin/advanced_subscription/src/HookAdvancedSubscription.php` to check Web services inputs and outputs
|
||||
|
||||
# How does this plugin works?
|
||||
|
||||
After install, fill the required parameters (described above)
|
||||
Use web services to communicate course session inscription from external website
|
||||
This allows students to search course sessions and subscribe if they match
|
||||
the requirements.
|
||||
|
||||
The normal process is:
|
||||
* Student searches course session
|
||||
* Student reads session info depending student data
|
||||
* Student requests to be subscribed
|
||||
* A confirmation email is sent to student
|
||||
* An authorization email is sent to student's superior (STUDENT BOSS role) or admins (when there is no superior) who will accept or reject the student request
|
||||
* When the superior accepts or rejects, an email will be sent to the student and superior (or admin), respectively
|
||||
* To complete the subscription, the request must be validated and accepted by an admin
|
||||
350
plugin/advanced_subscription/ajax/advanced_subscription.ajax.php
Normal file
@@ -0,0 +1,350 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
/**
|
||||
* Script to receipt request to subscribe and confirmation action to queue.
|
||||
*
|
||||
* @author Daniel Alejandro Barreto Alva <daniel.barreto@beeznest.com>
|
||||
*
|
||||
* @package chamilo.plugin.advanced_subscription
|
||||
*/
|
||||
/**
|
||||
* Init.
|
||||
*/
|
||||
require_once __DIR__.'/../config.php';
|
||||
|
||||
$plugin = AdvancedSubscriptionPlugin::create();
|
||||
// Get validation hash
|
||||
$hash = Security::remove_XSS($_REQUEST['v']);
|
||||
// Get data from request (GET or POST)
|
||||
$data['action'] = Security::remove_XSS($_REQUEST['a']);
|
||||
$data['sessionId'] = intval($_REQUEST['s']);
|
||||
$data['currentUserId'] = intval($_REQUEST['current_user_id']);
|
||||
$data['studentUserId'] = intval($_REQUEST['u']);
|
||||
$data['queueId'] = intval($_REQUEST['q']);
|
||||
$data['newStatus'] = intval($_REQUEST['e']);
|
||||
// Student always is connected
|
||||
// $data['is_connected'] = isset($_REQUEST['is_connected']) ? boolval($_REQUEST['is_connected']) : false;
|
||||
$data['is_connected'] = true;
|
||||
$data['profile_completed'] = isset($_REQUEST['profile_completed']) ? floatval($_REQUEST['profile_completed']) : 0;
|
||||
$data['accept_terms'] = isset($_REQUEST['accept_terms']) ? intval($_REQUEST['accept_terms']) : 0;
|
||||
$data['courseId'] = isset($_REQUEST['c']) ? intval($_REQUEST['c']) : 0;
|
||||
// Init result array
|
||||
$result = ['error' => true, 'errorMessage' => get_lang('ThereWasAnError')];
|
||||
$showJSON = true;
|
||||
// Check if data is valid or is for start subscription
|
||||
$verified = $plugin->checkHash($data, $hash) || $data['action'] == 'subscribe';
|
||||
if ($verified) {
|
||||
switch ($data['action']) {
|
||||
case 'check': // Check minimum requirements
|
||||
try {
|
||||
$res = AdvancedSubscriptionPlugin::create()->isAllowedToDoRequest($data['studentUserId'], $data);
|
||||
if ($res) {
|
||||
$result['error'] = false;
|
||||
$result['errorMessage'] = 'No error';
|
||||
$result['pass'] = true;
|
||||
} else {
|
||||
$result['errorMessage'] = 'User can not be subscribed';
|
||||
$result['pass'] = false;
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
$result['errorMessage'] = $e->getMessage();
|
||||
}
|
||||
break;
|
||||
case 'subscribe': // Subscription
|
||||
// Start subscription to queue
|
||||
$res = AdvancedSubscriptionPlugin::create()->startSubscription(
|
||||
$data['studentUserId'],
|
||||
$data['sessionId'],
|
||||
$data
|
||||
);
|
||||
// Check if queue subscription was successful
|
||||
if ($res === true) {
|
||||
$legalEnabled = api_get_plugin_setting('courselegal', 'tool_enable');
|
||||
if ($legalEnabled) {
|
||||
// Save terms confirmation
|
||||
CourseLegalPlugin::create()->saveUserLegal(
|
||||
$data['studentUserId'],
|
||||
$data['courseId'],
|
||||
$data['sessionId'],
|
||||
false
|
||||
);
|
||||
}
|
||||
// Prepare data
|
||||
// Get session data
|
||||
// Assign variables
|
||||
$fieldsArray = [
|
||||
'description',
|
||||
'target',
|
||||
'mode',
|
||||
'publication_end_date',
|
||||
'recommended_number_of_participants',
|
||||
];
|
||||
$sessionArray = api_get_session_info($data['sessionId']);
|
||||
$extraSession = new ExtraFieldValue('session');
|
||||
$extraField = new ExtraField('session');
|
||||
// Get session fields
|
||||
$fieldList = $extraField->get_all([
|
||||
'variable IN ( ?, ?, ?, ?, ?)' => $fieldsArray,
|
||||
]);
|
||||
// Index session fields
|
||||
foreach ($fieldList as $field) {
|
||||
$fields[$field['id']] = $field['variable'];
|
||||
}
|
||||
|
||||
$mergedArray = array_merge([$data['sessionId']], array_keys($fields));
|
||||
$sessionFieldValueList = $extraSession->get_all(
|
||||
[
|
||||
'item_id = ? field_id IN ( ?, ?, ?, ?, ?, ?, ? )' => $mergedArray,
|
||||
]
|
||||
);
|
||||
foreach ($sessionFieldValueList as $sessionFieldValue) {
|
||||
// Check if session field value is set in session field list
|
||||
if (isset($fields[$sessionFieldValue['field_id']])) {
|
||||
$var = $fields[$sessionFieldValue['field_id']];
|
||||
$val = $sessionFieldValue['value'];
|
||||
// Assign session field value to session
|
||||
$sessionArray[$var] = $val;
|
||||
}
|
||||
}
|
||||
// Get student data
|
||||
$studentArray = api_get_user_info($data['studentUserId']);
|
||||
$studentArray['picture'] = $studentArray['avatar'];
|
||||
|
||||
// Get superior data if exist
|
||||
$superiorId = UserManager::getFirstStudentBoss($data['studentUserId']);
|
||||
if (!empty($superiorId)) {
|
||||
$superiorArray = api_get_user_info($superiorId);
|
||||
} else {
|
||||
$superiorArray = null;
|
||||
}
|
||||
// Get admin data
|
||||
$adminsArray = UserManager::get_all_administrators();
|
||||
$isWesternNameOrder = api_is_western_name_order();
|
||||
foreach ($adminsArray as &$admin) {
|
||||
$admin['complete_name'] = $isWesternNameOrder ?
|
||||
$admin['firstname'].', '.$admin['lastname'] : $admin['lastname'].', '.$admin['firstname']
|
||||
;
|
||||
}
|
||||
unset($admin);
|
||||
// Set data
|
||||
$data['action'] = 'confirm';
|
||||
$data['student'] = $studentArray;
|
||||
$data['superior'] = $superiorArray;
|
||||
$data['admins'] = $adminsArray;
|
||||
$data['session'] = $sessionArray;
|
||||
$data['signature'] = api_get_setting('Institution');
|
||||
|
||||
// Check if student boss exists
|
||||
if (empty($superiorId)) {
|
||||
// Student boss does not exist
|
||||
// Update status to accepted by boss
|
||||
$res = $plugin->updateQueueStatus($data, ADVANCED_SUBSCRIPTION_QUEUE_STATUS_BOSS_APPROVED);
|
||||
if (!empty($res)) {
|
||||
// Prepare admin url
|
||||
$data['admin_view_url'] = api_get_path(WEB_PLUGIN_PATH).
|
||||
'advanced_subscription/src/admin_view.php?s='.$data['sessionId'];
|
||||
// Send mails
|
||||
$result['mailIds'] = $plugin->sendMail(
|
||||
$data,
|
||||
ADVANCED_SUBSCRIPTION_ACTION_STUDENT_REQUEST_NO_BOSS
|
||||
);
|
||||
// Check if mails were sent
|
||||
if (!empty($result['mailIds'])) {
|
||||
$result['error'] = false;
|
||||
$result['errorMessage'] = 'No error';
|
||||
$result['pass'] = true;
|
||||
// Check if exist an email to render
|
||||
if (isset($result['mailIds']['render'])) {
|
||||
// Render mail
|
||||
$url = $plugin->getRenderMailUrl(['queueId' => $result['mailIds']['render']]);
|
||||
header('Location: '.$url);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Student boss does exist
|
||||
// Get url to be accepted by boss
|
||||
$data['newStatus'] = ADVANCED_SUBSCRIPTION_QUEUE_STATUS_BOSS_APPROVED;
|
||||
$data['student']['acceptUrl'] = $plugin->getQueueUrl($data);
|
||||
// Get url to be rejected by boss
|
||||
$data['newStatus'] = ADVANCED_SUBSCRIPTION_QUEUE_STATUS_BOSS_DISAPPROVED;
|
||||
$data['student']['rejectUrl'] = $plugin->getQueueUrl($data);
|
||||
// Send mails
|
||||
$result['mailIds'] = $plugin->sendMail($data, ADVANCED_SUBSCRIPTION_ACTION_STUDENT_REQUEST);
|
||||
// Check if mails were sent
|
||||
if (!empty($result['mailIds'])) {
|
||||
$result['error'] = false;
|
||||
$result['errorMessage'] = 'No error';
|
||||
$result['pass'] = true;
|
||||
// Check if exist an email to render
|
||||
if (isset($result['mailIds']['render'])) {
|
||||
// Render mail
|
||||
$url = $plugin->getRenderMailUrl(['queueId' => $result['mailIds']['render']]);
|
||||
header('Location: '.$url);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$lastMessageId = $plugin->getLastMessageId($data['studentUserId'], $data['sessionId']);
|
||||
if ($lastMessageId !== false) {
|
||||
// Render mail
|
||||
$url = $plugin->getRenderMailUrl(['queueId' => $lastMessageId]);
|
||||
header('Location: '.$url);
|
||||
exit;
|
||||
} else {
|
||||
if (is_string($res)) {
|
||||
$result['errorMessage'] = $res;
|
||||
} else {
|
||||
$result['errorMessage'] = 'User can not be subscribed';
|
||||
}
|
||||
$result['pass'] = false;
|
||||
$url = $plugin->getTermsUrl($data, ADVANCED_SUBSCRIPTION_TERMS_MODE_FINAL);
|
||||
header('Location: '.$url);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
case 'confirm':
|
||||
// Check if new status is set
|
||||
if (isset($data['newStatus'])) {
|
||||
if ($data['newStatus'] === ADVANCED_SUBSCRIPTION_QUEUE_STATUS_ADMIN_APPROVED) {
|
||||
try {
|
||||
$isAllowToDoRequest = $plugin->isAllowedToDoRequest($data['studentUserId'], $data);
|
||||
} catch (Exception $ex) {
|
||||
$messageTemplate = new Template(null, false, false);
|
||||
$messageTemplate->assign(
|
||||
'content',
|
||||
Display::return_message($ex->getMessage(), 'error', false)
|
||||
);
|
||||
$messageTemplate->display_no_layout_template();
|
||||
$showJSON = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Update queue status
|
||||
$res = $plugin->updateQueueStatus($data, $data['newStatus']);
|
||||
if ($res === true) {
|
||||
// Prepare data
|
||||
// Prepare session data
|
||||
$fieldsArray = [
|
||||
'description',
|
||||
'target',
|
||||
'mode',
|
||||
'publication_end_date',
|
||||
'recommended_number_of_participants',
|
||||
];
|
||||
$sessionArray = api_get_session_info($data['sessionId']);
|
||||
$extraSession = new ExtraFieldValue('session');
|
||||
$extraField = new ExtraField('session');
|
||||
// Get session fields
|
||||
$fieldList = $extraField->get_all([
|
||||
'variable IN ( ?, ?, ?, ?, ?)' => $fieldsArray,
|
||||
]);
|
||||
// Index session fields
|
||||
foreach ($fieldList as $field) {
|
||||
$fields[$field['id']] = $field['variable'];
|
||||
}
|
||||
|
||||
$mergedArray = array_merge([$data['sessionId']], array_keys($fields));
|
||||
$sessionFieldValueList = $extraSession->get_all(
|
||||
['session_id = ? field_id IN ( ?, ?, ?, ?, ?, ?, ? )' => $mergedArray]
|
||||
);
|
||||
foreach ($sessionFieldValueList as $sessionFieldValue) {
|
||||
// Check if session field value is set in session field list
|
||||
if (isset($fields[$sessionFieldValue['field_id']])) {
|
||||
$var = $fields[$sessionFieldValue['field_id']];
|
||||
$val = $sessionFieldValue['value'];
|
||||
// Assign session field value to session
|
||||
$sessionArray[$var] = $val;
|
||||
}
|
||||
}
|
||||
// Prepare student data
|
||||
$studentArray = api_get_user_info($data['studentUserId']);
|
||||
$studentArray['picture'] = $studentArray['avatar'];
|
||||
// Prepare superior data
|
||||
$superiorId = UserManager::getFirstStudentBoss($data['studentUserId']);
|
||||
if (!empty($superiorId)) {
|
||||
$superiorArray = api_get_user_info($superiorId);
|
||||
} else {
|
||||
$superiorArray = null;
|
||||
}
|
||||
// Prepare admin data
|
||||
$adminsArray = UserManager::get_all_administrators();
|
||||
$isWesternNameOrder = api_is_western_name_order();
|
||||
foreach ($adminsArray as &$admin) {
|
||||
$admin['complete_name'] = $isWesternNameOrder ?
|
||||
$admin['firstname'].', '.$admin['lastname'] : $admin['lastname'].', '.$admin['firstname']
|
||||
;
|
||||
}
|
||||
unset($admin);
|
||||
// Set data
|
||||
$data['student'] = $studentArray;
|
||||
$data['superior'] = $superiorArray;
|
||||
$data['admins'] = $adminsArray;
|
||||
$data['session'] = $sessionArray;
|
||||
$data['signature'] = api_get_setting('Institution');
|
||||
$data['admin_view_url'] = api_get_path(WEB_PLUGIN_PATH)
|
||||
.'advanced_subscription/src/admin_view.php?s='.$data['sessionId'];
|
||||
// Check if exist and action in data
|
||||
if (empty($data['mailAction'])) {
|
||||
// set action in data by new status
|
||||
switch ($data['newStatus']) {
|
||||
case ADVANCED_SUBSCRIPTION_QUEUE_STATUS_BOSS_APPROVED:
|
||||
$data['mailAction'] = ADVANCED_SUBSCRIPTION_ACTION_SUPERIOR_APPROVE;
|
||||
break;
|
||||
case ADVANCED_SUBSCRIPTION_QUEUE_STATUS_BOSS_DISAPPROVED:
|
||||
$data['mailAction'] = ADVANCED_SUBSCRIPTION_ACTION_SUPERIOR_DISAPPROVE;
|
||||
break;
|
||||
case ADVANCED_SUBSCRIPTION_QUEUE_STATUS_ADMIN_APPROVED:
|
||||
$data['mailAction'] = ADVANCED_SUBSCRIPTION_ACTION_ADMIN_APPROVE;
|
||||
break;
|
||||
case ADVANCED_SUBSCRIPTION_QUEUE_STATUS_ADMIN_DISAPPROVED:
|
||||
$data['mailAction'] = ADVANCED_SUBSCRIPTION_ACTION_ADMIN_DISAPPROVE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Student Session inscription
|
||||
if ($data['newStatus'] == ADVANCED_SUBSCRIPTION_QUEUE_STATUS_ADMIN_APPROVED) {
|
||||
SessionManager::subscribeUsersToSession(
|
||||
$data['sessionId'],
|
||||
[$data['studentUserId']],
|
||||
null,
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
// Send mails
|
||||
$result['mailIds'] = $plugin->sendMail($data, $data['mailAction']);
|
||||
// Check if mails were sent
|
||||
if (!empty($result['mailIds'])) {
|
||||
$result['error'] = false;
|
||||
$result['errorMessage'] = 'User has been processed';
|
||||
// Check if exist mail to render
|
||||
if (isset($result['mailIds']['render'])) {
|
||||
// Render mail
|
||||
$url = $plugin->getRenderMailUrl(['queueId' => $result['mailIds']['render']]);
|
||||
header('Location: '.$url);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$result['errorMessage'] = 'User queue can not be updated';
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
$result['errorMessage'] = 'This action does not exist!';
|
||||
}
|
||||
}
|
||||
|
||||
if ($showJSON) {
|
||||
// Echo result as json
|
||||
echo json_encode($result);
|
||||
}
|
||||
35
plugin/advanced_subscription/config.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
/**
|
||||
* Config the plugin.
|
||||
*
|
||||
* @author Daniel Alejandro Barreto Alva <daniel.barreto@beeznest.com>
|
||||
*
|
||||
* @package chamilo.plugin.advanced_subscription
|
||||
*/
|
||||
define('TABLE_ADVANCED_SUBSCRIPTION_QUEUE', 'plugin_advanced_subscription_queue');
|
||||
|
||||
define('ADVANCED_SUBSCRIPTION_ACTION_STUDENT_REQUEST', 0);
|
||||
define('ADVANCED_SUBSCRIPTION_ACTION_SUPERIOR_APPROVE', 1);
|
||||
define('ADVANCED_SUBSCRIPTION_ACTION_SUPERIOR_DISAPPROVE', 2);
|
||||
define('ADVANCED_SUBSCRIPTION_ACTION_SUPERIOR_SELECT', 3);
|
||||
define('ADVANCED_SUBSCRIPTION_ACTION_ADMIN_APPROVE', 4);
|
||||
define('ADVANCED_SUBSCRIPTION_ACTION_ADMIN_DISAPPROVE', 5);
|
||||
define('ADVANCED_SUBSCRIPTION_ACTION_STUDENT_REQUEST_NO_BOSS', 6);
|
||||
define('ADVANCED_SUBSCRIPTION_ACTION_REMINDER_STUDENT', 7);
|
||||
define('ADVANCED_SUBSCRIPTION_ACTION_REMINDER_SUPERIOR', 8);
|
||||
define('ADVANCED_SUBSCRIPTION_ACTION_REMINDER_SUPERIOR_MAX', 9);
|
||||
define('ADVANCED_SUBSCRIPTION_ACTION_REMINDER_ADMIN', 10);
|
||||
|
||||
define('ADVANCED_SUBSCRIPTION_QUEUE_STATUS_NO_QUEUE', -1);
|
||||
define('ADVANCED_SUBSCRIPTION_QUEUE_STATUS_START', 0);
|
||||
define('ADVANCED_SUBSCRIPTION_QUEUE_STATUS_BOSS_DISAPPROVED', 1);
|
||||
define('ADVANCED_SUBSCRIPTION_QUEUE_STATUS_BOSS_APPROVED', 2);
|
||||
define('ADVANCED_SUBSCRIPTION_QUEUE_STATUS_ADMIN_DISAPPROVED', 3);
|
||||
define('ADVANCED_SUBSCRIPTION_QUEUE_STATUS_ADMIN_APPROVED', 10);
|
||||
|
||||
define('ADVANCED_SUBSCRIPTION_TERMS_MODE_POPUP', 0);
|
||||
define('ADVANCED_SUBSCRIPTION_TERMS_MODE_REJECT', 1);
|
||||
define('ADVANCED_SUBSCRIPTION_TERMS_MODE_FINAL', 2);
|
||||
|
||||
require_once __DIR__.'/../../main/inc/global.inc.php';
|
||||
153
plugin/advanced_subscription/cron/notify_by_mail.php
Normal file
@@ -0,0 +1,153 @@
|
||||
<?php
|
||||
/* For license terms, see /license.txt */
|
||||
/**
|
||||
* This script generates four session categories.
|
||||
*
|
||||
* @package chamilo.plugin.advanced_subscription
|
||||
*/
|
||||
|
||||
/**
|
||||
* Init.
|
||||
*/
|
||||
require_once __DIR__.'/../config.php';
|
||||
$plugin = AdvancedSubscriptionPlugin::create();
|
||||
$now = api_get_utc_datetime();
|
||||
$weekAgo = api_get_utc_datetime('-1 week');
|
||||
$sessionExtraField = new ExtraField('session');
|
||||
$sessionExtraFieldValue = new ExtraFieldValue('session');
|
||||
/**
|
||||
* Get session list.
|
||||
*/
|
||||
$joinTables = Database::get_main_table(TABLE_MAIN_SESSION).' s INNER JOIN '.
|
||||
Database::get_main_table(TABLE_MAIN_SESSION_USER).' su ON s.id = su.session_id INNER JOIN '.
|
||||
Database::get_main_table(TABLE_MAIN_USER_REL_USER).' uu ON su.user_id = uu.user_id INNER JOIN '.
|
||||
Database::get_main_table(TABLE_ADVANCED_SUBSCRIPTION_QUEUE).' asq ON su.session_id = asq.session_id AND su.user_id = asq.user_id';
|
||||
$columns = 's.id AS session_id, uu.friend_user_id AS superior_id, uu.user_id AS student_id, asq.id AS queue_id, asq.status AS status';
|
||||
$conditions = [
|
||||
'where' => [
|
||||
's.access_start_date >= ? AND uu.relation_type = ? AND asq.updated_at <= ?' => [
|
||||
$now,
|
||||
USER_RELATION_TYPE_BOSS,
|
||||
$weekAgo,
|
||||
],
|
||||
],
|
||||
'order' => 's.id',
|
||||
];
|
||||
|
||||
$queueList = Database::select($columns, $joinTables, $conditions);
|
||||
|
||||
/**
|
||||
* Remind students.
|
||||
*/
|
||||
$sessionInfoList = [];
|
||||
foreach ($queueList as $queueItem) {
|
||||
if (!isset($sessionInfoList[$queueItem['session_id']])) {
|
||||
$sessionInfoList[$queueItem['session_id']] = api_get_session_info($queueItem['session_id']);
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($queueList as $queueItem) {
|
||||
switch ($queueItem['status']) {
|
||||
case ADVANCED_SUBSCRIPTION_QUEUE_STATUS_START:
|
||||
case ADVANCED_SUBSCRIPTION_QUEUE_STATUS_BOSS_APPROVED:
|
||||
$data = ['sessionId' => $queueItem['session_id']];
|
||||
$data['session'] = api_get_session_info($queueItem['session_id']);
|
||||
$data['student'] = api_get_user_info($queueItem['student_id']);
|
||||
$plugin->sendMail($data, ADVANCED_SUBSCRIPTION_ACTION_REMINDER_STUDENT);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remind superiors.
|
||||
*/
|
||||
// Get recommended number of participants
|
||||
$sessionRecommendedNumber = [];
|
||||
foreach ($queueList as $queueItem) {
|
||||
$row =
|
||||
$sessionExtraFieldValue->get_values_by_handler_and_field_variable(
|
||||
$queueItem['session_id'],
|
||||
'recommended_number_of_participants'
|
||||
);
|
||||
$sessionRecommendedNumber[$queueItem['session_id']] = $row['value'];
|
||||
}
|
||||
// Group student by superior and session
|
||||
$queueBySuperior = [];
|
||||
foreach ($queueList as $queueItem) {
|
||||
$queueBySuperior[$queueItem['session_id']][$queueItem['superior_id']][$queueItem['student_id']]['status'] = $queueItem['status'];
|
||||
}
|
||||
|
||||
foreach ($queueBySuperior as $sessionId => $superiorStudents) {
|
||||
$data = [
|
||||
'sessionId' => $sessionId,
|
||||
'session' => $sessionInfoList[$sessionId],
|
||||
'students' => [],
|
||||
];
|
||||
$dataUrl = [
|
||||
'action' => 'confirm',
|
||||
'sessionId' => $sessionId,
|
||||
'currentUserId' => 0,
|
||||
'newStatus' => ADVANCED_SUBSCRIPTION_QUEUE_STATUS_BOSS_APPROVED,
|
||||
'studentUserId' => 0,
|
||||
'is_connected' => true,
|
||||
'profile_completed' => 0,
|
||||
];
|
||||
foreach ($superiorStudents as $superiorId => $students) {
|
||||
$data['superior'] = api_get_user_info($superiorId);
|
||||
// Check if superior has at least one student
|
||||
if (count($students) > 0) {
|
||||
foreach ($students as $studentId => $studentInfo) {
|
||||
if ($studentInfo['status'] == ADVANCED_SUBSCRIPTION_QUEUE_STATUS_START) {
|
||||
$data['students'][$studentId] = api_get_user_info($studentId);
|
||||
$dataUrl['studentUserId'] = $studentId;
|
||||
$dataUrl['newStatus'] = ADVANCED_SUBSCRIPTION_QUEUE_STATUS_BOSS_APPROVED;
|
||||
$data['students'][$studentId]['acceptUrl'] = $plugin->getQueueUrl($dataUrl);
|
||||
$dataUrl['newStatus'] = ADVANCED_SUBSCRIPTION_QUEUE_STATUS_BOSS_DISAPPROVED;
|
||||
$data['students'][$studentId]['rejectUrl'] = $plugin->getQueueUrl($dataUrl);
|
||||
}
|
||||
}
|
||||
|
||||
if (is_array($data['students']) && count($data['students']) > 0) {
|
||||
// Check if superior have more than recommended
|
||||
if ($sessionRecommendedNumber[$sessionId] >= count($students)) {
|
||||
// Is greater or equal than recommended
|
||||
$plugin->sendMail($data, ADVANCED_SUBSCRIPTION_ACTION_REMINDER_SUPERIOR);
|
||||
} else {
|
||||
// Is less than recommended
|
||||
$plugin->sendMail($data, ADVANCED_SUBSCRIPTION_ACTION_REMINDER_SUPERIOR_MAX);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remind admins.
|
||||
*/
|
||||
$admins = UserManager::get_all_administrators();
|
||||
$isWesternNameOrder = api_is_western_name_order();
|
||||
foreach ($admins as &$admin) {
|
||||
$admin['complete_name'] = $isWesternNameOrder ?
|
||||
$admin['firstname'].', '.$admin['lastname'] : $admin['lastname'].', '.$admin['firstname']
|
||||
;
|
||||
}
|
||||
unset($admin);
|
||||
$queueByAdmin = [];
|
||||
foreach ($queueList as $queueItem) {
|
||||
if ($queueItem['status'] == ADVANCED_SUBSCRIPTION_QUEUE_STATUS_BOSS_APPROVED) {
|
||||
$queueByAdmin[$queueItem['session_id']]['students'][$queueItem['student_id']]['user_id'] = $queueItem['student_id'];
|
||||
}
|
||||
}
|
||||
$data = [
|
||||
'admins' => $admins,
|
||||
];
|
||||
foreach ($queueByAdmin as $sessionId => $studentInfo) {
|
||||
$data['sessionId'] = $sessionId;
|
||||
$data['admin_view_url'] = api_get_path(WEB_PLUGIN_PATH).
|
||||
'advanced_subscription/src/admin_view.php?s='.$data['sessionId'];
|
||||
$data['session'] = $sessionInfoList[$sessionId];
|
||||
$data['students'] = $studentInfo['students'];
|
||||
$plugin->sendMail($data, ADVANCED_SUBSCRIPTION_ACTION_REMINDER_ADMIN);
|
||||
}
|
||||
1
plugin/advanced_subscription/index.html
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
17
plugin/advanced_subscription/install.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
/* For license terms, see /license.txt */
|
||||
/**
|
||||
* This script is included by main/admin/settings.lib.php and generally
|
||||
* includes things to execute in the main database (settings_current table).
|
||||
*
|
||||
* @package chamilo.plugin.advanced_subscription
|
||||
*/
|
||||
|
||||
/**
|
||||
* Initialization.
|
||||
*/
|
||||
require_once __DIR__.'/config.php';
|
||||
if (!api_is_platform_admin()) {
|
||||
exit('You must have admin permissions to install plugins');
|
||||
}
|
||||
AdvancedSubscriptionPlugin::create()->install();
|
||||
149
plugin/advanced_subscription/lang/english.php
Normal file
@@ -0,0 +1,149 @@
|
||||
<?php
|
||||
|
||||
/* Strings for settings */
|
||||
$strings['plugin_title'] = 'Advanced Subscription';
|
||||
$strings['plugin_comment'] = 'Plugin for managing the registration queue and communication to sessions from an external website';
|
||||
$strings['ws_url'] = 'Webservice url';
|
||||
$strings['ws_url_help'] = 'The URL from which ingormation will be requested for the advanced subscription process';
|
||||
$strings['check_induction'] = 'Enable induction course requirement';
|
||||
$strings['check_induction_help'] = 'Check to make induction course mandatory';
|
||||
$strings['yearly_cost_limit'] = 'Yearly TUV limit for courses (measured in Taxation units)';
|
||||
$strings['yearly_cost_limit_help'] = "How much TUVs the student courses should cost at most.";
|
||||
$strings['yearly_hours_limit'] = 'Yearly teaching hours limit for courses';
|
||||
$strings['yearly_hours_limit_help'] = "How many teaching hours the student may follow by year.";
|
||||
$strings['yearly_cost_unit_converter'] = 'Taxation unit value (TUV)';
|
||||
$strings['yearly_cost_unit_converter_help'] = "The taxation unit value for the current year, in local currency";
|
||||
$strings['courses_count_limit'] = 'Yearly courses limit';
|
||||
$strings['courses_count_limit_help'] = "How many times a student can take courses. This value does <strong>not</strong> include induction courses";
|
||||
$strings['course_session_credit_year_start_date'] = 'Year start date';
|
||||
$strings['course_session_credit_year_start_date_help'] = "a date (dd/mm)";
|
||||
$strings['min_profile_percentage'] = "Minimum required of completed percentage profile";
|
||||
$strings['min_profile_percentage_help'] = "Percentage number( > 0.00 y < 100.00)";
|
||||
$strings['secret_key'] = 'Secret key';
|
||||
$strings['terms_and_conditions'] = 'Terms and conditions';
|
||||
|
||||
/* String for error message about requirements */
|
||||
$strings['AdvancedSubscriptionNotConnected'] = "You are not connected to platform. Please login first";
|
||||
$strings['AdvancedSubscriptionProfileIncomplete'] = "You must complete at least <strong>%d percent</strong> of your profile. You have only completed <strong>%d percent</strong> at this point";
|
||||
$strings['AdvancedSubscriptionIncompleteInduction'] = "You have not yet completed induction course. Please complete it first";
|
||||
$strings['AdvancedSubscriptionCostXLimitReached'] = "We are sorry, you have already reached yearly limit %s TUV cost for courses ";
|
||||
$strings['AdvancedSubscriptionTimeXLimitReached'] = "We are sorry, you have already reached yearly limit %s hours for courses";
|
||||
$strings['AdvancedSubscriptionCourseXLimitReached'] = "We are sorry, you have already reached yearly limit %s times for courses";
|
||||
$strings['AdvancedSubscriptionNotMoreAble'] = "We are sorry, you no longer fulfills the initial conditions to subscribe this course";
|
||||
$strings['AdvancedSubscriptionIncompleteParams'] = "The parameters are wrong or incomplete.";
|
||||
$strings['AdvancedSubscriptionIsNotEnabled'] = "Advanced subscription is not enabled";
|
||||
|
||||
$strings['AdvancedSubscriptionNoQueue'] = "You are not subscribed for this course.";
|
||||
$strings['AdvancedSubscriptionNoQueueIsAble'] = "You are not subscribed, but you are qualified for this course.";
|
||||
$strings['AdvancedSubscriptionQueueStart'] = "Your subscription request is pending for approval by your boss, please wait attentive.";
|
||||
$strings['AdvancedSubscriptionQueueBossDisapproved'] = "We are sorry, your subscription was rejected by your boss.";
|
||||
$strings['AdvancedSubscriptionQueueBossApproved'] = "Your subscription request has been accepted by your boss, now is pending for vacancies.";
|
||||
$strings['AdvancedSubscriptionQueueAdminDisapproved'] = "We are sorry, your subscription was rejected by the administrator.";
|
||||
$strings['AdvancedSubscriptionQueueAdminApproved'] = "Congratulations!, your subscription request has been accepted by administrator.";
|
||||
$strings['AdvancedSubscriptionQueueDefaultX'] = "There was an error, queue status %d is not defined by system.";
|
||||
|
||||
// Mail translations
|
||||
$strings['MailStudentRequest'] = 'Student registration request';
|
||||
$strings['MailBossAccept'] = 'Registration request accepted by boss';
|
||||
$strings['MailBossReject'] = 'Registration request rejected by boss';
|
||||
$strings['MailStudentRequestSelect'] = 'Student registration requests selection';
|
||||
$strings['MailAdminAccept'] = 'Registration request accepted by administrator';
|
||||
$strings['MailAdminReject'] = 'Registration request rejected by administrator';
|
||||
$strings['MailStudentRequestNoBoss'] = 'Student registration request without boss';
|
||||
$strings['MailRemindStudent'] = 'Subscription request reminder';
|
||||
$strings['MailRemindSuperior'] = 'Subscription request are pending your approval';
|
||||
$strings['MailRemindAdmin'] = 'Course subscription are pending your approval';
|
||||
|
||||
// TPL langs
|
||||
$strings['SessionXWithoutVacancies'] = "The course \"%s\" has no vacancies.";
|
||||
$strings['SuccessSubscriptionToSessionX'] = "<h4>¡Congratulations!</h4>Your subscription to \"%s\" course has been completed successfully.";
|
||||
$strings['SubscriptionToOpenSession'] = "Subscription to open course";
|
||||
$strings['GoToSessionX'] = "Go to \"%s\" course";
|
||||
$strings['YouAreAlreadySubscribedToSessionX'] = "You are already subscribed to \"%s\" course.";
|
||||
|
||||
// Admin view
|
||||
$strings['SelectASession'] = 'Select a training session';
|
||||
$strings['SessionName'] = 'Session name';
|
||||
$strings['Target'] = 'Target audience';
|
||||
$strings['Vacancies'] = 'Vacancies';
|
||||
$strings['RecommendedNumberOfParticipants'] = 'Recommended number of participants by area';
|
||||
$strings['PublicationEndDate'] = 'Publication end date';
|
||||
$strings['Mode'] = 'Mode';
|
||||
$strings['Postulant'] = 'Postulant';
|
||||
$strings['Area'] = 'Area';
|
||||
$strings['Institution'] = 'Institution';
|
||||
$strings['InscriptionDate'] = 'Inscription date';
|
||||
$strings['BossValidation'] = 'Boss validation';
|
||||
$strings['Decision'] = 'Decision';
|
||||
$strings['AdvancedSubscriptionAdminViewTitle'] = 'Subscription request confirmation result';
|
||||
|
||||
$strings['AcceptInfinitive'] = 'Accept';
|
||||
$strings['RejectInfinitive'] = 'Reject';
|
||||
$strings['AreYouSureYouWantToAcceptSubscriptionOfX'] = 'Are you sure you want to accept the subscription of %s?';
|
||||
$strings['AreYouSureYouWantToRejectSubscriptionOfX'] = 'Are you sure you want to reject the subscription of %s?';
|
||||
|
||||
$strings['MailTitle'] = 'Received request for course %s';
|
||||
$strings['MailDear'] = 'Dear:';
|
||||
$strings['MailThankYou'] = 'Thank you.';
|
||||
$strings['MailThankYouCollaboration'] = 'Thank you for your help.';
|
||||
|
||||
// Admin Accept
|
||||
$strings['MailTitleAdminAcceptToAdmin'] = 'Notification: subscription validation received';
|
||||
$strings['MailContentAdminAcceptToAdmin'] = 'We have received and registered your subscription validation for student <strong>%s</strong> to course <strong>%s</strong>';
|
||||
$strings['MailTitleAdminAcceptToStudent'] = 'Accepted: Your subscription to course %s has been accepted!';
|
||||
$strings['MailContentAdminAcceptToStudent'] = 'We are pleased to inform you that your registration to course <strong>%s</strong> starting on <strong>%s</strong> was validated by an administrator. We wish you good luck and hope you will consider participating to another course soon.';
|
||||
$strings['MailTitleAdminAcceptToSuperior'] = 'Notification: Subscription validation of %s to course %s';
|
||||
$strings['MailContentAdminAcceptToSuperior'] = 'Subscription of student <strong>%s</strong> to course <strong>%s</strong> starting on <strong>%s</strong> was pending but has been validated a few minutes ago. We kindly hope we can count on you to ensure the necessary availability of your collaborator during the course period.';
|
||||
|
||||
// Admin Reject
|
||||
$strings['MailTitleAdminRejectToAdmin'] = 'Notification: Rejection received';
|
||||
$strings['MailContentAdminRejectToAdmin'] = 'We have received and registered your rejection for the subscription of student <strong>%s</strong> to course <strong>%s</strong>';
|
||||
$strings['MailTitleAdminRejectToStudent'] = 'Your subscription to course %s was rejected';
|
||||
$strings['MailContentAdminRejectToStudent'] = 'We regret to inform you that your subscription to course <strong>%s</strong> starting on <strong>%s</strong> was rejected because of a lack of vacancies. We hope you will consider participating to another course soon.';
|
||||
$strings['MailTitleAdminRejectToSuperior'] = 'Notification: Subscription refusal for student %s to course %s';
|
||||
$strings['MailContentAdminRejectToSuperior'] = 'The subscription of <strong>%s</strong> to course <strong>%s</strong> that you previously validated was rejected because of a lack of vacancies. Our sincere apologies.';
|
||||
|
||||
// Superior Accept
|
||||
$strings['MailTitleSuperiorAcceptToAdmin'] = 'Approval for subscription of %s to course %s ';
|
||||
$strings['MailContentSuperiorAcceptToAdmin'] = 'The subscription of student <strong>%s</strong> to course <strong>%s</strong> has been accepted by his superior. You can <a href="%s">manage subscriptions here</a>';
|
||||
$strings['MailTitleSuperiorAcceptToSuperior'] = 'Confirmation: Approval received for %s';
|
||||
$strings['MailContentSuperiorAcceptToSuperior'] = 'We have received and registered you validation of subscription to course <strong>%s</strong> of your collaborator <strong>%s</strong>';
|
||||
$strings['MailContentSuperiorAcceptToSuperiorSecond'] = 'The subscription is now pending for a vacancies confirmation. We will keep you informed about changes of status for this subscription';
|
||||
$strings['MailTitleSuperiorAcceptToStudent'] = 'Accepted: Your subscription to course %s has been approved by your superior';
|
||||
$strings['MailContentSuperiorAcceptToStudent'] = 'We are pleased to inform you that your subscription to course <strong>%s</strong> has been accepted by your superior. Your inscription is now pending for a vacancies confirmation. We will notify you as soon as it is confirmed.';
|
||||
|
||||
// Superior Reject
|
||||
$strings['MailTitleSuperiorRejectToStudent'] = 'Notification: Your subscription to course %s has been refused';
|
||||
$strings['MailContentSuperiorRejectToStudent'] = 'We regret to inform your subscription to course <strong>%s</strong> was NOT accepted. We hope this will not reduce your motivation and encourage you to register to another course or, on another occasion, this same course soon.';
|
||||
$strings['MailTitleSuperiorRejectToSuperior'] = 'Confirmation: Rejection of subscription received for %s';
|
||||
$strings['MailContentSuperiorRejectToSuperior'] = 'We have received and registered your rejection of subscription to course <strong>%s</strong> for your collaborator <strong>%s</strong>';
|
||||
|
||||
// Student Request
|
||||
$strings['MailTitleStudentRequestToStudent'] = 'Notification: Subscription approval received';
|
||||
$strings['MailContentStudentRequestToStudent'] = 'We have received and registered your subscription request to course <strong>%s</strong> starting on <strong>%s</strong>';
|
||||
$strings['MailContentStudentRequestToStudentSecond'] = 'Your subscription is pending approval, first from your superior, then for the availability of vacancies. An email has been sent to your superior for review and approval. We will inform you when this situation changes.';
|
||||
$strings['MailTitleStudentRequestToSuperior'] = 'Course subscription request from your collaborator';
|
||||
$strings['MailContentStudentRequestToSuperior'] = 'We have received an subscription request of <strong>%s</strong> to course <strong>%s</strong>, starting on <strong>%s</strong>. Course details: <strong>%s</strong>.';
|
||||
$strings['MailContentStudentRequestToSuperiorSecond'] = 'Your are welcome to accept or reject this subscription, clicking the corresponding button.';
|
||||
|
||||
// Student Request No Boss
|
||||
$strings['MailTitleStudentRequestNoSuperiorToStudent'] = 'Your subscription request for %s has been received';
|
||||
$strings['MailContentStudentRequestNoSuperiorToStudent'] = 'We have received and registered your subscription to course <strong>%s</strong> starting on <strong>%s</strong>.';
|
||||
$strings['MailContentStudentRequestNoSuperiorToStudentSecond'] = 'Your subscription is pending availability of vacancies. You will get the results of your request approval (or rejection) soon.';
|
||||
$strings['MailTitleStudentRequestNoSuperiorToAdmin'] = 'Subscription request of %s to course %s';
|
||||
$strings['MailContentStudentRequestNoSuperiorToAdmin'] = 'The subscription of <strong>%s</strong> to course <strong>%s</strong> has been approved by default (no direct superior defined). You can <a href="%s">manage subscriptions here</strong></a>';
|
||||
|
||||
// Reminders
|
||||
$strings['MailTitleReminderAdmin'] = 'Subscriptions to %s are pending confirmation';
|
||||
$strings['MailContentReminderAdmin'] = 'The subscription requests for course <strong>%s</strong> are pending validation to be accepted. Please, go to <a href="%s">Administration page</a> to validate them.';
|
||||
$strings['MailTitleReminderStudent'] = 'Information: Your subscription request is pending approval for course %s';
|
||||
$strings['MailContentReminderStudent'] = 'This email is just to confirm we have received and registered your subscription request to course <strong>%s</strong>, starting on <strong>%s</strong>.';
|
||||
$strings['MailContentReminderStudentSecond'] = 'Your subscription has not been approved by your superior yet, so we sent him a e-mail reminder.';
|
||||
$strings['MailTitleReminderSuperior'] = 'Course subscription request for your collaborators';
|
||||
$strings['MailContentReminderSuperior'] = 'We kindly remind you that we have received the subscription requests below to course <strong>%s</strong> from your collaborators. This course is starting on <strong>%s</strong>. Course details: <strong>%s</strong>.';
|
||||
$strings['MailContentReminderSuperiorSecond'] = 'We invite you to accept or reject this subscription request by clicking the corresponding button for each collaborator.';
|
||||
$strings['MailTitleReminderMaxSuperior'] = 'Reminder: Course subscription request for your collaborators';
|
||||
$strings['MailContentReminderMaxSuperior'] = 'We kindly remind you that we have received the subscription requests below to course <strong>%s</strong> from your collaborators. This course is starting on <strong>%s</strong>. Course details: <strong>%s</strong>.';
|
||||
$strings['MailContentReminderMaxSuperiorSecond'] = 'This course have limited vacancies and has received a high subscription request rate, So we recommend all areas to accept at most <strong>%s</strong> candidates. We invite you to accept or reject the inscription request by clicking the corresponding button for each collaborator.';
|
||||
|
||||
$strings['YouMustAcceptTermsAndConditions'] = 'To subscribe to course <strong>%s</strong>, you must accept these terms and conditions.';
|
||||
148
plugin/advanced_subscription/lang/french.php
Normal file
@@ -0,0 +1,148 @@
|
||||
<?php
|
||||
|
||||
/* Strings for settings */
|
||||
$strings['plugin_title'] = 'Inscriptions avancées';
|
||||
$strings['plugin_comment'] = 'Plugin qui permet de gérer des listes d\'attente pour l\'inscription aux sessions, avec communications avec un portail extérieur';
|
||||
$strings['ws_url'] = 'URL du Service Web';
|
||||
$strings['ws_url_help'] = 'L\'URL depuis laquelle l\'information est requise pour le processus d\'inscription avancée';
|
||||
$strings['check_induction'] = 'Activer le cours d\'induction comme pré-requis';
|
||||
$strings['check_induction_help'] = 'Décidez s\'il est nécessaire de compléter les cours d\'induction';
|
||||
$strings['yearly_cost_limit'] = 'Límite d\'unités de taxe';
|
||||
$strings['yearly_cost_limit_help'] = "La limite d\'unités de taxe à utiliser pour des cours dans l\'année calendrier actuelle.";
|
||||
$strings['yearly_hours_limit'] = 'Límite d\'heures académiques';
|
||||
$strings['yearly_hours_limit_help'] = "La límite d\'heures académiques de cours qui peuvent être suivies en une année calendrier.";
|
||||
$strings['yearly_cost_unit_converter'] = 'Valeur d\'une unité de taxe';
|
||||
$strings['yearly_cost_unit_converter_help'] = "La valeur en devise locale d\'une unité de taxe de l\'année actuelle.";
|
||||
$strings['courses_count_limit'] = 'Límite de sessions';
|
||||
$strings['courses_count_limit_help'] = "La límite de nombre de cours (sessions) qui peuvent être suivis durant une année calendrier et qui <strong>ne sont pas</strong> le cours d'induction";
|
||||
$strings['course_session_credit_year_start_date'] = 'Date de début';
|
||||
$strings['course_session_credit_year_start_date_help'] = "Date de début de l'année (jour/mois)";
|
||||
$strings['min_profile_percentage'] = 'Pourcentage du profil complété mínimum requis';
|
||||
$strings['min_profile_percentage_help'] = 'Numéro pourcentage ( > 0.00 et < 100.00)';
|
||||
$strings['secret_key'] = 'Clef secrète';
|
||||
$strings['terms_and_conditions'] = 'Conditions d\'utilisation';
|
||||
|
||||
/* String for error message about requirements */
|
||||
$strings['AdvancedSubscriptionNotConnected'] = "Vous n'êtes pas connecté à la plateforme. Merci d'introduire votre nom d'utilisateur / mot de passe afin de vous inscrire";
|
||||
$strings['AdvancedSubscriptionProfileIncomplete'] = "Vous devez d'abord compléter votre profil <strong>à %d pourcents</strong> ou plus. Pour l'instant vous n'avez complété que <strong>%d pourcents</strong>";
|
||||
$strings['AdvancedSubscriptionIncompleteInduction'] = "Vous n'avez pas encore passé le cours d'induction. Merci de commencer par cette étape.";
|
||||
$strings['AdvancedSubscriptionCostXLimitReached'] = "Désolé, vous avez déjà atteint la limite de %s unités de taxe pour les cours que vous avez suivi cette année";
|
||||
$strings['AdvancedSubscriptionTimeXLimitReached'] = "Désolé, vous avez déjà atteint la limite annuelle du nombre de %s heures pour les cours que vous avez suivi cette année";
|
||||
$strings['AdvancedSubscriptionCourseXLimitReached'] = "Désolé, vous avez déjà atteint la limite annuelle du nombre de cours (%s) à suivre cette année";
|
||||
$strings['AdvancedSubscriptionNotMoreAble'] = "Désolé, vous ne répondez plus aux conditions d'utilisation minimum pour l'inscription à un cours";
|
||||
$strings['AdvancedSubscriptionIncompleteParams'] = "Les paramètres envoyés ne sont pas complets ou sont incorrects.";
|
||||
$strings['AdvancedSubscriptionIsNotEnabled'] = "L'inscription avancée n'est pas activée";
|
||||
$strings['AdvancedSubscriptionNoQueue'] = "Vous n'êtes pas inscrit dans ce cours";
|
||||
$strings['AdvancedSubscriptionNoQueueIsAble'] = "Vous n'êtes pas inscrit mais vous qualifiez pour ce cours";
|
||||
$strings['AdvancedSubscriptionQueueStart'] = "Votre demande d'inscription est en attente de l'approbation de votre supérieur(e). Merci de patienter.";
|
||||
$strings['AdvancedSubscriptionQueueBossDisapproved'] = "Désolé, votre inscription a été déclinée par votre supérieur(e).";
|
||||
$strings['AdvancedSubscriptionQueueBossApproved'] = "Votre demande d'inscription a été acceptée par votre supérieur(e), mais est en attente de places libres.";
|
||||
$strings['AdvancedSubscriptionQueueAdminDisapproved'] = "Désolé, votre inscription a été déclinée par l'administrateur.";
|
||||
$strings['AdvancedSubscriptionQueueAdminApproved'] = "Félicitations! Votre inscription a été acceptée par l'administrateur.";
|
||||
$strings['AdvancedSubscriptionQueueDefaultX'] = "Une erreur est survenue: l'état de la file d'attente %s n'est pas défini dans le système.";
|
||||
|
||||
// Mail translations
|
||||
$strings['MailStudentRequest'] = 'Demange d\'inscription d\'un(e) apprenant(e)';
|
||||
$strings['MailBossAccept'] = 'Demande d\'inscription acceptée par votre supérieur(e)';
|
||||
$strings['MailBossReject'] = 'Demande d\'inscription déclinée par votre supérieur(e)';
|
||||
$strings['MailStudentRequestSelect'] = 'Sélection des demandes d\'inscriptions d\'apprenants';
|
||||
$strings['MailAdminAccept'] = 'Demande d\'inscription acceptée par l\'administrateur';
|
||||
$strings['MailAdminReject'] = 'Demande d\'inscription déclinée par l\'administrateur';
|
||||
$strings['MailStudentRequestNoBoss'] = 'Demande d\'inscription d\'apprenant sans supérieur(e)';
|
||||
$strings['MailRemindStudent'] = 'Rappel de demande d\'inscription';
|
||||
$strings['MailRemindSuperior'] = 'Demandes d\'inscription en attente de votre approbation';
|
||||
$strings['MailRemindAdmin'] = 'Inscriptions en attente de votre approbation';
|
||||
|
||||
// TPL translations
|
||||
$strings['SessionXWithoutVacancies'] = "Le cours \"%s\" ne dispose plus de places libres.";
|
||||
$strings['SuccessSubscriptionToSessionX'] = "<h4>Félicitations!</h4> Votre inscription au cours \"%s\" est en ordre.";
|
||||
$strings['SubscriptionToOpenSession'] = "Inscription à cours ouvert";
|
||||
$strings['GoToSessionX'] = "Aller dans le cours \"%s\"";
|
||||
$strings['YouAreAlreadySubscribedToSessionX'] = "Vous êtes déjà inscrit(e) au cours \"%s\".";
|
||||
|
||||
// Admin view
|
||||
$strings['SelectASession'] = 'Sélectionnez une session de formation';
|
||||
$strings['SessionName'] = 'Nom de la session';
|
||||
$strings['Target'] = 'Public cible';
|
||||
$strings['Vacancies'] = 'Places libres';
|
||||
$strings['RecommendedNumberOfParticipants'] = 'Nombre recommandé de participants par département';
|
||||
$strings['PublicationEndDate'] = 'Date de fin de publication';
|
||||
$strings['Mode'] = 'Modalité';
|
||||
$strings['Postulant'] = 'Candidats';
|
||||
$strings['Area'] = 'Département';
|
||||
$strings['Institution'] = 'Institution';
|
||||
$strings['InscriptionDate'] = 'Date d\'inscription';
|
||||
$strings['BossValidation'] = 'Validation du supérieur';
|
||||
$strings['Decision'] = 'Décision';
|
||||
$strings['AdvancedSubscriptionAdminViewTitle'] = 'Résultat de confirmation de demande d\'inscription';
|
||||
|
||||
$strings['AcceptInfinitive'] = 'Accepter';
|
||||
$strings['RejectInfinitive'] = 'Refuser';
|
||||
$strings['AreYouSureYouWantToAcceptSubscriptionOfX'] = 'Êtes-vous certain de vouloir accepter l\'inscription de %s?';
|
||||
$strings['AreYouSureYouWantToRejectSubscriptionOfX'] = 'Êtes-vous certain de vouloir refuser l\'inscription de %s?';
|
||||
|
||||
$strings['MailTitle'] = 'Demande reçue pour le cours %s';
|
||||
$strings['MailDear'] = 'Cher/Chère';
|
||||
$strings['MailThankYou'] = 'Merci.';
|
||||
$strings['MailThankYouCollaboration'] = 'Merci de votre collaboration.';
|
||||
|
||||
// Admin Accept
|
||||
$strings['MailTitleAdminAcceptToAdmin'] = 'Information: Validation d\'inscription reçue';
|
||||
$strings['MailContentAdminAcceptToAdmin'] = 'Nous avons bien reçu et enregistré votre validation de l\'inscription de <strong>%s</strong> au cours <strong>%s</strong>';
|
||||
$strings['MailTitleAdminAcceptToStudent'] = 'Approuvé(e): Votre inscription au cours %s a été confirmée!';
|
||||
$strings['MailContentAdminAcceptToStudent'] = 'C\'est avec plaisir que nous vous informons que votre inscription au cours <strong>%s</strong> démarrant le <strong>%s</strong> a été validée par les administrateurs. Nous espérons que votre motivation s\'est maintenue à 100% et que vous participerez à d\'autres cours ou répétiez ce cours à l\'avenir.';
|
||||
$strings['MailTitleAdminAcceptToSuperior'] = 'Information: Validation de l\'inscription de %s au cours %s';
|
||||
$strings['MailContentAdminAcceptToSuperior'] = 'L\'inscription de <strong>%s</strong> au cours <strong>%s</strong> qui démarre le <strong>%s</strong>, qui était en attente de validation par les organisateurs du cours, vient d\'être validée. Nous espérons que vous nous donnerez un coup de main pour assurer la disponibilité complète de votre collaborateur pour toute la durée du cours';
|
||||
|
||||
// Admin Reject
|
||||
$strings['MailTitleAdminRejectToAdmin'] = 'Information: refus d\'inscription reçu';
|
||||
$strings['MailContentAdminRejectToAdmin'] = 'Nous avons bien reçu et enregistré votre refus pour l\'inscription de <strong>%s</strong> au cours <strong>%s</strong>';
|
||||
$strings['MailTitleAdminRejectToStudent'] = 'Votre demande d\'inscription au cours %s a été refusée';
|
||||
$strings['MailContentAdminRejectToStudent'] = 'Nous déplorons le besoin de vous informer que vote demande d\'inscription au cours <strong>%s</strong> démarrant le <strong>%s</strong> a été refusée pour manque de place. Nous espérons que vous maintiendrez votre motivation et que vous pourrez participer au même ou à un autre cours lors d\'une prochaine occasion.';
|
||||
$strings['MailTitleAdminRejectToSuperior'] = 'Information: Refus d\'inscription de %s au cours %s';
|
||||
$strings['MailContentAdminRejectToSuperior'] = 'L\'inscription de <strong>%s</strong> au cours <strong>%s</strong>, qui avait été approuvée antérieurement, a été refusée par manque de place. Nous vous présentons nos excuses sincères.';
|
||||
|
||||
// Superior Accept
|
||||
$strings['MailTitleSuperiorAcceptToAdmin'] = 'Aprobación de %s al curso %s ';
|
||||
$strings['MailContentSuperiorAcceptToAdmin'] = 'La inscripción del alumno <strong>%s</strong> al curso <strong>%s</strong> ha sido aprobada por su superior. Puede gestionar las inscripciones al curso <a href="%s"><strong>aquí</strong></a>';
|
||||
$strings['MailTitleSuperiorAcceptToSuperior'] = 'Confirmación: Aprobación recibida para %s';
|
||||
$strings['MailContentSuperiorAcceptToSuperior'] = 'Hemos recibido y registrado su decisión de aprobar el curso <strong>%s</strong> para su colaborador <strong>%s</strong>';
|
||||
$strings['MailContentSuperiorAcceptToSuperiorSecond'] = 'Ahora la inscripción al curso está pendiente de la disponibilidad de cupos. Le mantendremos informado sobre el resultado de esta etapa';
|
||||
$strings['MailTitleSuperiorAcceptToStudent'] = 'Aprobado: Su inscripción al curso %s ha sido aprobada por su superior ';
|
||||
$strings['MailContentSuperiorAcceptToStudent'] = 'Nos complace informarle que su inscripción al curso <strong>%s</strong> ha sido aprobada por su superior. Su inscripción ahora solo se encuentra pendiente de disponibilidad de cupos. Le avisaremos tan pronto como se confirme este último paso.';
|
||||
|
||||
// Superior Reject
|
||||
$strings['MailTitleSuperiorRejectToStudent'] = 'Información: Su inscripción al curso %s ha sido rechazada ';
|
||||
$strings['MailContentSuperiorRejectToStudent'] = 'Lamentamos informarle que, en esta oportunidad, su inscripción al curso <strong>%s</strong> NO ha sido aprobada. Esperamos mantenga todo su ánimo y participe en otro curso o, en otra oportunidad, a este mismo curso.';
|
||||
$strings['MailTitleSuperiorRejectToSuperior'] = 'Confirmación: Desaprobación recibida para %s';
|
||||
$strings['MailContentSuperiorRejectToSuperior'] = 'Hemos recibido y registrado su decisión de desaprobar el curso <strong>%s</strong> para su colaborador <strong>%s</strong>';
|
||||
|
||||
// Student Request
|
||||
$strings['MailTitleStudentRequestToStudent'] = 'Información: Validación de inscripción recibida';
|
||||
$strings['MailContentStudentRequestToStudent'] = 'Hemos recibido y registrado su solicitud de inscripción al curso <strong>%s</strong> para iniciarse el <strong>%s</strong>.';
|
||||
$strings['MailContentStudentRequestToStudentSecond'] = 'Su inscripción es pendiente primero de la aprobación de su superior, y luego de la disponibilidad de cupos. Un correo ha sido enviado a su superior para revisión y aprobación de su solicitud.';
|
||||
$strings['MailTitleStudentRequestToSuperior'] = 'Solicitud de consideración de curso para un colaborador';
|
||||
$strings['MailContentStudentRequestToSuperior'] = 'Hemos recibido una solicitud de inscripción de <strong>%s</strong> al curso <strong>%s</strong>, por iniciarse el <strong>%s</strong>. Detalles del curso: <strong>%s</strong>.';
|
||||
$strings['MailContentStudentRequestToSuperiorSecond'] = 'Le invitamos a aprobar o desaprobar esta inscripción, dando clic en el botón correspondiente a continuación.';
|
||||
|
||||
// Student Request No Boss
|
||||
$strings['MailTitleStudentRequestNoSuperiorToStudent'] = 'Solicitud recibida para el curso %s';
|
||||
$strings['MailContentStudentRequestNoSuperiorToStudent'] = 'Hemos recibido y registrado su solicitud de inscripción al curso <strong>%s</strong> para iniciarse el <strong>%s</strong>.';
|
||||
$strings['MailContentStudentRequestNoSuperiorToStudentSecond'] = 'Su inscripción es pendiente de la disponibilidad de cupos. Pronto recibirá los resultados de su aprobación de su solicitud.';
|
||||
$strings['MailTitleStudentRequestNoSuperiorToAdmin'] = 'Solicitud de inscripción de %s para el curso %s';
|
||||
$strings['MailContentStudentRequestNoSuperiorToAdmin'] = 'La inscripción del alumno <strong>%s</strong> al curso <strong>%s</strong> ha sido aprobada por defecto, a falta de superior. Puede gestionar las inscripciones al curso <a href="%s"><strong>aquí</strong></a>';
|
||||
|
||||
// Reminders
|
||||
$strings['MailTitleReminderAdmin'] = 'Inscripciones a %s pendiente de confirmación';
|
||||
$strings['MailContentReminderAdmin'] = 'Las inscripciones siguientes al curso <strong>%s</strong> están pendientes de validación para ser efectivas. Por favor, dirigese a la <a href="%s">página de administración</a> para validarlos.';
|
||||
$strings['MailTitleReminderStudent'] = 'Información: Solicitud pendiente de aprobación para el curso %s';
|
||||
$strings['MailContentReminderStudent'] = 'Este correo es para confirmar que hemos recibido y registrado su solicitud de inscripción al curso <strong>%s</strong>, por iniciarse el <strong>%s</strong>.';
|
||||
$strings['MailContentReminderStudentSecond'] = 'Su inscripción todavía no ha sido aprobada por su superior, por lo que hemos vuelto a enviarle un correo electrónico de recordatorio.';
|
||||
$strings['MailTitleReminderSuperior'] = 'Solicitud de consideración de curso para un colaborador';
|
||||
$strings['MailContentReminderSuperior'] = 'Le recordamos que hemos recibido las siguientes solicitudes de suscripción para el curso <strong>%s</strong> de parte de sus colaboradores. El curso se iniciará el <strong>%s</strong>. Detalles del curso: <strong>%s</strong>.';
|
||||
$strings['MailContentReminderSuperiorSecond'] = 'Le invitamos a aprobar o desaprobar las suscripciones, dando clic en el botón correspondiente a continuación para cada colaborador.';
|
||||
$strings['MailTitleReminderMaxSuperior'] = 'Recordatorio: Solicitud de consideración de curso para colaborador(es)';
|
||||
$strings['MailContentReminderMaxSuperior'] = 'Le recordamos que hemos recibido las siguientes solicitudes de suscripción al curso <strong>%s</strong> de parte de sus colaboradores. El curso se iniciará el <strong>%s</strong>. Detalles del curso: <strong>%s</strong>.';
|
||||
$strings['MailContentReminderMaxSuperiorSecond'] = 'Este curso tiene una cantidad de cupos limitados y ha recibido una alta tasa de solicitudes de inscripción, por lo que recomendamos que cada área apruebe un máximo de <strong>%s</strong> candidatos. Le invitamos a aprobar o desaprobar las suscripciones, dando clic en el botón correspondiente a continuación para cada colaborador.';
|
||||
|
||||
$strings['YouMustAcceptTermsAndConditions'] = 'Para inscribirse al curso <strong>%s</strong>, debe aceptar estos términos y condiciones.';
|
||||
149
plugin/advanced_subscription/lang/spanish.php
Normal file
@@ -0,0 +1,149 @@
|
||||
<?php
|
||||
|
||||
/* Strings for settings */
|
||||
$strings['plugin_title'] = 'Inscripción Avanzada';
|
||||
$strings['plugin_comment'] = 'Plugin que permite gestionar la inscripción en cola a sesiones con comunicación a a un portal externo';
|
||||
$strings['ws_url'] = 'URL del Webservice';
|
||||
$strings['ws_url_help'] = 'La URL de la cual se solicitará información para el proceso de la inscripción avanzada';
|
||||
$strings['check_induction'] = 'Activar requerimiento de curso inducción';
|
||||
$strings['check_induction_help'] = 'Escoja si se requiere que se complete los cursos de inducción';
|
||||
$strings['yearly_cost_limit'] = 'Límite de UITs';
|
||||
$strings['yearly_cost_limit_help'] = "El límite de UITs de cursos que se pueden llevar en un año calendario del año actual.";
|
||||
$strings['yearly_hours_limit'] = 'Límite de horas lectivas';
|
||||
$strings['yearly_hours_limit_help'] = "El límite de horas lectivas de cursos que se pueden llevar en un año calendario del año actual.";
|
||||
$strings['yearly_cost_unit_converter'] = 'Valor de un UIT';
|
||||
$strings['yearly_cost_unit_converter_help'] = "El valor en Soles de un UIT del año actual.";
|
||||
$strings['courses_count_limit'] = 'Límite de sesiones';
|
||||
$strings['courses_count_limit_help'] = "El límite de cantidad de cursos (sesiones) que se pueden llevar en un año calendario del año actual y que <strong>no</strong> sean el curso de inducción";
|
||||
$strings['course_session_credit_year_start_date'] = 'Fecha de inicio';
|
||||
$strings['course_session_credit_year_start_date_help'] = "Fecha de inicio del año (día/mes)";
|
||||
$strings['min_profile_percentage'] = 'Porcentage de perfil completado mínimo requerido';
|
||||
$strings['min_profile_percentage_help'] = 'Número porcentage ( > 0.00 y < 100.00)';
|
||||
$strings['secret_key'] = 'LLave secreta';
|
||||
$strings['terms_and_conditions'] = 'Términos y condiciones';
|
||||
|
||||
/* String for error message about requirements */
|
||||
$strings['AdvancedSubscriptionNotConnected'] = "Usted no está conectado en la plataforma. Por favor ingrese su usuario / constraseña para poder inscribirse";
|
||||
$strings['AdvancedSubscriptionProfileIncomplete'] = "Debe llenar el <strong>%d porciento</strong> de tu perfil como mínimo. Por ahora has llenado el <strong>%d porciento</strong>";
|
||||
$strings['AdvancedSubscriptionIncompleteInduction'] = "Usted aún no ha completado el curso de inducción. Por favor complete el curso inducción";
|
||||
$strings['AdvancedSubscriptionCostXLimitReached'] = "Lo sentimos, usted ya ha alcanzado el límite anual de %s UIT para los cursos que ha seguido este año";
|
||||
$strings['AdvancedSubscriptionTimeXLimitReached'] = "Lo sentimos, usted ya ha alcanzado el límite anual de %s horas para los cursos que ha seguido este año";
|
||||
$strings['AdvancedSubscriptionCourseXLimitReached'] = "Lo sentimos, usted ya ha alcanzado el límite anual de %s cursos que ha seguido este año";
|
||||
$strings['AdvancedSubscriptionNotMoreAble'] = "Lo sentimos, usted ya no cumple con las condiciones iniciales para poder inscribirse al curso";
|
||||
$strings['AdvancedSubscriptionIncompleteParams'] = "Los parámetros enviados no están completos o no son los correctos.";
|
||||
$strings['AdvancedSubscriptionIsNotEnabled'] = "La inscripción avanzada no está activada";
|
||||
|
||||
$strings['AdvancedSubscriptionNoQueue'] = "Usted no está inscrito para este curso.";
|
||||
$strings['AdvancedSubscriptionNoQueueIsAble'] = "Usted no está inscrito, pero está calificado para este curso.";
|
||||
$strings['AdvancedSubscriptionQueueStart'] = "Su solicitud de inscripción está pendiente de la aprobación de su jefe, por favor espere atentamente.";
|
||||
$strings['AdvancedSubscriptionQueueBossDisapproved'] = "Lo sentimos, tu inscripción fue rechazada por tu jefe.";
|
||||
$strings['AdvancedSubscriptionQueueBossApproved'] = "Tu solicitud de inscripción ha sido aceptado por tu jefe, ahora está en espera de vacantes.";
|
||||
$strings['AdvancedSubscriptionQueueAdminDisapproved'] = "Lo sentimos, Tu inscripción ha sido rechazada por el administrador.";
|
||||
$strings['AdvancedSubscriptionQueueAdminApproved'] = "¡Felicitaciones! Tu inscripción ha sido aceptada por el administrador.";
|
||||
$strings['AdvancedSubscriptionQueueDefaultX'] = "Hubo un error el estado en cola %d no está definido en el sistema.";
|
||||
|
||||
// Mail translations
|
||||
$strings['MailStudentRequest'] = 'Solicitud de registro de estudiante';
|
||||
$strings['MailBossAccept'] = 'Solicitud de registro aceptada por superior';
|
||||
$strings['MailBossReject'] = 'Solicitud de registro rechazada por superior';
|
||||
$strings['MailStudentRequestSelect'] = 'Selección de solicitudes de registro de estudiante';
|
||||
$strings['MailAdminAccept'] = 'Solicitud de registro aceptada por administrador';
|
||||
$strings['MailAdminReject'] = 'Solicitud de registro rechazada por administrador';
|
||||
$strings['MailStudentRequestNoBoss'] = 'Solicitud de registro de estudiante sin superior';
|
||||
$strings['MailRemindStudent'] = 'Recordatorio de la solicitud de inscripción';
|
||||
$strings['MailRemindSuperior'] = 'Solicitudes de inscripción estan pendientes de tu aprobación';
|
||||
$strings['MailRemindAdmin'] = 'Inscripciones de cursos estan pendientes de tu aprobación';
|
||||
|
||||
// TPL translations
|
||||
$strings['SessionXWithoutVacancies'] = "El curso \"%s\" no tiene cupos disponibles.";
|
||||
$strings['SuccessSubscriptionToSessionX'] = "<h4>¡Felicitaciones!</h4> Tu inscripción al curso \"%s\" se realizó correctamente.";
|
||||
$strings['SubscriptionToOpenSession'] = "Inscripcion a curso abierto";
|
||||
$strings['GoToSessionX'] = "Ir al curso \"%s\"";
|
||||
$strings['YouAreAlreadySubscribedToSessionX'] = "Usted ya está inscrito al curso \"%s\".";
|
||||
|
||||
// Admin view
|
||||
$strings['SelectASession'] = 'Elija una sesión de formación';
|
||||
$strings['SessionName'] = 'Nombre de la sesión';
|
||||
$strings['Target'] = 'Publico objetivo';
|
||||
$strings['Vacancies'] = 'Vacantes';
|
||||
$strings['RecommendedNumberOfParticipants'] = 'Número recomendado de participantes por área';
|
||||
$strings['PublicationEndDate'] = 'Fecha fin de publicación';
|
||||
$strings['Mode'] = 'Modalidad';
|
||||
$strings['Postulant'] = 'Postulante';
|
||||
$strings['Area'] = 'Área';
|
||||
$strings['Institution'] = 'Institución';
|
||||
$strings['InscriptionDate'] = 'Fecha de inscripción';
|
||||
$strings['BossValidation'] = 'Validación del superior';
|
||||
$strings['Decision'] = 'Decisión';
|
||||
$strings['AdvancedSubscriptionAdminViewTitle'] = 'Resultado de confirmación de solicitud de inscripción';
|
||||
|
||||
$strings['AcceptInfinitive'] = 'Aceptar';
|
||||
$strings['RejectInfinitive'] = 'Rechazar';
|
||||
$strings['AreYouSureYouWantToAcceptSubscriptionOfX'] = '¿Está seguro que quiere aceptar la inscripción de %s?';
|
||||
$strings['AreYouSureYouWantToRejectSubscriptionOfX'] = '¿Está seguro que quiere rechazar la inscripción de %s?';
|
||||
|
||||
$strings['MailTitle'] = 'Solicitud recibida para el curso %s';
|
||||
$strings['MailDear'] = 'Estimado(a):';
|
||||
$strings['MailThankYou'] = 'Gracias.';
|
||||
$strings['MailThankYouCollaboration'] = 'Gracias por su colaboración.';
|
||||
|
||||
// Admin Accept
|
||||
$strings['MailTitleAdminAcceptToAdmin'] = 'Información: Validación de inscripción recibida';
|
||||
$strings['MailContentAdminAcceptToAdmin'] = 'Hemos recibido y registrado su validación de la inscripción de <strong>%s</strong> al curso <strong>%s</strong>';
|
||||
$strings['MailTitleAdminAcceptToStudent'] = 'Aprobada: ¡Su inscripción al curso %s fue confirmada!';
|
||||
$strings['MailContentAdminAcceptToStudent'] = 'Nos complace informarle que su inscripción al curso <strong>%s</strong> iniciando el <strong>%s</strong> fue validada por los administradores. Esperamos mantenga todo su ánimo y participe en otro curso o, en otra oportunidad, a este mismo curso.';
|
||||
$strings['MailTitleAdminAcceptToSuperior'] = 'Información: Validación de inscripción de %s al curso %s';
|
||||
$strings['MailContentAdminAcceptToSuperior'] = 'La inscripción de <strong>%s</strong> al curso <strong>%s</strong> iniciando el <strong>%s</strong>, que estaba pendiente de validación por los organizadores del curso, fue validada hacen unos minutos. Esperamos nos ayude en asegurar la completa disponibilidad de su colaborador(a) para la duración completa del curso.';
|
||||
|
||||
// Admin Reject
|
||||
$strings['MailTitleAdminRejectToAdmin'] = 'Información: rechazo de inscripción recibido';
|
||||
$strings['MailContentAdminRejectToAdmin'] = 'Hemos recibido y registrado su rechazo de la inscripción de <strong>%s</strong> al curso <strong>%s</strong>';
|
||||
$strings['MailTitleAdminRejectToStudent'] = 'Rechazamos su inscripción al curso %s';
|
||||
$strings['MailContentAdminRejectToStudent'] = 'Lamentamos informarle que su inscripción al curso <strong>%s</strong> iniciando el <strong>%s</strong> fue rechazada por falta de cupos. Esperamos mantenga todo su ánimo y participe en otro curso o, en otra oportunidad, a este mismo curso.';
|
||||
$strings['MailTitleAdminRejectToSuperior'] = 'Información: Rechazo de inscripción de %s al curso %s';
|
||||
$strings['MailContentAdminRejectToSuperior'] = 'La inscripción de <strong>%s</strong> al curso <strong>%s</strong>, que había aprobado anteriormente, fue rechazada por falta de cupos. Les presentamos nuestras disculpas sinceras.';
|
||||
|
||||
// Superior Accept
|
||||
$strings['MailTitleSuperiorAcceptToAdmin'] = 'Aprobación de %s al curso %s ';
|
||||
$strings['MailContentSuperiorAcceptToAdmin'] = 'La inscripción del alumno <strong>%s</strong> al curso <strong>%s</strong> ha sido aprobada por su superior. Puede gestionar las inscripciones al curso <a href="%s"><strong>aquí</strong></a>';
|
||||
$strings['MailTitleSuperiorAcceptToSuperior'] = 'Confirmación: Aprobación recibida para %s';
|
||||
$strings['MailContentSuperiorAcceptToSuperior'] = 'Hemos recibido y registrado su decisión de aprobar el curso <strong>%s</strong> para su colaborador <strong>%s</strong>';
|
||||
$strings['MailContentSuperiorAcceptToSuperiorSecond'] = 'Ahora la inscripción al curso está pendiente de la disponibilidad de cupos. Le mantendremos informado sobre el resultado de esta etapa';
|
||||
$strings['MailTitleSuperiorAcceptToStudent'] = 'Aprobado: Su inscripción al curso %s ha sido aprobada por su superior ';
|
||||
$strings['MailContentSuperiorAcceptToStudent'] = 'Nos complace informarle que su inscripción al curso <strong>%s</strong> ha sido aprobada por su superior. Su inscripción ahora solo se encuentra pendiente de disponibilidad de cupos. Le avisaremos tan pronto como se confirme este último paso.';
|
||||
|
||||
// Superior Reject
|
||||
$strings['MailTitleSuperiorRejectToStudent'] = 'Información: Su inscripción al curso %s ha sido rechazada ';
|
||||
$strings['MailContentSuperiorRejectToStudent'] = 'Lamentamos informarle que, en esta oportunidad, su inscripción al curso <strong>%s</strong> NO ha sido aprobada. Esperamos mantenga todo su ánimo y participe en otro curso o, en otra oportunidad, a este mismo curso.';
|
||||
$strings['MailTitleSuperiorRejectToSuperior'] = 'Confirmación: Desaprobación recibida para %s';
|
||||
$strings['MailContentSuperiorRejectToSuperior'] = 'Hemos recibido y registrado su decisión de desaprobar el curso <strong>%s</strong> para su colaborador <strong>%s</strong>';
|
||||
|
||||
// Student Request
|
||||
$strings['MailTitleStudentRequestToStudent'] = 'Información: Validación de inscripción recibida';
|
||||
$strings['MailContentStudentRequestToStudent'] = 'Hemos recibido y registrado su solicitud de inscripción al curso <strong>%s</strong> para iniciarse el <strong>%s</strong>.';
|
||||
$strings['MailContentStudentRequestToStudentSecond'] = 'Su inscripción es pendiente primero de la aprobación de su superior, y luego de la disponibilidad de cupos. Un correo ha sido enviado a su superior para revisión y aprobación de su solicitud.';
|
||||
$strings['MailTitleStudentRequestToSuperior'] = 'Solicitud de consideración de curso para un colaborador';
|
||||
$strings['MailContentStudentRequestToSuperior'] = 'Hemos recibido una solicitud de inscripción de <strong>%s</strong> al curso <strong>%s</strong>, por iniciarse el <strong>%s</strong>. Detalles del curso: <strong>%s</strong>.';
|
||||
$strings['MailContentStudentRequestToSuperiorSecond'] = 'Le invitamos a aprobar o desaprobar esta inscripción, dando clic en el botón correspondiente a continuación.';
|
||||
|
||||
// Student Request No Boss
|
||||
$strings['MailTitleStudentRequestNoSuperiorToStudent'] = 'Solicitud recibida para el curso %s';
|
||||
$strings['MailContentStudentRequestNoSuperiorToStudent'] = 'Hemos recibido y registrado su solicitud de inscripción al curso <strong>%s</strong> para iniciarse el <strong>%s</strong>.';
|
||||
$strings['MailContentStudentRequestNoSuperiorToStudentSecond'] = 'Su inscripción es pendiente de la disponibilidad de cupos. Pronto recibirá los resultados de su aprobación de su solicitud.';
|
||||
$strings['MailTitleStudentRequestNoSuperiorToAdmin'] = 'Solicitud de inscripción de %s para el curso %s';
|
||||
$strings['MailContentStudentRequestNoSuperiorToAdmin'] = 'La inscripción del alumno <strong>%s</strong> al curso <strong>%s</strong> ha sido aprobada por defecto, a falta de superior. Puede gestionar las inscripciones al curso <a href="%s"><strong>aquí</strong></a>';
|
||||
|
||||
// Reminders
|
||||
$strings['MailTitleReminderAdmin'] = 'Inscripciones a %s pendiente de confirmación';
|
||||
$strings['MailContentReminderAdmin'] = 'Las inscripciones siguientes al curso <strong>%s</strong> están pendientes de validación para ser efectivas. Por favor, dirigese a la <a href="%s">página de administración</a> para validarlos.';
|
||||
$strings['MailTitleReminderStudent'] = 'Información: Solicitud pendiente de aprobación para el curso %s';
|
||||
$strings['MailContentReminderStudent'] = 'Este correo es para confirmar que hemos recibido y registrado su solicitud de inscripción al curso <strong>%s</strong>, por iniciarse el <strong>%s</strong>.';
|
||||
$strings['MailContentReminderStudentSecond'] = 'Su inscripción todavía no ha sido aprobada por su superior, por lo que hemos vuelto a enviarle un correo electrónico de recordatorio.';
|
||||
$strings['MailTitleReminderSuperior'] = 'Solicitud de consideración de curso para un colaborador';
|
||||
$strings['MailContentReminderSuperior'] = 'Le recordamos que hemos recibido las siguientes solicitudes de suscripción para el curso <strong>%s</strong> de parte de sus colaboradores. El curso se iniciará el <strong>%s</strong>. Detalles del curso: <strong>%s</strong>.';
|
||||
$strings['MailContentReminderSuperiorSecond'] = 'Le invitamos a aprobar o desaprobar las suscripciones, dando clic en el botón correspondiente a continuación para cada colaborador.';
|
||||
$strings['MailTitleReminderMaxSuperior'] = 'Recordatorio: Solicitud de consideración de curso para colaborador(es)';
|
||||
$strings['MailContentReminderMaxSuperior'] = 'Le recordamos que hemos recibido las siguientes solicitudes de suscripción al curso <strong>%s</strong> de parte de sus colaboradores. El curso se iniciará el <strong>%s</strong>. Detalles del curso: <strong>%s</strong>.';
|
||||
$strings['MailContentReminderMaxSuperiorSecond'] = 'Este curso tiene una cantidad de cupos limitados y ha recibido una alta tasa de solicitudes de inscripción, por lo que recomendamos que cada área apruebe un máximo de <strong>%s</strong> candidatos. Le invitamos a aprobar o desaprobar las suscripciones, dando clic en el botón correspondiente a continuación para cada colaborador.';
|
||||
|
||||
$strings['YouMustAcceptTermsAndConditions'] = 'Para inscribirse al curso <strong>%s</strong>, debe aceptar estos términos y condiciones.';
|
||||
1
plugin/advanced_subscription/license.txt
Normal file
@@ -0,0 +1 @@
|
||||
This plugin, as the rest of Chamilo, is released under the GNU/GPLv3 license.
|
||||
13
plugin/advanced_subscription/plugin.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
/* For license terms, see /license.txt */
|
||||
/**
|
||||
* This script is a configuration file for the date plugin. You can use it as a master for other platform plugins (course plugins are slightly different).
|
||||
* These settings will be used in the administration interface for plugins (Chamilo configuration settings->Plugins).
|
||||
*
|
||||
* @package chamilo.plugin.advanced_subscription
|
||||
*/
|
||||
/**
|
||||
* Plugin details (must be present).
|
||||
*/
|
||||
require_once __DIR__.'/config.php';
|
||||
$plugin_info = AdvancedSubscriptionPlugin::create()->get_info();
|
||||
1534
plugin/advanced_subscription/src/AdvancedSubscriptionPlugin.php
Normal file
681
plugin/advanced_subscription/src/HookAdvancedSubscription.php
Normal file
@@ -0,0 +1,681 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
/**
|
||||
* Hook Observer for Advanced subscription plugin.
|
||||
*
|
||||
* @author Daniel Alejandro Barreto Alva <daniel.barreto@beeznest.com>
|
||||
*
|
||||
* @package chamilo.plugin.advanced_subscription
|
||||
*/
|
||||
require_once __DIR__.'/../config.php';
|
||||
|
||||
/**
|
||||
* Class HookAdvancedSubscription extends the HookObserver to implements
|
||||
* specific behaviour when the AdvancedSubscription plugin is enabled.
|
||||
*/
|
||||
class HookAdvancedSubscription extends HookObserver implements HookAdminBlockObserverInterface, HookWSRegistrationObserverInterface, HookNotificationContentObserverInterface
|
||||
{
|
||||
public static $plugin;
|
||||
|
||||
/**
|
||||
* Constructor. Calls parent, mainly.
|
||||
*/
|
||||
protected function __construct()
|
||||
{
|
||||
self::$plugin = AdvancedSubscriptionPlugin::create();
|
||||
parent::__construct(
|
||||
'plugin/advanced_subscription/src/HookAdvancedSubscription.class.php',
|
||||
'advanced_subscription'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function hookAdminBlock(HookAdminBlockEventInterface $hook)
|
||||
{
|
||||
$data = $hook->getEventData();
|
||||
// if ($data['type'] === HOOK_EVENT_TYPE_PRE) // Nothing to do
|
||||
if ($data['type'] === HOOK_EVENT_TYPE_POST) {
|
||||
if (isset($data['blocks'])) {
|
||||
$data['blocks']['sessions']['items'][] = [
|
||||
'url' => '../../plugin/advanced_subscription/src/admin_view.php',
|
||||
'label' => get_plugin_lang('plugin_title', 'AdvancedSubscriptionPlugin'),
|
||||
];
|
||||
}
|
||||
} // Else: Hook type is not valid, nothing to do
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add Webservices to registration.soap.php.
|
||||
*
|
||||
* @return mixed (int or false)
|
||||
*/
|
||||
public function hookWSRegistration(HookWSRegistrationEventInterface $hook)
|
||||
{
|
||||
$data = $hook->getEventData();
|
||||
//if ($data['type'] === HOOK_EVENT_TYPE_PRE) // nothing to do
|
||||
if ($data['type'] === HOOK_EVENT_TYPE_POST) {
|
||||
/** @var \nusoap_server $server */
|
||||
$server = &$data['server'];
|
||||
|
||||
/** WSSessionListInCategory */
|
||||
|
||||
// Output params for sessionBriefList WSSessionListInCategory
|
||||
$server->wsdl->addComplexType(
|
||||
'sessionBrief',
|
||||
'complexType',
|
||||
'struct',
|
||||
'all',
|
||||
'',
|
||||
[
|
||||
// session.id
|
||||
'id' => ['name' => 'id', 'type' => 'xsd:int'],
|
||||
// session.name
|
||||
'name' => ['name' => 'name', 'type' => 'xsd:string'],
|
||||
// session.short_description
|
||||
'short_description' => ['name' => 'short_description', 'type' => 'xsd:string'],
|
||||
// session.mode
|
||||
'mode' => ['name' => 'mode', 'type' => 'xsd:string'],
|
||||
// session.date_start
|
||||
'date_start' => ['name' => 'date_start', 'type' => 'xsd:string'],
|
||||
// session.date_end
|
||||
'date_end' => ['name' => 'date_end', 'type' => 'xsd:string'],
|
||||
// session.human_text_duration
|
||||
'human_text_duration' => ['name' => 'human_text_duration', 'type' => 'xsd:string'],
|
||||
// session.vacancies
|
||||
'vacancies' => ['name' => 'vacancies', 'type' => 'xsd:string'],
|
||||
// session.schedule
|
||||
'schedule' => ['name' => 'schedule', 'type' => 'xsd:string'],
|
||||
]
|
||||
);
|
||||
|
||||
//Output params for WSSessionListInCategory
|
||||
$server->wsdl->addComplexType(
|
||||
'sessionBriefList',
|
||||
'complexType',
|
||||
'array',
|
||||
'',
|
||||
'SOAP-ENC:Array',
|
||||
[],
|
||||
[
|
||||
['ref' => 'SOAP-ENC:arrayType',
|
||||
'wsdl:arrayType' => 'tns:sessionBrief[]', ],
|
||||
],
|
||||
'tns:sessionBrief'
|
||||
);
|
||||
|
||||
// Input params for WSSessionListInCategory
|
||||
$server->wsdl->addComplexType(
|
||||
'sessionCategoryInput',
|
||||
'complexType',
|
||||
'struct',
|
||||
'all',
|
||||
'',
|
||||
[
|
||||
'id' => ['name' => 'id', 'type' => 'xsd:string'], // session_category.id
|
||||
'name' => ['name' => 'name', 'type' => 'xsd:string'], // session_category.name
|
||||
'target' => ['name' => 'target', 'type' => 'xsd:string'], // session.target
|
||||
'secret_key' => ['name' => 'secret_key', 'type' => 'xsd:string'],
|
||||
]
|
||||
);
|
||||
|
||||
// Input params for WSSessionGetDetailsByUser
|
||||
$server->wsdl->addComplexType(
|
||||
'advsubSessionDetailInput',
|
||||
'complexType',
|
||||
'struct',
|
||||
'all',
|
||||
'',
|
||||
[
|
||||
// user_field_values.value
|
||||
'user_id' => ['name' => 'user_id', 'type' => 'xsd:int'],
|
||||
// user_field.user_id
|
||||
'user_field' => ['name' => 'user_field', 'type' => 'xsd:string'],
|
||||
// session.id
|
||||
'session_id' => ['name' => 'session_id', 'type' => 'xsd:int'],
|
||||
// user.profile_completes
|
||||
'profile_completed' => ['name' => 'profile_completed', 'type' => 'xsd:float'],
|
||||
// user.is_connected
|
||||
'is_connected' => ['name' => 'is_connected', 'type' => 'xsd:boolean'],
|
||||
'secret_key' => ['name' => 'secret_key', 'type' => 'xsd:string'],
|
||||
]
|
||||
);
|
||||
|
||||
// Output params for WSSessionGetDetailsByUser
|
||||
$server->wsdl->addComplexType(
|
||||
'advsubSessionDetail',
|
||||
'complexType',
|
||||
'struct',
|
||||
'all',
|
||||
'',
|
||||
[
|
||||
// session.id
|
||||
'id' => ['name' => 'id', 'type' => 'xsd:string'],
|
||||
// session.code
|
||||
'code' => ['name' => 'code', 'type' => 'xsd:string'],
|
||||
// session.place
|
||||
'cost' => ['name' => 'cost', 'type' => 'xsd:float'],
|
||||
// session.place
|
||||
'place' => ['name' => 'place', 'type' => 'xsd:string'],
|
||||
// session.allow_visitors
|
||||
'allow_visitors' => ['name' => 'allow_visitors', 'type' => 'xsd:string'],
|
||||
// session.teaching_hours
|
||||
'teaching_hours' => ['name' => 'teaching_hours', 'type' => 'xsd:int'],
|
||||
// session.brochure
|
||||
'brochure' => ['name' => 'brochure', 'type' => 'xsd:string'],
|
||||
// session.banner
|
||||
'banner' => ['name' => 'banner', 'type' => 'xsd:string'],
|
||||
// session.description
|
||||
'description' => ['name' => 'description', 'type' => 'xsd:string'],
|
||||
// status
|
||||
'status' => ['name' => 'status', 'type' => 'xsd:string'],
|
||||
// action_url
|
||||
'action_url' => ['name' => 'action_url', 'type' => 'xsd:string'],
|
||||
// message
|
||||
'message' => ['name' => 'error_message', 'type' => 'xsd:string'],
|
||||
]
|
||||
);
|
||||
|
||||
/** WSListSessionsDetailsByCategory */
|
||||
|
||||
// Input params for WSListSessionsDetailsByCategory
|
||||
$server->wsdl->addComplexType(
|
||||
'listSessionsDetailsByCategory',
|
||||
'complexType',
|
||||
'struct',
|
||||
'all',
|
||||
'',
|
||||
[
|
||||
// session_category.id
|
||||
'id' => ['name' => 'id', 'type' => 'xsd:string'],
|
||||
// session_category.access_url_id
|
||||
'access_url_id' => ['name' => 'access_url_id', 'type' => 'xsd:int'],
|
||||
// session_category.name
|
||||
'category_name' => ['name' => 'category_name', 'type' => 'xsd:string'],
|
||||
// secret key
|
||||
'secret_key' => ['name' => 'secret_key', 'type' => 'xsd:string'],
|
||||
],
|
||||
[],
|
||||
'tns:listSessionsDetailsByCategory'
|
||||
);
|
||||
|
||||
// Output params for sessionDetailsCourseList WSListSessionsDetailsByCategory
|
||||
$server->wsdl->addComplexType(
|
||||
'sessionDetailsCourse',
|
||||
'complexType',
|
||||
'struct',
|
||||
'all',
|
||||
'',
|
||||
[
|
||||
'course_id' => ['name' => 'course_id', 'type' => 'xsd:int'], // course.id
|
||||
'course_code' => ['name' => 'course_code', 'type' => 'xsd:string'], // course.code
|
||||
'course_title' => ['name' => 'course_title', 'type' => 'xsd:string'], // course.title
|
||||
'coach_username' => ['name' => 'coach_username', 'type' => 'xsd:string'], // user.username
|
||||
'coach_firstname' => ['name' => 'coach_firstname', 'type' => 'xsd:string'], // user.firstname
|
||||
'coach_lastname' => ['name' => 'coach_lastname', 'type' => 'xsd:string'], // user.lastname
|
||||
]
|
||||
);
|
||||
|
||||
// Output array for sessionDetails WSListSessionsDetailsByCategory
|
||||
$server->wsdl->addComplexType(
|
||||
'sessionDetailsCourseList',
|
||||
'complexType',
|
||||
'array',
|
||||
'',
|
||||
'SOAP-ENC:Array',
|
||||
[],
|
||||
[
|
||||
[
|
||||
'ref' => 'SOAP-ENC:arrayType',
|
||||
'wsdl:arrayType' => 'tns:sessionDetailsCourse[]',
|
||||
],
|
||||
],
|
||||
'tns:sessionDetailsCourse'
|
||||
);
|
||||
|
||||
// Output params for sessionDetailsList WSListSessionsDetailsByCategory
|
||||
$server->wsdl->addComplexType(
|
||||
'sessionDetails',
|
||||
'complexType',
|
||||
'struct',
|
||||
'all',
|
||||
'',
|
||||
[
|
||||
// session.id
|
||||
'id' => [
|
||||
'name' => 'id',
|
||||
'type' => 'xsd:int',
|
||||
],
|
||||
// session.id_coach
|
||||
'coach_id' => [
|
||||
'name' => 'coach_id',
|
||||
'type' => 'xsd:int',
|
||||
],
|
||||
// session.name
|
||||
'name' => [
|
||||
'name' => 'name',
|
||||
'type' => 'xsd:string',
|
||||
],
|
||||
// session.nbr_courses
|
||||
'courses_num' => [
|
||||
'name' => 'courses_num',
|
||||
'type' => 'xsd:int',
|
||||
],
|
||||
// session.nbr_users
|
||||
'users_num' => [
|
||||
'name' => 'users_num',
|
||||
'type' => 'xsd:int',
|
||||
],
|
||||
// session.nbr_classes
|
||||
'classes_num' => [
|
||||
'name' => 'classes_num',
|
||||
'type' => 'xsd:int',
|
||||
],
|
||||
// session.date_start
|
||||
'date_start' => [
|
||||
'name' => 'date_start',
|
||||
'type' => 'xsd:string',
|
||||
],
|
||||
// session.date_end
|
||||
'date_end' => [
|
||||
'name' => 'date_end',
|
||||
'type' => 'xsd:string',
|
||||
],
|
||||
// session.nb_days_access_before_beginning
|
||||
'access_days_before_num' => [
|
||||
'name' => 'access_days_before_num',
|
||||
'type' => 'xsd:int',
|
||||
],
|
||||
// session.nb_days_access_after_end
|
||||
'access_days_after_num' => [
|
||||
'name' => 'access_days_after_num',
|
||||
'type' => 'xsd:int',
|
||||
],
|
||||
// session.session_admin_id
|
||||
'session_admin_id' => [
|
||||
'name' => 'session_admin_id',
|
||||
'type' => 'xsd:int',
|
||||
],
|
||||
// session.visibility
|
||||
'visibility' => [
|
||||
'name' => 'visibility',
|
||||
'type' => 'xsd:int',
|
||||
],
|
||||
// session.session_category_id
|
||||
'session_category_id' => [
|
||||
'name' => 'session_category_id',
|
||||
'type' => 'xsd:int',
|
||||
],
|
||||
// session.promotion_id
|
||||
'promotion_id' => [
|
||||
'name' => 'promotion_id',
|
||||
'type' => 'xsd:int',
|
||||
],
|
||||
// session.number of registered users validated
|
||||
'validated_user_num' => [
|
||||
'name' => 'validated_user_num',
|
||||
'type' => 'xsd:int',
|
||||
],
|
||||
// session.number of registered users from waiting queue
|
||||
'waiting_user_num' => [
|
||||
'name' => 'waiting_user_num',
|
||||
'type' => 'xsd:int',
|
||||
],
|
||||
// extra fields
|
||||
// Array(field_name, field_value)
|
||||
'extra' => [
|
||||
'name' => 'extra',
|
||||
'type' => 'tns:extrasList',
|
||||
],
|
||||
// course and coaches data
|
||||
// Array(course_id, course_code, course_title, coach_username, coach_firstname, coach_lastname)
|
||||
'course' => [
|
||||
'name' => 'courses',
|
||||
'type' => 'tns:sessionDetailsCourseList',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
// Output params for WSListSessionsDetailsByCategory
|
||||
$server->wsdl->addComplexType(
|
||||
'sessionDetailsList',
|
||||
'complexType',
|
||||
'array',
|
||||
'',
|
||||
'SOAP-ENC:Array',
|
||||
[],
|
||||
[
|
||||
[
|
||||
'ref' => 'SOAP-ENC:arrayType',
|
||||
'wsdl:arrayType' => 'tns:sessionDetails[]',
|
||||
],
|
||||
],
|
||||
'tns:sessionDetails'
|
||||
);
|
||||
|
||||
// Register the method for WSSessionListInCategory
|
||||
$server->register(
|
||||
'HookAdvancedSubscription..WSSessionListInCategory', // method name
|
||||
['sessionCategoryInput' => 'tns:sessionCategoryInput'], // input parameters
|
||||
['return' => 'tns:sessionBriefList'], // output parameters
|
||||
'urn:WSRegistration', // namespace
|
||||
'urn:WSRegistration#WSSessionListInCategory', // soapaction
|
||||
'rpc', // style
|
||||
'encoded', // use
|
||||
'This service checks if user assigned to course' // documentation
|
||||
);
|
||||
|
||||
// Register the method for WSSessionGetDetailsByUser
|
||||
$server->register(
|
||||
'HookAdvancedSubscription..WSSessionGetDetailsByUser', // method name
|
||||
['advsubSessionDetailInput' => 'tns:advsubSessionDetailInput'], // input parameters
|
||||
['return' => 'tns:advsubSessionDetail'], // output parameters
|
||||
'urn:WSRegistration', // namespace
|
||||
'urn:WSRegistration#WSSessionGetDetailsByUser', // soapaction
|
||||
'rpc', // style
|
||||
'encoded', // use
|
||||
'This service return session details to specific user' // documentation
|
||||
);
|
||||
|
||||
// Register the method for WSListSessionsDetailsByCategory
|
||||
$server->register(
|
||||
'HookAdvancedSubscription..WSListSessionsDetailsByCategory', // method name
|
||||
['name' => 'tns:listSessionsDetailsByCategory'], // input parameters
|
||||
['return' => 'tns:sessionDetailsList'], // output parameters
|
||||
'urn:WSRegistration', // namespace
|
||||
'urn:WSRegistration#WSListSessionsDetailsByCategory', // soapaction
|
||||
'rpc', // style
|
||||
'encoded', // use
|
||||
'This service returns a list of detailed sessions by a category' // documentation
|
||||
);
|
||||
|
||||
return $data;
|
||||
} // Else: Nothing to do
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
*
|
||||
* @return soap_fault|null
|
||||
*/
|
||||
public static function WSSessionListInCategory($params)
|
||||
{
|
||||
global $debug;
|
||||
|
||||
if ($debug) {
|
||||
error_log(__FUNCTION__);
|
||||
error_log('Params '.print_r($params, 1));
|
||||
if (!WSHelperVerifyKey($params)) {
|
||||
error_log(return_error(WS_ERROR_SECRET_KEY));
|
||||
}
|
||||
}
|
||||
// Check if category ID is set
|
||||
if (!empty($params['id']) && empty($params['name'])) {
|
||||
$sessionCategoryId = $params['id'];
|
||||
} elseif (!empty($params['name'])) {
|
||||
// Check if category name is set
|
||||
$sessionCategoryId = SessionManager::getSessionCategoryIdByName($params['name']);
|
||||
if (is_array($sessionCategoryId)) {
|
||||
$sessionCategoryId = current($sessionCategoryId);
|
||||
}
|
||||
} else {
|
||||
// Return soap fault Not valid input params
|
||||
|
||||
return return_error(WS_ERROR_INVALID_INPUT);
|
||||
}
|
||||
|
||||
// Get the session brief List by category
|
||||
$fields = [
|
||||
'id',
|
||||
'short_description',
|
||||
'mode',
|
||||
'human_text_duration',
|
||||
'vacancies',
|
||||
'schedule',
|
||||
];
|
||||
$datePub = new DateTime();
|
||||
$sessionList = SessionManager::getShortSessionListAndExtraByCategory(
|
||||
$sessionCategoryId,
|
||||
$params['target'],
|
||||
$fields,
|
||||
$datePub
|
||||
);
|
||||
|
||||
return $sessionList;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
*
|
||||
* @return soap_fault|null
|
||||
*/
|
||||
public static function WSSessionGetDetailsByUser($params)
|
||||
{
|
||||
global $debug;
|
||||
|
||||
if ($debug) {
|
||||
error_log('WSUserSubscribedInCourse');
|
||||
error_log('Params '.print_r($params, 1));
|
||||
}
|
||||
if (!WSHelperVerifyKey($params)) {
|
||||
return return_error(WS_ERROR_SECRET_KEY);
|
||||
}
|
||||
// Check params
|
||||
if (is_array($params) && !empty($params['session_id']) && !empty($params['user_id'])) {
|
||||
$userId = UserManager::get_user_id_from_original_id($params['user_id'], $params['user_field']);
|
||||
$sessionId = (int) $params['session_id'];
|
||||
// Check if user exists
|
||||
if (UserManager::is_user_id_valid($userId) &&
|
||||
SessionManager::isValidId($sessionId)
|
||||
) {
|
||||
// Check if student is already subscribed
|
||||
$plugin = AdvancedSubscriptionPlugin::create();
|
||||
$isOpen = $plugin->isSessionOpen($sessionId);
|
||||
$status = $plugin->getQueueStatus($userId, $sessionId);
|
||||
$vacancy = $plugin->getVacancy($sessionId);
|
||||
$data = $plugin->getSessionDetails($sessionId);
|
||||
$isUserInTargetGroup = $plugin->isUserInTargetGroup($userId, $sessionId);
|
||||
if (!empty($data) && is_array($data)) {
|
||||
$data['status'] = $status;
|
||||
// Vacancy and queue status cases:
|
||||
if ($isOpen) {
|
||||
// Go to Course session
|
||||
$data['action_url'] = self::$plugin->getOpenSessionUrl($userId, $params);
|
||||
if (SessionManager::isUserSubscribedAsStudent($sessionId, $userId)) {
|
||||
$data['status'] = 10;
|
||||
}
|
||||
} else {
|
||||
if (!$isUserInTargetGroup) {
|
||||
$data['status'] = -2;
|
||||
} else {
|
||||
try {
|
||||
$isAllowed = self::$plugin->isAllowedToDoRequest($userId, $params);
|
||||
$data['message'] = self::$plugin->getStatusMessage($status, $isAllowed);
|
||||
} catch (\Exception $e) {
|
||||
$data['message'] = $e->getMessage();
|
||||
}
|
||||
$params['action'] = 'subscribe';
|
||||
$params['sessionId'] = intval($sessionId);
|
||||
$params['currentUserId'] = 0; // No needed
|
||||
$params['studentUserId'] = intval($userId);
|
||||
$params['queueId'] = 0; // No needed
|
||||
$params['newStatus'] = ADVANCED_SUBSCRIPTION_QUEUE_STATUS_START;
|
||||
if ($vacancy > 0) {
|
||||
// Check conditions
|
||||
if ($status == ADVANCED_SUBSCRIPTION_QUEUE_STATUS_NO_QUEUE) {
|
||||
// No in Queue, require queue subscription url action
|
||||
$data['action_url'] = self::$plugin->getTermsUrl($params);
|
||||
} elseif ($status == ADVANCED_SUBSCRIPTION_QUEUE_STATUS_ADMIN_APPROVED) {
|
||||
// send url action
|
||||
$data['action_url'] = self::$plugin->getSessionUrl($sessionId);
|
||||
} // Else: In queue, output status message, no more info.
|
||||
} else {
|
||||
if ($status == ADVANCED_SUBSCRIPTION_QUEUE_STATUS_ADMIN_APPROVED) {
|
||||
$data['action_url'] = self::$plugin->getSessionUrl($sessionId);
|
||||
} elseif ($status == ADVANCED_SUBSCRIPTION_QUEUE_STATUS_NO_QUEUE) {
|
||||
// in Queue or not, cannot be subscribed to session
|
||||
$data['action_url'] = self::$plugin->getTermsUrl($params);
|
||||
} // Else: In queue, output status message, no more info.
|
||||
}
|
||||
}
|
||||
}
|
||||
$result = $data;
|
||||
} else {
|
||||
// Return soap fault No result was found
|
||||
$result = return_error(WS_ERROR_NOT_FOUND_RESULT);
|
||||
}
|
||||
} else {
|
||||
// Return soap fault No result was found
|
||||
$result = return_error(WS_ERROR_NOT_FOUND_RESULT);
|
||||
}
|
||||
} else {
|
||||
// Return soap fault Not valid input params
|
||||
$result = return_error(WS_ERROR_INVALID_INPUT);
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a list of sessions (id, coach_id, name, courses_num, users_num, classes_num,
|
||||
* access_start_date, access_end_date, access_days_before_num, session_admin_id, visibility,
|
||||
* session_category_id, promotion_id,
|
||||
* validated_user_num, waiting_user_num,
|
||||
* extra, course) the validated_usernum and waiting_user_num are
|
||||
* used when have the plugin for advance incsription enables.
|
||||
* The extra data (field_name, field_value)
|
||||
* The course data (course_id, course_code, course_title,
|
||||
* coach_username, coach_firstname, coach_lastname).
|
||||
*
|
||||
* @param array $params List of parameters (id, category_name, access_url_id, secret_key)
|
||||
*
|
||||
* @return array|soap_fault Sessions list (id=>[title=>'title',url='http://...',date_start=>'...',date_end=>''])
|
||||
*/
|
||||
public static function WSListSessionsDetailsByCategory($params)
|
||||
{
|
||||
global $debug;
|
||||
|
||||
if ($debug) {
|
||||
error_log('WSListSessionsDetailsByCategory');
|
||||
error_log('Params '.print_r($params, 1));
|
||||
}
|
||||
$secretKey = $params['secret_key'];
|
||||
|
||||
// Check if secret key is valid
|
||||
if (!WSHelperVerifyKey($secretKey)) {
|
||||
return return_error(WS_ERROR_SECRET_KEY);
|
||||
}
|
||||
|
||||
// Check if category ID is set
|
||||
if (!empty($params['id']) && empty($params['category_name'])) {
|
||||
$sessionCategoryId = $params['id'];
|
||||
} elseif (!empty($params['category_name'])) {
|
||||
// Check if category name is set
|
||||
$sessionCategoryId = SessionManager::getSessionCategoryIdByName($params['category_name']);
|
||||
if (is_array($sessionCategoryId)) {
|
||||
$sessionCategoryId = current($sessionCategoryId);
|
||||
}
|
||||
} else {
|
||||
// Return soap fault Not valid input params
|
||||
|
||||
return return_error(WS_ERROR_INVALID_INPUT);
|
||||
}
|
||||
|
||||
// Get the session List by category
|
||||
$sessionList = SessionManager::getSessionListAndExtraByCategoryId($sessionCategoryId);
|
||||
|
||||
if (empty($sessionList)) {
|
||||
// If not found any session, return error
|
||||
|
||||
return return_error(WS_ERROR_NOT_FOUND_RESULT);
|
||||
}
|
||||
|
||||
// Get validated and waiting queue users count for each session
|
||||
AdvancedSubscriptionPlugin::create();
|
||||
foreach ($sessionList as &$session) {
|
||||
// Add validated and queue users count
|
||||
$session['validated_user_num'] = self::$plugin->countQueueByParams(
|
||||
[
|
||||
'sessions' => [$session['id']],
|
||||
'status' => [ADVANCED_SUBSCRIPTION_QUEUE_STATUS_ADMIN_APPROVED],
|
||||
]
|
||||
);
|
||||
$session['waiting_user_num'] = self::$plugin->countQueueByParams(
|
||||
[
|
||||
'sessions' => [$session['id']],
|
||||
'status' => [
|
||||
ADVANCED_SUBSCRIPTION_QUEUE_STATUS_START,
|
||||
ADVANCED_SUBSCRIPTION_QUEUE_STATUS_BOSS_APPROVED,
|
||||
],
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
return $sessionList;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return notification content when the hook has been triggered.
|
||||
*
|
||||
* @return mixed (int or false)
|
||||
*/
|
||||
public function hookNotificationContent(HookNotificationContentEventInterface $hook)
|
||||
{
|
||||
$data = $hook->getEventData();
|
||||
if ($data['type'] === HOOK_EVENT_TYPE_PRE) {
|
||||
$data['advanced_subscription_pre_content'] = $data['content'];
|
||||
|
||||
return $data;
|
||||
} elseif ($data['type'] === HOOK_EVENT_TYPE_POST) {
|
||||
if (isset($data['content']) &&
|
||||
!empty($data['content']) &&
|
||||
isset($data['advanced_subscription_pre_content']) &&
|
||||
!empty($data['advanced_subscription_pre_content'])
|
||||
) {
|
||||
$data['content'] = str_replace(
|
||||
[
|
||||
'<br /><hr>',
|
||||
'<br />',
|
||||
'<br/>',
|
||||
],
|
||||
'',
|
||||
$data['advanced_subscription_pre_content']
|
||||
);
|
||||
}
|
||||
|
||||
return $data;
|
||||
} //Else hook type is not valid, nothing to do
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the notification data title if the hook was triggered.
|
||||
*
|
||||
* @return array|bool
|
||||
*/
|
||||
public function hookNotificationTitle(HookNotificationTitleEventInterface $hook)
|
||||
{
|
||||
$data = $hook->getEventData();
|
||||
if ($data['type'] === HOOK_EVENT_TYPE_PRE) {
|
||||
$data['advanced_subscription_pre_title'] = $data['title'];
|
||||
|
||||
return $data;
|
||||
} elseif ($data['type'] === HOOK_EVENT_TYPE_POST) {
|
||||
if (isset($data['advanced_subscription_pre_title']) &&
|
||||
!empty($data['advanced_subscription_pre_title'])
|
||||
) {
|
||||
$data['title'] = $data['advanced_subscription_pre_title'];
|
||||
}
|
||||
|
||||
return $data;
|
||||
} // Else: hook type is not valid, nothing to do
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
104
plugin/advanced_subscription/src/admin_view.php
Normal file
@@ -0,0 +1,104 @@
|
||||
<?php
|
||||
/* For license terms, see /license.txt */
|
||||
/**
|
||||
* Index of the Advanced subscription plugin courses list.
|
||||
*
|
||||
* @package chamilo.plugin.advanced_subscription
|
||||
*/
|
||||
/**
|
||||
* Init.
|
||||
*/
|
||||
require_once __DIR__.'/../config.php';
|
||||
// protect
|
||||
api_protect_admin_script();
|
||||
// start plugin
|
||||
$plugin = AdvancedSubscriptionPlugin::create();
|
||||
// Session ID
|
||||
$sessionId = isset($_REQUEST['s']) ? intval($_REQUEST['s']) : null;
|
||||
|
||||
// Init template
|
||||
$tpl = new Template($plugin->get_lang('plugin_title'));
|
||||
// Get all sessions
|
||||
$sessionList = $plugin->listAllSessions();
|
||||
|
||||
if (!empty($sessionId)) {
|
||||
// Get student list in queue
|
||||
$studentList = $plugin->listAllStudentsInQueueBySession($sessionId);
|
||||
// Set selected to current session
|
||||
$sessionList[$sessionId]['selected'] = 'selected="selected"';
|
||||
$studentList['session']['id'] = $sessionId;
|
||||
// Assign variables
|
||||
$fieldsArray = [
|
||||
'description',
|
||||
'target',
|
||||
'mode',
|
||||
'publication_end_date',
|
||||
'recommended_number_of_participants',
|
||||
'vacancies',
|
||||
];
|
||||
$sessionArray = api_get_session_info($sessionId);
|
||||
$extraSession = new ExtraFieldValue('session');
|
||||
$extraField = new ExtraField('session');
|
||||
// Get session fields
|
||||
$fieldList = $extraField->get_all([
|
||||
'variable IN ( ?, ?, ?, ?, ?, ?)' => $fieldsArray,
|
||||
]);
|
||||
// Index session fields
|
||||
foreach ($fieldList as $field) {
|
||||
$fields[$field['id']] = $field['variable'];
|
||||
}
|
||||
$params = [' item_id = ? ' => $sessionId];
|
||||
$sessionFieldValueList = $extraSession->get_all(['where' => $params]);
|
||||
foreach ($sessionFieldValueList as $sessionFieldValue) {
|
||||
// Check if session field value is set in session field list
|
||||
if (isset($fields[$sessionFieldValue['field_id']])) {
|
||||
$var = $fields[$sessionFieldValue['field_id']];
|
||||
$val = $sessionFieldValue['value'];
|
||||
// Assign session field value to session
|
||||
$sessionArray[$var] = $val;
|
||||
}
|
||||
}
|
||||
$adminsArray = UserManager::get_all_administrators();
|
||||
|
||||
$data['action'] = 'confirm';
|
||||
$data['sessionId'] = $sessionId;
|
||||
$data['currentUserId'] = api_get_user_id();
|
||||
$isWesternNameOrder = api_is_western_name_order();
|
||||
|
||||
foreach ($studentList['students'] as &$student) {
|
||||
$studentId = intval($student['user_id']);
|
||||
$data['studentUserId'] = $studentId;
|
||||
|
||||
$fieldValue = new ExtraFieldValue('user');
|
||||
$areaField = $fieldValue->get_values_by_handler_and_field_variable($studentId, 'area', true);
|
||||
|
||||
$student['area'] = $areaField['value'];
|
||||
if (substr($student['area'], 0, 6) == 'MINEDU') {
|
||||
$student['institution'] = 'Minedu';
|
||||
} else {
|
||||
$student['institution'] = 'Regiones';
|
||||
}
|
||||
$student['userLink'] = api_get_path(WEB_CODE_PATH).'social/profile.php?u='.$studentId;
|
||||
$data['queueId'] = intval($student['queue_id']);
|
||||
$data['newStatus'] = ADVANCED_SUBSCRIPTION_QUEUE_STATUS_ADMIN_APPROVED;
|
||||
$data['profile_completed'] = 100;
|
||||
$student['acceptUrl'] = $plugin->getQueueUrl($data);
|
||||
$data['newStatus'] = ADVANCED_SUBSCRIPTION_QUEUE_STATUS_ADMIN_DISAPPROVED;
|
||||
$student['rejectUrl'] = $plugin->getQueueUrl($data);
|
||||
$student['complete_name'] = $isWesternNameOrder ?
|
||||
$student['firstname'].', '.$student['lastname'] : $student['lastname'].', '.$student['firstname'];
|
||||
}
|
||||
$tpl->assign('session', $sessionArray);
|
||||
$tpl->assign('students', $studentList['students']);
|
||||
}
|
||||
|
||||
// Assign variables
|
||||
$tpl->assign('sessionItems', $sessionList);
|
||||
$tpl->assign('approveAdmin', ADVANCED_SUBSCRIPTION_QUEUE_STATUS_ADMIN_APPROVED);
|
||||
$tpl->assign('disapproveAdmin', ADVANCED_SUBSCRIPTION_QUEUE_STATUS_ADMIN_DISAPPROVED);
|
||||
// Get rendered template
|
||||
$content = $tpl->fetch('/advanced_subscription/views/admin_view.tpl');
|
||||
// Assign into content
|
||||
$tpl->assign('content', $content);
|
||||
// Display
|
||||
$tpl->display_one_col_template();
|
||||
61
plugin/advanced_subscription/src/open_session.php
Normal file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
/**
|
||||
* Validate requirements for a open session.
|
||||
*
|
||||
* @author Angel Fernando Quiroz Campos <angel.quiroz@beeznest.com>
|
||||
*
|
||||
* @package chamilo.plugin.advanced_subscription
|
||||
*/
|
||||
require_once __DIR__.'/../config.php';
|
||||
|
||||
$plugin = AdvancedSubscriptionPlugin::create();
|
||||
|
||||
if (!isset($_GET['session_id'], $_GET['user_id'], $_GET['profile_completed'])) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$sessionInfo = api_get_session_info($_GET['session_id']);
|
||||
|
||||
$tpl = new Template(
|
||||
$plugin->get_lang('plugin_title'),
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false
|
||||
);
|
||||
$tpl->assign('session', $sessionInfo);
|
||||
|
||||
if (SessionManager::isUserSubscribedAsStudent(
|
||||
$_GET['session_id'],
|
||||
$_GET['user_id']
|
||||
)) {
|
||||
$tpl->assign('is_subscribed', false);
|
||||
$tpl->assign(
|
||||
'errorMessages',
|
||||
[sprintf(
|
||||
$plugin->get_lang('YouAreAlreadySubscribedToSessionX'),
|
||||
$sessionInfo['name']
|
||||
)]
|
||||
);
|
||||
} else {
|
||||
if (!$plugin->isAllowedSubscribeToOpenSession($_GET)) {
|
||||
$tpl->assign('is_subscribed', false);
|
||||
$tpl->assign('errorMessages', $plugin->getErrorMessages());
|
||||
} else {
|
||||
SessionManager::subscribeUsersToSession(
|
||||
$_GET['session_id'],
|
||||
[$_GET['user_id']],
|
||||
SESSION_VISIBLE_READ_ONLY,
|
||||
false
|
||||
);
|
||||
|
||||
$tpl->assign('is_subscribed', true);
|
||||
}
|
||||
}
|
||||
|
||||
$content = $tpl->fetch('/advanced_subscription/views/open_session.tpl');
|
||||
|
||||
$tpl->assign('content', $content);
|
||||
$tpl->display_one_col_template();
|
||||
26
plugin/advanced_subscription/src/render_mail.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/* For license terms, see /license.txt */
|
||||
/**
|
||||
* Render an email from data.
|
||||
*
|
||||
* @package chamilo.plugin.advanced_subscription
|
||||
*/
|
||||
|
||||
/**
|
||||
* Init.
|
||||
*/
|
||||
require_once __DIR__.'/../config.php';
|
||||
|
||||
$plugin = AdvancedSubscriptionPlugin::create();
|
||||
// Get validation hash
|
||||
$hash = Security::remove_XSS($_REQUEST['v']);
|
||||
// Get data from request (GET or POST)
|
||||
$data['queueId'] = intval($_REQUEST['q']);
|
||||
// Check if data is valid or is for start subscription
|
||||
$verified = $plugin->checkHash($data, $hash);
|
||||
if ($verified) {
|
||||
// Render mail
|
||||
$message = MessageManager::get_message_by_id($data['queueId']);
|
||||
$message = str_replace(['<br /><hr>', '<br />', '<br/>'], '', $message['content']);
|
||||
echo $message;
|
||||
}
|
||||
@@ -0,0 +1,204 @@
|
||||
<?php
|
||||
/* For license terms, see /license.txt */
|
||||
/**
|
||||
* This script generates session fields needed for this plugin.
|
||||
*
|
||||
* @package chamilo.plugin.advanced_subscription
|
||||
*/
|
||||
|
||||
//exit;
|
||||
|
||||
require_once __DIR__.'/../../config.php';
|
||||
|
||||
api_protect_admin_script();
|
||||
|
||||
$teachingHours = new ExtraField('session');
|
||||
$teachingHours->save([
|
||||
'field_type' => ExtraField::FIELD_TYPE_INTEGER,
|
||||
'variable' => 'teaching_hours',
|
||||
'display_text' => get_lang('TeachingHours'),
|
||||
'visible_to_self' => 1,
|
||||
'changeable' => 1,
|
||||
]);
|
||||
|
||||
$cost = new ExtraField('session');
|
||||
$cost->save([
|
||||
'field_type' => ExtraField::FIELD_TYPE_FLOAT,
|
||||
'variable' => 'cost',
|
||||
'display_text' => get_lang('Cost'),
|
||||
'visible_to_self' => 1,
|
||||
'changeable' => 1,
|
||||
]);
|
||||
|
||||
$vacancies = new ExtraField('session');
|
||||
$vacancies->save([
|
||||
'field_type' => ExtraField::FIELD_TYPE_INTEGER,
|
||||
'variable' => 'vacancies',
|
||||
'display_text' => get_lang('Vacancies'),
|
||||
'visible_to_self' => 1,
|
||||
'changeable' => 1,
|
||||
]);
|
||||
|
||||
$recommendedNumberOfParticipants = new ExtraField('session');
|
||||
$recommendedNumberOfParticipants->save([
|
||||
'field_type' => ExtraField::FIELD_TYPE_INTEGER,
|
||||
'variable' => 'recommended_number_of_participants',
|
||||
'display_text' => get_lang('RecommendedNumberOfParticipants'),
|
||||
'visible_to_self' => 1,
|
||||
'changeable' => 1,
|
||||
]);
|
||||
|
||||
$place = new ExtraField('session');
|
||||
$place->save([
|
||||
'field_type' => ExtraField::FIELD_TYPE_TEXT,
|
||||
'variable' => 'place',
|
||||
'display_text' => get_lang('Place'),
|
||||
'visible_to_self' => 1,
|
||||
'changeable' => 1,
|
||||
]);
|
||||
|
||||
$schedule = new ExtraField('session');
|
||||
$schedule->save([
|
||||
'field_type' => ExtraField::FIELD_TYPE_TEXT,
|
||||
'variable' => 'schedule',
|
||||
'display_text' => get_lang('Schedule'),
|
||||
'visible_to_self' => 1,
|
||||
'changeable' => 1,
|
||||
]);
|
||||
|
||||
$allowVisitors = new ExtraField('session');
|
||||
$allowVisitors->save([
|
||||
'field_type' => ExtraField::FIELD_TYPE_CHECKBOX,
|
||||
'variable' => 'allow_visitors',
|
||||
'display_text' => get_lang('AllowVisitors'),
|
||||
'visible_to_self' => 1,
|
||||
'changeable' => 1,
|
||||
]);
|
||||
|
||||
$modeOptions = [
|
||||
get_lang('Online'),
|
||||
get_lang('Presencial'),
|
||||
get_lang('B-Learning'),
|
||||
];
|
||||
|
||||
$mode = new ExtraField('session');
|
||||
$mode->save([
|
||||
'field_type' => ExtraField::FIELD_TYPE_SELECT,
|
||||
'variable' => 'mode',
|
||||
'display_text' => get_lang('Mode'),
|
||||
'visible_to_self' => 1,
|
||||
'changeable' => 1,
|
||||
'field_options' => implode('; ', $modeOptions),
|
||||
]);
|
||||
|
||||
$isInductionSession = new ExtraField('session');
|
||||
$isInductionSession->save([
|
||||
'field_type' => ExtraField::FIELD_TYPE_CHECKBOX,
|
||||
'variable' => 'is_induction_session',
|
||||
'display_text' => get_lang('IsInductionSession'),
|
||||
'visible_to_self' => 1,
|
||||
'changeable' => 1,
|
||||
]);
|
||||
|
||||
$isOpenSession = new ExtraField('session');
|
||||
$isOpenSession->save([
|
||||
'field_type' => ExtraField::FIELD_TYPE_CHECKBOX,
|
||||
'variable' => 'is_open_session',
|
||||
'display_text' => get_lang('IsOpenSession'),
|
||||
'visible_to_self' => 1,
|
||||
'changeable' => 1,
|
||||
]);
|
||||
|
||||
$duration = new ExtraField('session');
|
||||
$duration->save([
|
||||
'field_type' => ExtraField::FIELD_TYPE_TEXT,
|
||||
'variable' => 'human_text_duration',
|
||||
'display_text' => get_lang('DurationInWords'),
|
||||
'visible_to_self' => 1,
|
||||
'changeable' => 1,
|
||||
]);
|
||||
|
||||
$showStatusOptions = [
|
||||
get_lang('Open'),
|
||||
get_lang('InProcess'),
|
||||
get_lang('Closed'),
|
||||
];
|
||||
|
||||
$showStatus = new ExtraField('session');
|
||||
$showStatus->save([
|
||||
'field_type' => ExtraField::FIELD_TYPE_SELECT,
|
||||
'variable' => 'show_status',
|
||||
'display_text' => get_lang('ShowStatus'),
|
||||
'visible_to_self' => 1,
|
||||
'changeable' => 1,
|
||||
'field_options' => implode('; ', $showStatusOptions),
|
||||
]);
|
||||
|
||||
$publicationStartDate = new ExtraField('session');
|
||||
$publicationStartDate->save([
|
||||
'field_type' => ExtraField::FIELD_TYPE_DATE,
|
||||
'variable' => 'publication_start_date',
|
||||
'display_text' => get_lang('PublicationStartDate'),
|
||||
'visible_to_self' => 1,
|
||||
'changeable' => 1,
|
||||
]);
|
||||
|
||||
$publicationEndDate = new ExtraField('session');
|
||||
$publicationEndDate->save([
|
||||
'field_type' => ExtraField::FIELD_TYPE_DATE,
|
||||
'variable' => 'publication_end_date',
|
||||
'display_text' => get_lang('PublicationEndDate'),
|
||||
'visible_to_self' => 1,
|
||||
'changeable' => 1,
|
||||
]);
|
||||
|
||||
$banner = new ExtraField('session');
|
||||
$banner->save([
|
||||
'field_type' => ExtraField::FIELD_TYPE_FILE_IMAGE,
|
||||
'variable' => 'banner',
|
||||
'display_text' => get_lang('SessionBanner'),
|
||||
'visible_to_self' => 1,
|
||||
'changeable' => 1,
|
||||
]);
|
||||
|
||||
$brochure = new ExtraField('session');
|
||||
$brochure->save([
|
||||
'field_type' => ExtraField::FIELD_TYPE_FILE,
|
||||
'variable' => 'brochure',
|
||||
'display_text' => get_lang('Brochure'),
|
||||
'visible_to_self' => 1,
|
||||
'changeable' => 1,
|
||||
]);
|
||||
|
||||
$targetOptions = [
|
||||
get_lang('Minedu'),
|
||||
get_lang('Regiones'),
|
||||
];
|
||||
|
||||
$target = new ExtraField('session');
|
||||
$target->save([
|
||||
'field_type' => ExtraField::FIELD_TYPE_SELECT,
|
||||
'variable' => 'target',
|
||||
'display_text' => get_lang('TargetAudience'),
|
||||
'visible_to_self' => 1,
|
||||
'changeable' => 1,
|
||||
'field_options' => implode('; ', $targetOptions),
|
||||
]);
|
||||
|
||||
$shortDescription = new ExtraField('session');
|
||||
$shortDescription->save([
|
||||
'field_type' => ExtraField::FIELD_TYPE_TEXT,
|
||||
'variable' => 'short_description',
|
||||
'display_text' => get_lang('ShortDescription'),
|
||||
'visible_to_self' => 1,
|
||||
'changeable' => 1,
|
||||
]);
|
||||
|
||||
$id = new ExtraField('session');
|
||||
$id->save([
|
||||
'field_type' => ExtraField::FIELD_TYPE_TEXT,
|
||||
'variable' => 'code',
|
||||
'display_text' => get_lang('Code'),
|
||||
'visible_to_self' => 1,
|
||||
'changeable' => 1,
|
||||
]);
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/* For license terms, see /license.txt */
|
||||
/**
|
||||
* This script generates four session categories.
|
||||
*
|
||||
* @package chamilo.plugin.advanced_subscription
|
||||
*/
|
||||
require_once __DIR__.'/../../config.php';
|
||||
|
||||
api_protect_admin_script();
|
||||
|
||||
$categories = [
|
||||
'capacitaciones',
|
||||
'programas',
|
||||
'especializaciones',
|
||||
'cursos prácticos',
|
||||
];
|
||||
$tableSessionCategory = Database::get_main_table(TABLE_MAIN_SESSION_CATEGORY);
|
||||
foreach ($categories as $category) {
|
||||
Database::query("INSERT INTO $tableSessionCategory (name) VALUES ('$category')");
|
||||
}
|
||||
85
plugin/advanced_subscription/src/terms_and_conditions.php
Normal file
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
/* For license terms, see /license.txt */
|
||||
/**
|
||||
* Script to show sessions terms and conditions.
|
||||
*
|
||||
* @package chamilo.plugin.advanced_subscription
|
||||
*/
|
||||
/**
|
||||
* Init.
|
||||
*/
|
||||
require_once __DIR__.'/../config.php';
|
||||
// start plugin
|
||||
$plugin = AdvancedSubscriptionPlugin::create();
|
||||
// Session ID
|
||||
$data['action'] = Security::remove_XSS($_REQUEST['a']);
|
||||
$data['sessionId'] = isset($_REQUEST['s']) ? intval($_REQUEST['s']) : 0;
|
||||
$data['currentUserId'] = isset($_REQUEST['current_user_id']) ? intval($_REQUEST['current_user_id']) : 0;
|
||||
$data['studentUserId'] = isset($_REQUEST['u']) ? intval($_REQUEST['u']) : 0;
|
||||
$data['queueId'] = isset($_REQUEST['q']) ? intval($_REQUEST['q']) : 0;
|
||||
$data['newStatus'] = isset($_REQUEST['e']) ? intval($_REQUEST['e']) : 0;
|
||||
$data['is_connected'] = true;
|
||||
$data['profile_completed'] = isset($_REQUEST['profile_completed']) ? floatval($_REQUEST['profile_completed']) : 0;
|
||||
$data['termsRejected'] = isset($_REQUEST['r']) ? intval($_REQUEST['r']) : 0;
|
||||
|
||||
// Init template
|
||||
$tpl = new Template($plugin->get_lang('plugin_title'));
|
||||
|
||||
$isAllowToDoRequest = $plugin->isAllowedToDoRequest($data['studentUserId'], $data, true);
|
||||
|
||||
if (!$isAllowToDoRequest) {
|
||||
$tpl->assign('errorMessages', $plugin->getErrorMessages());
|
||||
}
|
||||
|
||||
if (
|
||||
!empty($data['sessionId']) &&
|
||||
!empty($data['studentUserId']) &&
|
||||
api_get_plugin_setting('courselegal', 'tool_enable')
|
||||
) {
|
||||
$lastMessageId = $plugin->getLastMessageId($data['studentUserId'], $data['sessionId']);
|
||||
if ($lastMessageId !== false) {
|
||||
// Render mail
|
||||
$url = $plugin->getRenderMailUrl(['queueId' => $lastMessageId]);
|
||||
header('Location: '.$url);
|
||||
exit;
|
||||
}
|
||||
$courses = SessionManager::get_course_list_by_session_id($data['sessionId']);
|
||||
$course = current($courses);
|
||||
$data['courseId'] = $course['id'];
|
||||
$legalEnabled = api_get_plugin_setting('courselegal', 'tool_enable');
|
||||
if ($legalEnabled) {
|
||||
$courseLegal = CourseLegalPlugin::create();
|
||||
$termsAndConditions = $courseLegal->getData($data['courseId'], $data['sessionId']);
|
||||
$termsAndConditions = $termsAndConditions['content'];
|
||||
$termFiles = $courseLegal->getCurrentFile($data['courseId'], $data['sessionId']);
|
||||
} else {
|
||||
$termsAndConditions = $plugin->get('terms_and_conditions');
|
||||
$termFiles = '';
|
||||
}
|
||||
|
||||
$data['session'] = api_get_session_info($data['sessionId']);
|
||||
$data['student'] = api_get_user_info($data['studentUserId']);
|
||||
$data['course'] = api_get_course_info_by_id($data['courseId']);
|
||||
$data['acceptTermsUrl'] = $plugin->getQueueUrl($data);
|
||||
$data['rejectTermsUrl'] = $plugin->getTermsUrl($data, ADVANCED_SUBSCRIPTION_TERMS_MODE_REJECT);
|
||||
// Use Twig with String loader
|
||||
$termsContent = $plugin->renderTemplateString($termsAndConditions, $data);
|
||||
} else {
|
||||
$termsContent = '';
|
||||
$termFiles = '';
|
||||
$data['acceptTermsUrl'] = '#';
|
||||
$data['rejectTermsUrl'] = '#';
|
||||
}
|
||||
|
||||
// Assign into content
|
||||
$tpl->assign('termsRejected', $data['termsRejected']);
|
||||
$tpl->assign('acceptTermsUrl', $data['acceptTermsUrl']);
|
||||
$tpl->assign('rejectTermsUrl', $data['rejectTermsUrl']);
|
||||
$tpl->assign('session', $data['session']);
|
||||
$tpl->assign('student', $data['student']);
|
||||
$tpl->assign('sessionId', $data['sessionId']);
|
||||
$tpl->assign('termsContent', $termsContent);
|
||||
$tpl->assign('termsFiles', $termFiles);
|
||||
|
||||
$content = $tpl->fetch('/advanced_subscription/views/terms_and_conditions.tpl');
|
||||
echo $content;
|
||||
134
plugin/advanced_subscription/test/mails.php
Normal file
@@ -0,0 +1,134 @@
|
||||
<?php
|
||||
/* For license terms, see /license.txt */
|
||||
/**
|
||||
* A script to render all mails templates.
|
||||
*
|
||||
* @package chamilo.plugin.advanced_subscription
|
||||
*/
|
||||
require_once __DIR__.'/../config.php';
|
||||
|
||||
// Protect test
|
||||
api_protect_admin_script();
|
||||
|
||||
// exit;
|
||||
$plugin = AdvancedSubscriptionPlugin::create();
|
||||
// Get validation hash
|
||||
$hash = Security::remove_XSS($_REQUEST['v']);
|
||||
// Get data from request (GET or POST)
|
||||
$data['action'] = 'confirm';
|
||||
$data['currentUserId'] = 1;
|
||||
$data['queueId'] = 0;
|
||||
$data['is_connected'] = true;
|
||||
$data['profile_completed'] = 90.0;
|
||||
// Init result array
|
||||
|
||||
$data['sessionId'] = 1;
|
||||
$data['studentUserId'] = 4;
|
||||
|
||||
// Prepare data
|
||||
// Get session data
|
||||
// Assign variables
|
||||
$fieldsArray = [
|
||||
'description',
|
||||
'target',
|
||||
'mode',
|
||||
'publication_end_date',
|
||||
'recommended_number_of_participants',
|
||||
];
|
||||
$sessionArray = api_get_session_info($data['sessionId']);
|
||||
$extraSession = new ExtraFieldValue('session');
|
||||
$extraField = new ExtraField('session');
|
||||
// Get session fields
|
||||
$fieldList = $extraField->get_all([
|
||||
'variable IN ( ?, ?, ?, ?, ?)' => $fieldsArray,
|
||||
]);
|
||||
$fields = [];
|
||||
// Index session fields
|
||||
foreach ($fieldList as $field) {
|
||||
$fields[$field['id']] = $field['variable'];
|
||||
}
|
||||
|
||||
$mergedArray = array_merge([$data['sessionId']], array_keys($fields));
|
||||
$sessionFieldValueList = $extraSession->get_all(
|
||||
['item_id = ? field_id IN ( ?, ?, ?, ?, ?, ?, ? )' => $mergedArray]
|
||||
);
|
||||
foreach ($sessionFieldValueList as $sessionFieldValue) {
|
||||
// Check if session field value is set in session field list
|
||||
if (isset($fields[$sessionFieldValue['field_id']])) {
|
||||
$var = $fields[$sessionFieldValue['field_id']];
|
||||
$val = $sessionFieldValue['value'];
|
||||
// Assign session field value to session
|
||||
$sessionArray[$var] = $val;
|
||||
}
|
||||
}
|
||||
// Get student data
|
||||
$studentArray = api_get_user_info($data['studentUserId']);
|
||||
$studentArray['picture'] = $studentArray['avatar'];
|
||||
|
||||
// Get superior data if exist
|
||||
$superiorId = UserManager::getFirstStudentBoss($data['studentUserId']);
|
||||
if (!empty($superiorId)) {
|
||||
$superiorArray = api_get_user_info($superiorId);
|
||||
} else {
|
||||
$superiorArray = api_get_user_info(3);
|
||||
}
|
||||
// Get admin data
|
||||
$adminsArray = UserManager::get_all_administrators();
|
||||
$isWesternNameOrder = api_is_western_name_order();
|
||||
foreach ($adminsArray as &$admin) {
|
||||
$admin['complete_name'] = $isWesternNameOrder ?
|
||||
$admin['firstname'].', '.$admin['lastname'] : $admin['lastname'].', '.$admin['firstname']
|
||||
;
|
||||
}
|
||||
unset($admin);
|
||||
// Set data
|
||||
$data['action'] = 'confirm';
|
||||
$data['student'] = $studentArray;
|
||||
$data['superior'] = $superiorArray;
|
||||
$data['admins'] = $adminsArray;
|
||||
$data['admin'] = current($adminsArray);
|
||||
$data['session'] = $sessionArray;
|
||||
$data['signature'] = api_get_setting('Institution');
|
||||
$data['admin_view_url'] = api_get_path(WEB_PLUGIN_PATH).
|
||||
'advanced_subscription/src/admin_view.php?s='.$data['sessionId'];
|
||||
$data['newStatus'] = ADVANCED_SUBSCRIPTION_QUEUE_STATUS_BOSS_APPROVED;
|
||||
$data['student']['acceptUrl'] = $plugin->getQueueUrl($data);
|
||||
$data['newStatus'] = ADVANCED_SUBSCRIPTION_QUEUE_STATUS_BOSS_DISAPPROVED;
|
||||
$data['student']['rejectUrl'] = $plugin->getQueueUrl($data);
|
||||
$tpl = new Template($plugin->get_lang('plugin_title'));
|
||||
$tpl->assign('data', $data);
|
||||
$tplParams = [
|
||||
'user',
|
||||
'student',
|
||||
'students',
|
||||
'superior',
|
||||
'admins',
|
||||
'admin',
|
||||
'session',
|
||||
'signature',
|
||||
'admin_view_url',
|
||||
'acceptUrl',
|
||||
'rejectUrl',
|
||||
];
|
||||
foreach ($tplParams as $tplParam) {
|
||||
$tpl->assign($tplParam, $data[$tplParam]);
|
||||
}
|
||||
|
||||
$dir = __DIR__.'/../views/';
|
||||
$files = scandir($dir);
|
||||
|
||||
echo '<br>', '<pre>', print_r($files, 1), '</pre>';
|
||||
|
||||
foreach ($files as $k => &$file) {
|
||||
if (
|
||||
is_file($dir.$file) &&
|
||||
strpos($file, '.tpl') &&
|
||||
$file != 'admin_view.tpl'
|
||||
) {
|
||||
echo '<pre>', $file, '</pre>';
|
||||
echo $tpl->fetch('/advanced_subscription/views/'.$file);
|
||||
} else {
|
||||
unset($files[$k]);
|
||||
}
|
||||
}
|
||||
echo '<br>', '<pre>', print_r($files, 1), '</pre>';
|
||||
47
plugin/advanced_subscription/test/terms_to_pdf.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/* For license terms, see /license.txt */
|
||||
/**
|
||||
* A script to render all mails templates.
|
||||
*
|
||||
* @package chamilo.plugin.advanced_subscription
|
||||
*/
|
||||
require_once __DIR__.'/../config.php';
|
||||
|
||||
// Protect test
|
||||
api_protect_admin_script();
|
||||
|
||||
$data['action'] = 'confirm';
|
||||
$data['currentUserId'] = 1;
|
||||
$data['queueId'] = 0;
|
||||
$data['is_connected'] = true;
|
||||
$data['profile_completed'] = 90.0;
|
||||
$data['sessionId'] = intval($_REQUEST['s']);
|
||||
$data['studentUserId'] = intval($_REQUEST['u']);
|
||||
$data['student'] = api_get_user_info($data['studentUserId']);
|
||||
$data['session'] = api_get_session_info($data['sessionId']);
|
||||
|
||||
if (!empty($data['sessionId']) && !empty($data['studentUserId'])) {
|
||||
$plugin = AdvancedSubscriptionPlugin::create();
|
||||
|
||||
if (api_get_plugin_setting('courselegal', 'tool_enable')) {
|
||||
$courseLegal = CourseLegalPlugin::create();
|
||||
$courses = SessionManager::get_course_list_by_session_id($data['sessionId']);
|
||||
$course = current($courses);
|
||||
$data['courseId'] = $course['id'];
|
||||
$data['course'] = api_get_course_info_by_id($data['courseId']);
|
||||
$termsAndConditions = $courseLegal->getData($data['courseId'], $data['sessionId']);
|
||||
$termsAndConditions = $termsAndConditions['content'];
|
||||
$termsAndConditions = $plugin->renderTemplateString($termsAndConditions, $data);
|
||||
$tpl = new Template($plugin->get_lang('Terms'));
|
||||
$tpl->assign('session', $data['session']);
|
||||
$tpl->assign('student', $data['student']);
|
||||
$tpl->assign('sessionId', $data['sessionId']);
|
||||
$tpl->assign('termsContent', $termsAndConditions);
|
||||
$termsAndConditions = $tpl->fetch('/advanced_subscription/views/terms_and_conditions_to_pdf.tpl');
|
||||
$pdf = new PDF();
|
||||
$filename = 'terms'.sha1(rand(0, 99999));
|
||||
$pdf->content_to_pdf($termsAndConditions, null, $filename, null, 'F');
|
||||
$fileDir = api_get_path(WEB_ARCHIVE_PATH).$filename.'.pdf';
|
||||
echo '<pre>', print_r($fileDir, 1), '</pre>';
|
||||
}
|
||||
}
|
||||
86
plugin/advanced_subscription/test/ws_session_user.php
Normal file
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
/* For license terms, see /license.txt */
|
||||
/**
|
||||
* A script to test session details by user web service.
|
||||
*
|
||||
* @package chamilo.plugin.advanced_subscription
|
||||
*/
|
||||
|
||||
/**
|
||||
* Init.
|
||||
*/
|
||||
require_once __DIR__.'/../config.php';
|
||||
// Protect test
|
||||
api_protect_admin_script();
|
||||
|
||||
// exit;
|
||||
|
||||
$plugin = AdvancedSubscriptionPlugin::create();
|
||||
$hookPlugin = HookAdvancedSubscription::create();
|
||||
// Get params from request (GET or POST)
|
||||
$params = [];
|
||||
// Init result array
|
||||
$params['user_id'] = intval($_REQUEST['u']);
|
||||
$params['user_field'] = 'drupal_user_id';
|
||||
$params['session_id'] = intval($_REQUEST['s']);
|
||||
$params['profile_completed'] = 100;
|
||||
$params['is_connected'] = true;
|
||||
|
||||
/**
|
||||
* Copied code from WSHelperVerifyKey function.
|
||||
*/
|
||||
/**
|
||||
* Start WSHelperVerifyKey.
|
||||
*/
|
||||
//error_log(print_r($params,1));
|
||||
$check_ip = false;
|
||||
$ip = trim($_SERVER['REMOTE_ADDR']);
|
||||
// if we are behind a reverse proxy, assume it will send the
|
||||
// HTTP_X_FORWARDED_FOR header and use this IP instead
|
||||
if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
|
||||
list($ip1, $ip2) = split(',', $_SERVER['HTTP_X_FORWARDED_FOR']);
|
||||
$ip = trim($ip1);
|
||||
}
|
||||
// Check if a file that limits access from webservices exists and contains
|
||||
// the restraining check
|
||||
if (is_file(api_get_path(WEB_CODE_PATH).'webservices/webservice-auth-ip.conf.php')) {
|
||||
include api_get_path(WEB_CODE_PATH).'webservices/webservice-auth-ip.conf.php';
|
||||
if (!empty($ws_auth_ip)) {
|
||||
$check_ip = true;
|
||||
}
|
||||
}
|
||||
|
||||
global $_configuration;
|
||||
if ($check_ip) {
|
||||
$security_key = $_configuration['security_key'];
|
||||
} else {
|
||||
$security_key = $ip.$_configuration['security_key'];
|
||||
//error_log($secret_key.'-'.$security_key);
|
||||
}
|
||||
/**
|
||||
* End WSHelperVerifyKey.
|
||||
*/
|
||||
$params['secret_key'] = sha1($security_key);
|
||||
|
||||
// Registration soap wsdl
|
||||
$wsUrl = api_get_path(WEB_CODE_PATH).'webservices/registration.soap.php?wsdl';
|
||||
$options = [
|
||||
'location' => $wsUrl,
|
||||
'uri' => $wsUrl,
|
||||
];
|
||||
|
||||
/**
|
||||
* WS test.
|
||||
*/
|
||||
try {
|
||||
// Init soap client
|
||||
$client = new SoapClient(null, $options);
|
||||
// Soap call to WS
|
||||
$result = $client->__soapCall('HookAdvancedSubscription..WSSessionGetDetailsByUser', [$params]);
|
||||
if (is_object($result) && isset($result->action_url)) {
|
||||
echo '<br />';
|
||||
echo Display::url("message".$result->message, $result->action_url);
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
var_dump($e);
|
||||
}
|
||||
18
plugin/advanced_subscription/uninstall.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
/* For license terms, see /license.txt */
|
||||
/**
|
||||
* This script is included by main/admin/settings.lib.php when unselecting a plugin
|
||||
* and is meant to remove things installed by the install.php script in both
|
||||
* the global database and the courses tables.
|
||||
*
|
||||
* @package chamilo.plugin.advanced_subscription
|
||||
*/
|
||||
|
||||
/**
|
||||
* Queries.
|
||||
*/
|
||||
require_once __DIR__.'/config.php';
|
||||
if (!api_is_platform_admin()) {
|
||||
exit('You must have admin permissions to uninstall plugins');
|
||||
}
|
||||
AdvancedSubscriptionPlugin::create()->uninstall();
|
||||
@@ -0,0 +1,75 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ "MailTitle"| get_plugin_lang('AdvancedSubscriptionPlugin') | format(session.name) }}</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/header.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td width="394"><img src="{{ _p.web_css }}/themes/{{ "stylesheets"|api_get_setting }}/images/header-logo.png" width="230" height="60" alt="Ministerio de Educación"></td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td style="color: #93c5cd; font-family: Times New Roman, Times, serif; font-size: 24px; font-weight: bold; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: #93c5cd;">{{ "MailTitleAdminAcceptToAdmin"| get_plugin_lang('AdvancedSubscriptionPlugin') }}</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="356"> </td>
|
||||
<td valign="top"><p>{{ "MailDear" | get_plugin_lang('AdvancedSubscriptionPlugin') }}</p>
|
||||
<h2>{{ admin.complete_name }}</h2>
|
||||
<p>{{ "MailContentAdminAcceptToAdmin" | get_plugin_lang('AdvancedSubscriptionPlugin') | format(student.complete_name_with_username, session.name) }}</p>
|
||||
<p>{{ "MailThankYou" | get_plugin_lang('AdvancedSubscriptionPlugin') }}</p>
|
||||
<h3>{{ signature }}</h3></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td> </td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/footer.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,75 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ "MailTitle" | get_plugin_lang('AdvancedSubscriptionPlugin') | format(session.name) }}</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/header.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td width="394"><img src="{{ _p.web_css }}/themes/{{ "stylesheets"|api_get_setting }}/images/header-logo.png" width="230" height="60" alt="Ministerio de Educación"></td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td style="color: #93c5cd; font-family: Times New Roman, Times, serif; font-size: 24px; font-weight: bold; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: #93c5cd;">{{ "MailTitleAdminAcceptToStudent" | get_plugin_lang('AdvancedSubscriptionPlugin') | format(session.name) }}</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="356"> </td>
|
||||
<td valign="top"><p> {{ "MailDear" | get_plugin_lang('AdvancedSubscriptionPlugin') }} </p>
|
||||
<h2>{{ student.complete_name }}</h2>
|
||||
<p>{{ "MailContentAdminAcceptToStudent" | get_plugin_lang('AdvancedSubscriptionPlugin') | format(session.name, session.date_start) }}</p>
|
||||
<p>{{ "MailThankYou" | get_plugin_lang('AdvancedSubscriptionPlugin') }}</p>
|
||||
<h3>{{ signature }}</h3></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td> </td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/footer.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,75 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ "MailTitle"| get_plugin_lang('AdvancedSubscriptionPlugin') | format(session.name) }}</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/header.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td width="394"><img src="{{ _p.web_css }}/themes/{{ "stylesheets"|api_get_setting }}/images/header-logo.png" width="230" height="60" alt="Ministerio de Educación"></td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td style="color: #93c5cd; font-family: Times New Roman, Times, serif; font-size: 24px; font-weight: bold; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: #93c5cd;">{{ "MailTitleAdminAcceptToSuperior"| get_plugin_lang('AdvancedSubscriptionPlugin') | format(student.complete_name, session.name) }}</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="356"> </td>
|
||||
<td valign="top"><p>{{ "MailDear"| get_plugin_lang('AdvancedSubscriptionPlugin') }}</p>
|
||||
<h2>{{ superior.complete_name }}</h2>
|
||||
<p>{{ "MailContentAdminAcceptToSuperior"| get_plugin_lang('AdvancedSubscriptionPlugin') | format(student.complete_name, session.name, session.date_start) }}</p>
|
||||
<p>{{ "MailThankYou"| get_plugin_lang('AdvancedSubscriptionPlugin') }}</p>
|
||||
<h3>{{ signature }}</h3></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td> </td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/footer.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,75 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ "MailTitle"| get_plugin_lang('AdvancedSubscriptionPlugin') | format(session.name) }}</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/header.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td width="394"><img src="{{ _p.web_css }}/themes/{{ "stylesheets"|api_get_setting }}/images/header-logo.png" width="230" height="60" alt="Ministerio de Educación"></td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td style="color: #93c5cd; font-family: Times New Roman, Times, serif; font-size: 24px; font-weight: bold; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: #93c5cd;">{{ "MailTitleAdminRejectToAdmin" | get_plugin_lang('AdvancedSubscriptionPlugin') }}</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="356"> </td>
|
||||
<td valign="top"><p>{{ "MailDear" | get_plugin_lang("AdvancedSubscriptionPlugin") }}</p>
|
||||
<h2>{{ admin.complete_name }}</h2>
|
||||
<p>{{ "MailContentAdminRejectToAdmin"| get_plugin_lang('AdvancedSubscriptionPlugin') | format(student.complete_name_with_username, session.name) }}</strong></p>
|
||||
<p>{{ "MailThankYou" | get_plugin_lang("AdvancedSubscriptionPlugin") }}</p>
|
||||
<h3>{{ signature }}</h3></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td> </td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/footer.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,75 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ "MailTitle"| get_plugin_lang('AdvancedSubscriptionPlugin') | format(session.name) }}</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/header.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td width="394"><img src="{{ _p.web_css }}/themes/{{ "stylesheets"|api_get_setting }}/images/header-logo.png" width="230" height="60" alt="Ministerio de Educación"></td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td style="color: #93c5cd; font-family: Times New Roman, Times, serif; font-size: 24px; font-weight: bold; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: #93c5cd;">{{ "MailTitleAdminRejectToStudent"| get_plugin_lang('AdvancedSubscriptionPlugin') | format(session.name) }}</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="356"> </td>
|
||||
<td valign="top"><p>{{ "MailDear" | get_plugin_lang("AdvancedSubscriptionPlugin") }}</p>
|
||||
<h2>{{ student.complete_name }}</h2>
|
||||
<p>{{ "MailContentAdminRejectToStudent"| get_plugin_lang('AdvancedSubscriptionPlugin') | format(session.name, session.date_start) }}</p>
|
||||
<p>{{ "MailThankYou" | get_plugin_lang("AdvancedSubscriptionPlugin") }}</p>
|
||||
<h3>{{ signature }}</h3></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td> </td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/footer.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,75 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ "MailTitle"| get_plugin_lang('AdvancedSubscriptionPlugin') | format(session.name) }}</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/header.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td width="394"><img src="{{ _p.web_css }}/themes/{{ "stylesheets"|api_get_setting }}/images/header-logo.png" width="230" height="60" alt="Ministerio de Educación"></td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td style="color: #93c5cd; font-family: Times New Roman, Times, serif; font-size: 24px; font-weight: bold; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: #93c5cd;">{{ "MailTitleAdminRejectToSuperior"| get_plugin_lang("AdvancedSubscriptionPlugin") | format(student.complete_name, session.name) }}</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="356"> </td>
|
||||
<td valign="top"><p>{{ "MailDear" | get_plugin_lang("AdvancedSubscriptionPlugin") }}</p>
|
||||
<h2>{{ superior.complete_name }}</h2>
|
||||
<p>{{ "MailContentAdminRejectToSuperior"| get_plugin_lang("AdvancedSubscriptionPlugin") | format(student.complete_name, session.name) }}</p>
|
||||
<p>{{ "MailThankYou" | get_plugin_lang("AdvancedSubscriptionPlugin") }}</p>
|
||||
<h3>{{ signature }}</h3></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td> </td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/footer.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
167
plugin/advanced_subscription/views/admin_view.tpl
Normal file
@@ -0,0 +1,167 @@
|
||||
<form id="form_advanced_subscription_admin" class="form-search" method="post" action="/plugin/advanced_subscription/src/admin_view.php" name="form_advanced_subscription_admin">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<p class="text-title-select">{{ 'SelectASession' | get_plugin_lang('AdvancedSubscriptionPlugin') }}</p>
|
||||
<select id="session-select" name="s">
|
||||
<option value="0">
|
||||
{{ "SelectASession" | get_plugin_lang('AdvancedSubscriptionPlugin') }}
|
||||
</option>
|
||||
{% for sessionItem in sessionItems %}
|
||||
<option value="{{ sessionItem.id }}" {{ sessionItem.selected }}>
|
||||
{{ sessionItem.name }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
||||
<h4>{{ "SessionName" | get_plugin_lang('AdvancedSubscriptionPlugin') }}</h4>
|
||||
<h3 class="title-name-session">{{ session.name }}</h3>
|
||||
<h4>{{ "Target" | get_plugin_lang('AdvancedSubscriptionPlugin') }}</h4>
|
||||
<p>{{ session.target }}</p>
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<p class="separate-badge">
|
||||
<span class="badge badge-dis">{{ session.vacancies }}</span>
|
||||
{{ "Vacancies" | get_plugin_lang('AdvancedSubscriptionPlugin') }}</p>
|
||||
<p class="separate-badge">
|
||||
<span class="badge badge-info">{{ session.nbr_users }}</span>
|
||||
{{ 'CountOfSubscribedUsers'|get_lang }}
|
||||
</p>
|
||||
<p class="separate-badge">
|
||||
<span class="badge badge-recom">{{ session.recommended_number_of_participants }}</span>
|
||||
{{ "RecommendedNumberOfParticipants" | get_plugin_lang('AdvancedSubscriptionPlugin') }}</p>
|
||||
<h4>{{ "PublicationEndDate" | get_plugin_lang('AdvancedSubscriptionPlugin') }}</h4> <p>{{ session.publication_end_date }}</p>
|
||||
<h4>{{ "Mode" | get_plugin_lang('AdvancedSubscriptionPlugin') }}</h4> <p>{{ session.mode }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="student-list-table">
|
||||
<table id="student_table" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ "Postulant" | get_plugin_lang('AdvancedSubscriptionPlugin') }}</th>
|
||||
<th>{{ "InscriptionDate" | get_plugin_lang('AdvancedSubscriptionPlugin') }}</th>
|
||||
<th>{{ "Area" | get_plugin_lang('AdvancedSubscriptionPlugin') }}</th>
|
||||
<th>{{ "Institution" | get_plugin_lang('AdvancedSubscriptionPlugin') }}</th>
|
||||
<th>{{ "BossValidation" | get_plugin_lang('AdvancedSubscriptionPlugin') }}</th>
|
||||
<th class="advanced-subscription-decision-column">{{ "Decision" | get_plugin_lang('AdvancedSubscriptionPlugin') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% set row_class = "row_odd" %}
|
||||
{% for student in students %}
|
||||
<tr class="{{ row_class }}">
|
||||
<td class="name">
|
||||
<a href="{{ student.userLink }}" target="_blank">{{ student.complete_name }}<a>
|
||||
</td>
|
||||
<td>{{ student.created_at }}</td>
|
||||
<td>{{ student.area }}</td>
|
||||
<td>{{ student.institution }}</td>
|
||||
{% set cellClass = 'danger'%}
|
||||
{% if student.validation == 'Yes' %}
|
||||
{% set cellClass = 'success'%}
|
||||
{% endif %}
|
||||
<td>
|
||||
{% if student.validation != '' %}
|
||||
<span class="label label-{{ cellClass }}">
|
||||
{{ student.validation | get_plugin_lang('AdvancedSubscriptionPlugin') }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if student.status != approveAdmin and student.status != disapproveAdmin %}
|
||||
<a
|
||||
class="btn btn-success btn-advanced-subscription btn-accept"
|
||||
href="{{ student.acceptUrl }}"
|
||||
>
|
||||
{{ 'AcceptInfinitive' | get_plugin_lang('AdvancedSubscriptionPlugin') }}
|
||||
</a>
|
||||
<a
|
||||
class="btn btn-danger btn-advanced-subscription btn-reject"
|
||||
href="{{ student.rejectUrl }}"
|
||||
>
|
||||
{{ 'RejectInfinitive' | get_plugin_lang('AdvancedSubscriptionPlugin') }}
|
||||
</a>
|
||||
{% else %}
|
||||
{% if student.status == approveAdmin%}
|
||||
<span class="label label-success">{{ 'Accepted'|get_lang }}</span>
|
||||
{% elseif student.status == disapproveAdmin %}
|
||||
<span class="label label-danger">{{ 'Rejected'|get_lang }}</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% if row_class == "row_even" %}
|
||||
{% set row_class = "row_odd" %}
|
||||
{% else %}
|
||||
{% set row_class = "row_even" %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input name="f" value="social" type="hidden">
|
||||
</form>
|
||||
<div class="modal fade" id="modalMail" tabindex="-1" role="dialog" aria-labelledby="modalMailLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title" id="modalMailLabel">{{ "AdvancedSubscriptionAdminViewTitle" | get_plugin_lang('AdvancedSubscriptionPlugin')}}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<iframe id="iframeAdvsub" frameBorder="0">
|
||||
</iframe>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary" data-dismiss="modal">Cerrar</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<link href="{{ _p.web_plugin }}advanced_subscription/views/css/style.css" rel="stylesheet" type="text/css">
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$("#session-select").change(function () {
|
||||
$("#form_advanced_subscription_admin").submit();
|
||||
});
|
||||
$("a.btn-advanced-subscription").click(function(event){
|
||||
event.preventDefault();
|
||||
var confirmed = false;
|
||||
var studentName = $.trim($(this).closest("tr").find(".name").text());
|
||||
if (studentName) {
|
||||
;
|
||||
} else {
|
||||
studentName = "";
|
||||
}
|
||||
var msgRe = /%s/;
|
||||
if ($(this).hasClass('btn-accept')) {
|
||||
var msg = "{{ 'AreYouSureYouWantToAcceptSubscriptionOfX' | get_plugin_lang('AdvancedSubscriptionPlugin') }}";
|
||||
var confirmed = confirm(msg.replace(msgRe, studentName));
|
||||
} else {
|
||||
var msg = "{{ 'AreYouSureYouWantToRejectSubscriptionOfX' | get_plugin_lang('AdvancedSubscriptionPlugin') }}";
|
||||
var confirmed = confirm(msg.replace(msgRe, studentName));
|
||||
}
|
||||
if (confirmed) {
|
||||
var tdParent = $(this).closest("td");
|
||||
var advancedSubscriptionUrl = $(this).attr("href");
|
||||
$("#iframeAdvsub").attr("src", advancedSubscriptionUrl);
|
||||
$("#modalMail").modal("show");
|
||||
$.ajax({
|
||||
dataType: "json",
|
||||
url: advancedSubscriptionUrl
|
||||
}).done(function(result){
|
||||
if (result.error === true) {
|
||||
tdParent.html('');
|
||||
} else {
|
||||
console.log(result);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
84
plugin/advanced_subscription/views/css/style.css
Normal file
@@ -0,0 +1,84 @@
|
||||
.text-title-select{
|
||||
display: inline-block;
|
||||
}
|
||||
#session-select{
|
||||
display: inline-block;
|
||||
}
|
||||
.title-name-session{
|
||||
display: block;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
font-weight: normal;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.badge-dis{
|
||||
background-color: #008080;
|
||||
font-size: 20px;
|
||||
}
|
||||
.badge-recom{
|
||||
background-color:#88aa00 ;
|
||||
font-size: 20px;
|
||||
}
|
||||
.badge-info {
|
||||
font-size: 20px;
|
||||
}
|
||||
.separate-badge{
|
||||
margin-bottom: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.date, .mode{
|
||||
display: inline-block;
|
||||
}
|
||||
.img-circle{
|
||||
border-radius: 500px;
|
||||
-moz-border-radius: 500px;
|
||||
-webkit-border-radius: 500px;
|
||||
}
|
||||
#student_table.table td{
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
}
|
||||
#student_table.table td.name{
|
||||
color: #084B8A;
|
||||
text-align: left;
|
||||
|
||||
}
|
||||
#student_table.table th{
|
||||
font-size: 14px;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#modalMail .modal-body {
|
||||
height: 360px;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
#iframeAdvsub {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.legal-terms-popup{
|
||||
margin-top: 5%;
|
||||
margin-left: 5%;
|
||||
margin-right: 5%;
|
||||
}
|
||||
|
||||
.legal-terms{
|
||||
width: 90%;
|
||||
height: 50%;
|
||||
}
|
||||
|
||||
.legal-terms-buttons {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.legal-terms-title {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.advanced-subscription-decision-column {
|
||||
width: 200px;
|
||||
}
|
||||
BIN
plugin/advanced_subscription/views/img/aprobar.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
plugin/advanced_subscription/views/img/avatar.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
plugin/advanced_subscription/views/img/desaprobar.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
plugin/advanced_subscription/views/img/footer.png
Normal file
|
After Width: | Height: | Size: 270 B |
BIN
plugin/advanced_subscription/views/img/header.png
Normal file
|
After Width: | Height: | Size: 267 B |
BIN
plugin/advanced_subscription/views/img/icon-avatar.png
Normal file
|
After Width: | Height: | Size: 493 B |
BIN
plugin/advanced_subscription/views/img/line.png
Normal file
|
After Width: | Height: | Size: 283 B |
54
plugin/advanced_subscription/views/open_session.tpl
Normal file
@@ -0,0 +1,54 @@
|
||||
<link href="{{ _p.web_plugin }}advanced_subscription/views/css/style.css" rel="stylesheet" type="text/css">
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
$('#asp-close-window').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
window.close();
|
||||
});
|
||||
|
||||
$('#asp-go-to').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
window.close();
|
||||
window.opener.location.href = '{{ _p.web_main ~ 'session/index.php?session_id=' ~ session.id }}';
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<h2 class="legal-terms-title legal-terms-popup">
|
||||
{{ "SubscriptionToOpenSession"|get_plugin_lang('AdvancedSubscriptionPlugin') }}
|
||||
</h2>
|
||||
|
||||
{% if not is_subscribed %}
|
||||
<div class="alert alert-warning legal-terms-popup">
|
||||
<ul>
|
||||
{% for errorMessage in errorMessages %}
|
||||
<li>{{ errorMessage }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="legal-terms-buttons legal-terms-popup">
|
||||
<a
|
||||
class="btn btn-success btn-advanced-subscription btn-accept"
|
||||
href="#" id="asp-close-window">
|
||||
<em class="fa fa-check"></em>
|
||||
{{ "AcceptInfinitive"|get_plugin_lang('AdvancedSubscriptionPlugin') }}
|
||||
</a>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="alert alert-success legal-terms-popup">
|
||||
{{ 'SuccessSubscriptionToSessionX'|get_plugin_lang('AdvancedSubscriptionPlugin')|format(session.name) }}
|
||||
</div>
|
||||
|
||||
<div class="text-right legal-terms-popup">
|
||||
<a
|
||||
class="btn btn-success btn-advanced-subscription btn-accept"
|
||||
href="#" id="asp-go-to">
|
||||
<em class="fa fa-external-link"></em>
|
||||
{{ "GoToSessionX"|get_plugin_lang('AdvancedSubscriptionPlugin')|format(session.name) }}
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
75
plugin/advanced_subscription/views/reminder_notice_admin.tpl
Normal file
@@ -0,0 +1,75 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ "MailTitle"| get_plugin_lang('AdvancedSubscriptionPlugin') | format(session.name) }}</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/header.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td width="394"><img src="{{ _p.web_css }}/themes/{{ "stylesheets"|api_get_setting }}/images/header-logo.png" width="230" height="60" alt="Ministerio de Educación"></td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td style="color: #93c5cd; font-family: Times New Roman, Times, serif; font-size: 24px; font-weight: bold; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: #93c5cd;">{{ "MailTitleReminderAdmin" | get_plugin_lang("AdvancedSubscriptionPlugin") | format(session.name)}}</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="356"> </td>
|
||||
<td valign="top"><p>{{ "MailDear" | get_plugin_lang("AdvancedSubscriptionPlugin") }}</p>
|
||||
<h2>{{ admin.complete_name }}</h2>
|
||||
<p>{{ "MailContentReminderAdmin" | get_plugin_lang("AdvancedSubscriptionPlugin") | format(session.name, admin_view_url)}}</p>
|
||||
<p>{{ "MailThankYou" | get_plugin_lang("AdvancedSubscriptionPlugin") }}</p>
|
||||
<h3>{{ signature }}</h3></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td> </td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/footer.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,76 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ "MailTitle"| get_plugin_lang('AdvancedSubscriptionPlugin') | format(session.name) }}</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/header.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td width="394"><img src="{{ _p.web_css }}/themes/{{ "stylesheets"|api_get_setting }}/images/header-logo.png" width="230" height="60" alt="Ministerio de Educación"></td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td style="color: #93c5cd; font-family: Times New Roman, Times, serif; font-size: 24px; font-weight: bold; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: #93c5cd;">{{ "MailTitleReminderStudent"| get_plugin_lang('AdvancedSubscriptionPlugin') | format(session.name) }}</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="356"> </td>
|
||||
<td valign="top"><p>{{ "MailDear" | get_plugin_lang("AdvancedSubscriptionPlugin") }}</p>
|
||||
<h2>{{ student.complete_name }}</h2>
|
||||
<p>{{ "MailContentReminderStudent"| get_plugin_lang("AdvancedSubscriptionPlugin") | format(session.name, session.date_start) }}</p>
|
||||
<p>{{ "MailContentReminderStudentSecond"| get_plugin_lang("AdvancedSubscriptionPlugin") }}</p>
|
||||
<p>{{ "MailThankYouCollaboration"| get_plugin_lang("AdvancedSubscriptionPlugin") }}</p>
|
||||
<p>{{ signature }}</p></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td> </td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/footer.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,86 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ "MailTitle"| get_plugin_lang('AdvancedSubscriptionPlugin') | format(session.name) }}</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/header.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td width="394"><img src="{{ _p.web_css }}/themes/{{ "stylesheets"|api_get_setting }}/images/header-logo.png" width="230" height="60" alt="Ministerio de Educación"></td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td style="color: #93c5cd; font-family: Times New Roman, Times, serif; font-size: 24px; font-weight: bold; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: #93c5cd;">{{ "MailTitleReminderSuperior" | get_plugin_lang("AdvancedSubscriptionPlugin") }}</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="356"> </td>
|
||||
<td valign="top"><p>{{ "MailDear" | get_plugin_lang("AdvancedSubscriptionPlugin") }}</p>
|
||||
<h2>{{ superior.complete_name }}</h2>
|
||||
<p>{{ "MailContentReminderSuperior" | get_plugin_lang("AdvancedSubscriptionPlugin") | format(session.name, session.date_start, session.description) }}</p>
|
||||
<p>{{ "MailContentReminderSuperiorSecond" | get_plugin_lang("AdvancedSubscriptionPlugin") }}</p>
|
||||
<table width="100%" border="0" cellspacing="3" cellpadding="4" style="background:#EDE9EA">
|
||||
{% for student in students %}
|
||||
<tr>
|
||||
<td valign="middle"><img src="{{ student.avatar }}" width="50" height="50" alt=""></td>
|
||||
<td valign="middle"><h4>{{ student.complete_name }}</h4></td>
|
||||
<td valign="middle"><a href="{{ student.acceptUrl }}"><img src="{{ _p.web_plugin }}advanced_subscription/views/img/aprobar.png" width="90" height="25" alt=""></a></td>
|
||||
<td valign="middle"><a href="{{ student.rejectUrl }}"><img src="{{ _p.web_plugin }}advanced_subscription/views/img/desaprobar.png" width="90" height="25" alt=""></a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
<p>{{ "MailThankYou" | get_plugin_lang("AdvancedSubscriptionPlugin") }}</p>
|
||||
<p>{{ signature }}</p></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td> </td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/footer.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,87 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ "MailTitle"| get_plugin_lang('AdvancedSubscriptionPlugin') | format(session.name) }}</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/header.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td width="394"><img src="{{ _p.web_css }}/themes/{{ "stylesheets"|api_get_setting }}/images/header-logo.png" width="230" height="60" alt="Ministerio de Educación"></td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td style="color: #93c5cd; font-family: Times New Roman, Times, serif; font-size: 24px; font-weight: bold; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: #93c5cd;">{{ "MailTitleReminderMaxSuperior" | get_plugin_lang("AdvancedSubscriptionPlugin") }}</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="356"> </td>
|
||||
<td valign="top">
|
||||
<p>{{ "MailDear" | get_plugin_lang("AdvancedSubscriptionPlugin") }}</p>
|
||||
<h2>{{ superior.complete_name }}</h2>
|
||||
<p>{{ "MailContentReminderMaxSuperior" | get_plugin_lang("AdvancedSubscriptionPlugin") | format(session.name, session.date_start, session.description) }}</p>
|
||||
<p>{{ "MailContentReminderMaxSuperiorSecond" | get_plugin_lang("AdvancedSubscriptionPlugin") | format(session.recommended_number_of_participants) }}</p>
|
||||
<table width="100%" border="0" cellspacing="3" cellpadding="4" style="background:#EDE9EA">
|
||||
{% for student in students %}
|
||||
<tr>
|
||||
<td valign="middle"><img src="{{ student.avatar }}" width="50" height="50" alt=""></td>
|
||||
<td valign="middle"><h4>{{ student.complete_name }}</h4></td>
|
||||
<td valign="middle"><a href="{{ student.acceptUrl }}"><img src="{{ _p.web_plugin }}advanced_subscription/views/img/aprobar.png" width="90" height="25" alt=""></a></td>
|
||||
<td valign="middle"><a href="{{ student.rejectUrl }}"><img src="{{ _p.web_plugin }}advanced_subscription/views/img/desaprobar.png" width="90" height="25" alt=""></a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
<p>{{ "MailThankYou" | get_plugin_lang("AdvancedSubscriptionPlugin") }}</p>
|
||||
<h3>{{ signature }}</h3></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td> </td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/footer.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,75 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ "MailTitle"| get_plugin_lang('AdvancedSubscriptionPlugin') | format(session.name) }}</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/header.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td width="394"><img src="{{ _p.web_css }}/themes/{{ "stylesheets"|api_get_setting }}/images/header-logo.png" width="230" height="60" alt="Ministerio de Educación"></td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td style="color: #93c5cd; font-family: Times New Roman, Times, serif; font-size: 24px; font-weight: bold; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: #93c5cd;">{{ "MailTitleStudentRequestNoSuperiorToAdmin"| get_plugin_lang("AdvancedSubscriptionPlugin") | format(student.complete_name, session.name) }}</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="356"> </td>
|
||||
<td valign="top"><p>{{ "MailDear" | get_plugin_lang("AdvancedSubscriptionPlugin") }}</p>
|
||||
<h2>{{ admin.complete_name }}</h2>
|
||||
<p>{{ "MailContentStudentRequestNoSuperiorToAdmin"| get_plugin_lang("AdvancedSubscriptionPlugin") | format(student.complete_name_with_username, session.name, admin_view_url) }}</p>
|
||||
<p>{{ "MailThankYou" | get_plugin_lang("AdvancedSubscriptionPlugin") }}</p>
|
||||
<h3>{{ signature }}</h3></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td> </td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/footer.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,76 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ "MailTitle"| get_plugin_lang('AdvancedSubscriptionPlugin') | format(session.name) }}</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/header.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td width="394"><img src="{{ _p.web_css }}/themes/{{ "stylesheets"|api_get_setting }}/images/header-logo.png" width="230" height="60" alt="Ministerio de Educación"></td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td style="color: #93c5cd; font-family: Times New Roman, Times, serif; font-size: 24px; font-weight: bold; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: #93c5cd;">{{ "MailTitleStudentRequestNoSuperiorToStudent"| get_plugin_lang("AdvancedSubscriptionPlugin") | format(session.name) }}</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="356"> </td>
|
||||
<td valign="top"><p>{{ "MailDear" | get_plugin_lang("AdvancedSubscriptionPlugin") }}</p>
|
||||
<h2>{{ student.complete_name }}</h2>
|
||||
<p>{{ "MailContentStudentRequestNoSuperiorToStudent"| get_plugin_lang("AdvancedSubscriptionPlugin") | format(session.name, session.date_start) }}</p>
|
||||
<p>{{ "MailContentStudentRequestNoSuperiorToStudentSecond"| get_plugin_lang("AdvancedSubscriptionPlugin") }}</p>
|
||||
<p>{{ "MailThankYou" | get_plugin_lang("AdvancedSubscriptionPlugin") }}</p>
|
||||
<p>{{ signature }}</p></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td> </td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/footer.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,75 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ "MailTitle"| get_plugin_lang('AdvancedSubscriptionPlugin') | format(session.name) }}</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/header.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td width="394"><img src="{{ _p.web_css }}/themes/{{ "stylesheets"|api_get_setting }}/images/header-logo.png" width="230" height="60" alt="Ministerio de Educación"></td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td style="color: #93c5cd; font-family: Times New Roman, Times, serif; font-size: 24px; font-weight: bold; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: #93c5cd;">{{ "MailTitleStudentRequestToStudent"| get_plugin_lang("AdvancedSubscriptionPlugin") | format(session.name) }}</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="356"> </td>
|
||||
<td valign="top"><p>{{ "MailDear" | get_plugin_lang("AdvancedSubscriptionPlugin") }}</p>
|
||||
<h2>{{ student.complete_name }}</h2>
|
||||
<p>{{ "MailContentStudentRequestToStudent"| get_plugin_lang("AdvancedSubscriptionPlugin") | format(session.name, session.date_start) }}</p>
|
||||
<p>{{ "MailContentStudentRequestToStudentSecond" | get_plugin_lang("AdvancedSubscriptionPlugin") }}</p>
|
||||
<p>{{ signature }}</p></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td> </td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/footer.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,84 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ "MailTitle"| get_plugin_lang('AdvancedSubscriptionPlugin') | format(session.name) }}</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/header.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td width="394"><img src="{{ _p.web_css }}/themes/{{ "stylesheets"|api_get_setting }}/images/header-logo.png" width="230" height="60" alt="Ministerio de Educación"></td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td style="color: #93c5cd; font-family: Times New Roman, Times, serif; font-size: 24px; font-weight: bold; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: #93c5cd;">{{ "MailTitleStudentRequestToSuperior" | get_plugin_lang("AdvancedSubscriptionPlugin") }}</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="356"> </td>
|
||||
<td valign="top"><p>{{ "MailDear" | get_plugin_lang("AdvancedSubscriptionPlugin") }}</p>
|
||||
<h2>{{ superior.complete_name }}</h2>
|
||||
<p>{{ "MailContentStudentRequestToSuperior" | get_plugin_lang("AdvancedSubscriptionPlugin") | format(student.complete_name, session.name, session.date_start, session.description) }}</p>
|
||||
<p>{{ "MailContentStudentRequestToSuperiorSecond" | get_plugin_lang("AdvancedSubscriptionPlugin") }}</p>
|
||||
<table width="100%" border="0" cellspacing="3" cellpadding="4" style="background:#EDE9EA">
|
||||
<tr>
|
||||
<td width="58" valign="middle"><img src="{{ student.picture.file }}" width="50" height="50" alt=""></td>
|
||||
<td width="211" valign="middle"><h4>{{ student.complete_name }}</h4></td>
|
||||
<td width="90" valign="middle"><a href="{{ student.acceptUrl }}&modal_size=lg" class="ajax"><img src="{{ _p.web_plugin }}advanced_subscription/views/img/aprobar.png" width="90" height="25" alt=""></a></td>
|
||||
<td width="243" valign="middle"><a href="{{ student.rejectUrl }}&modal_size=lg" class="ajax"><img src="{{ _p.web_plugin }}advanced_subscription/views/img/desaprobar.png" width="90" height="25" alt=""></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>{{ "MailThankYou" | get_plugin_lang("AdvancedSubscriptionPlugin") }}</p>
|
||||
<p>{{ signature }}</p></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td> </td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/footer.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,75 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ "MailTitle"| get_plugin_lang('AdvancedSubscriptionPlugin') | format(session.name) }}</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/header.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td width="394"><img src="{{ _p.web_css }}/themes/{{ "stylesheets"|api_get_setting }}/images/header-logo.png" width="230" height="60" alt="Ministerio de Educación"></td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td style="color: #93c5cd; font-family: Times New Roman, Times, serif; font-size: 24px; font-weight: bold; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: #93c5cd;">{{ "MailTitleSuperiorAcceptToAdmin"| get_plugin_lang("AdvancedSubscriptionPlugin") | format(student.complete_name, session.name) }}</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="356"> </td>
|
||||
<td valign="top"><p>{{ "MailDear" | get_plugin_lang("AdvancedSubscriptionPlugin") }}</p>
|
||||
<h2>{{ admin.complete_name }}</h2>
|
||||
<p>{{ "MailContentSuperiorAcceptToAdmin"| get_plugin_lang("AdvancedSubscriptionPlugin") | format(student.complete_name_with_username, session.name, admin_view_url) }}</p>
|
||||
<p>{{ "MailThankYou" | get_plugin_lang("AdvancedSubscriptionPlugin") }}</p>
|
||||
<h3>{{ signature }}</h3></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td> </td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/footer.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,76 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ "MailTitle"| get_plugin_lang('AdvancedSubscriptionPlugin') | format(session.name) }}</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/header.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td width="394"><img src="{{ _p.web_css }}/themes/{{ "stylesheets"|api_get_setting }}/images/header-logo.png" width="230" height="60" alt="Ministerio de Educación"></td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td style="color: #93c5cd; font-family: Times New Roman, Times, serif; font-size: 24px; font-weight: bold; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: #93c5cd;">{{ "MailTitleSuperiorAcceptToStudent" | get_plugin_lang("AdvancedSubscriptionPlugin") | format(session.name) }}</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="356"> </td>
|
||||
<td valign="top">
|
||||
<p>{{ "MailDear" | get_plugin_lang("AdvancedSubscriptionPlugin") }}</p>
|
||||
<h2>{{ student.complete_name }}</h2>
|
||||
<p>{{ "MailContentSuperiorAcceptToStudent" | get_plugin_lang("AdvancedSubscriptionPlugin") | format(session.name ) }}</p>
|
||||
<p>{{ "MailThankYou" | get_plugin_lang("AdvancedSubscriptionPlugin") }}</p>
|
||||
<h3>{{ signature }}</h3></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td> </td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/footer.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,76 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ "MailTitle"| get_plugin_lang('AdvancedSubscriptionPlugin') | format(session.name) }}</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/header.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td width="394"><img src="{{ _p.web_css }}/themes/{{ "stylesheets"|api_get_setting }}/images/header-logo.png" width="230" height="60" alt="Ministerio de Educación"></td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td style="color: #93c5cd; font-family: Times New Roman, Times, serif; font-size: 24px; font-weight: bold; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: #93c5cd;">{{ "MailTitleSuperiorAcceptToSuperior"| get_plugin_lang("AdvancedSubscriptionPlugin") | format(student.complete_name) }}</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="356"> </td>
|
||||
<td valign="top"><p>{{ "MailDear" | get_plugin_lang("AdvancedSubscriptionPlugin") }}</p>
|
||||
<h2>{{ superior.complete_name }}</h2>
|
||||
<p>{{ "MailContentSuperiorAcceptToSuperior"| get_plugin_lang("AdvancedSubscriptionPlugin") | format(session.name, student.complete_name) }}</p>
|
||||
<p>{{ "MailContentSuperiorAcceptToSuperiorSecond"| get_plugin_lang("AdvancedSubscriptionPlugin") }}</p>
|
||||
<p>{{ "MailThankYouCollaboration" | get_plugin_lang("AdvancedSubscriptionPlugin") }}</p>
|
||||
<h3>{{ signature }}</h3></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td> </td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/footer.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,75 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ "MailTitle"| get_plugin_lang('AdvancedSubscriptionPlugin') | format(session.name) }}</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/header.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td width="394"><img src="{{ _p.web_css }}/themes/{{ "stylesheets"|api_get_setting }}/images/header-logo.png" width="230" height="60" alt="Ministerio de Educación"></td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td style="color: #93c5cd; font-family: Times New Roman, Times, serif; font-size: 24px; font-weight: bold; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: #93c5cd;">{{ "MailTitleSuperiorRejectToStudent" | get_plugin_lang("AdvancedSubscriptionPlugin") | format(session.name) }}</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="356"> </td>
|
||||
<td valign="top"><p>{{ "MailDear" | get_plugin_lang("AdvancedSubscriptionPlugin") }}</p>
|
||||
<h2>{{ student.complete_name }}</h2>
|
||||
<p>{{ "MailContentSuperiorRejectToStudent" | get_plugin_lang("AdvancedSubscriptionPlugin") | format(session.name) }}</p>
|
||||
<p>{{ "MailThankYou" | get_plugin_lang("AdvancedSubscriptionPlugin") }}</p>
|
||||
<h3>{{ signature }}</h3></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td> </td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/footer.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,75 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ "MailTitle"| get_plugin_lang('AdvancedSubscriptionPlugin') | format(session.name) }}</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/header.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><table width="700" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td width="394"><img src="{{ _p.web_css }}/themes/{{ "stylesheets"|api_get_setting }}/images/header-logo.png" width="230" height="60" alt="Ministerio de Educación"></td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td style="color: #93c5cd; font-family: Times New Roman, Times, serif; font-size: 24px; font-weight: bold; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: #93c5cd;">{{ "MailTitleSuperiorRejectToSuperior"| get_plugin_lang("AdvancedSubscriptionPlugin") | format(student.complete_name) }}</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="356"> </td>
|
||||
<td valign="top"><p>{{ "MailDear" | get_plugin_lang("AdvancedSubscriptionPlugin") }}</p>
|
||||
<h2>{{ superior.complete_name }}</h2>
|
||||
<p>{{ "MailContentSuperiorRejectToSuperior"| get_plugin_lang("AdvancedSubscriptionPlugin") | format(session.name, student.complete_name) }}</p>
|
||||
<p>{{ "MailThankYouCollaboration" | get_plugin_lang("AdvancedSubscriptionPlugin") }}</p>
|
||||
<h3>{{ signature }}</h3></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50"> </td>
|
||||
<td> </td>
|
||||
<td width="50"> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/line.png" width="700" height="25" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{{ _p.web_plugin }}advanced_subscription/views/img/footer.png" width="700" height="20" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
61
plugin/advanced_subscription/views/terms_and_conditions.tpl
Normal file
@@ -0,0 +1,61 @@
|
||||
{# start copy from head.tpl #}
|
||||
<meta charset="{{ system_charset }}" />
|
||||
<link href="https://chamilo.org/chamilo-lms/" rel="help" />
|
||||
<link href="https://chamilo.org/the-association/" rel="author" />
|
||||
<link href="https://chamilo.org/the-association/" rel="copyright" />
|
||||
{{ prefetch }}
|
||||
{{ favico }}
|
||||
{{ browser_specific_head }}
|
||||
<link rel="apple-touch-icon" href="{{ _p.web }}apple-touch-icon.png" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="Generator" content="{{ _s.software_name }} {{ _s.system_version|slice(0,1) }}" />
|
||||
{# Use the latest engine in ie8/ie9 or use google chrome engine if available #}
|
||||
{# Improve usability in portal devices #}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{ title_string }}</title>
|
||||
{{ css_static_file_to_string }}
|
||||
{{ js_file_to_string }}
|
||||
{{ css_custom_file_to_string }}
|
||||
{{ css_style_print }}
|
||||
{# end copy from head.tpl #}
|
||||
<h2 class="legal-terms-title legal-terms-popup">
|
||||
{{ "TermsAndConditions" | get_lang }}
|
||||
</h2>
|
||||
{% if termsRejected == 1 %}
|
||||
<div class="error-message legal-terms-popup">
|
||||
{{ "YouMustAcceptTermsAndConditions" | get_plugin_lang("AdvancedSubscriptionPlugin") | format(session.name) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if errorMessages is defined %}
|
||||
<div class="alert alert-warning legal-terms-popup">
|
||||
<ul>
|
||||
{% for errorMessage in errorMessages %}
|
||||
<li>{{ errorMessage }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="legal-terms legal-terms-popup">
|
||||
{{ termsContent }}
|
||||
</div>
|
||||
<div class="legal-terms-files legal-terms-popup">
|
||||
{{ termsFiles }}
|
||||
</div>
|
||||
<div class="legal-terms-buttons legal-terms-popup">
|
||||
<a
|
||||
class="btn btn-success btn-advanced-subscription btn-accept"
|
||||
href="{{ acceptTermsUrl }}"
|
||||
>
|
||||
{{ "AcceptInfinitive" | get_plugin_lang("AdvancedSubscriptionPlugin") }}
|
||||
</a>
|
||||
<a
|
||||
class="btn btn-danger btn-advanced-subscription btn-reject"
|
||||
href="{{ rejectTermsUrl }}"
|
||||
>
|
||||
{{ "RejectInfinitive" | get_plugin_lang("AdvancedSubscriptionPlugin") }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<link href="{{ _p.web_plugin }}advanced_subscription/views/css/style.css" rel="stylesheet" type="text/css">
|
||||
@@ -0,0 +1,23 @@
|
||||
{# start copy from head.tpl #}
|
||||
<meta charset="{{ system_charset }}" />
|
||||
<link href="https://chamilo.org/chamilo-lms/" rel="help" />
|
||||
<link href="https://chamilo.org/the-association/" rel="author" />
|
||||
<link href="https://chamilo.org/the-association/" rel="copyright" />
|
||||
{{ prefetch }}
|
||||
{{ favico }}
|
||||
{{ browser_specific_head }}
|
||||
<link rel="apple-touch-icon" href="{{ _p.web }}apple-touch-icon.png" />
|
||||
<link href="{{ _p.web_plugin }}advanced_subscription/views/css/style.css" rel="stylesheet" type="text/css">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="Generator" content="{{ _s.software_name }} {{ _s.system_version|slice(0,1) }}" />
|
||||
{# Use the latest engine in ie8/ie9 or use google chrome engine if available #}
|
||||
{# Improve usability in portal devices #}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{ title_string }}</title>
|
||||
{{ css_file_to_string }}
|
||||
{{ css_style_print }}
|
||||
{{ js_file_to_string }}
|
||||
{# end copy from head.tpl #}
|
||||
<div class="legal-terms-popup">
|
||||
{{ termsContent }}
|
||||
</div>
|
||||