Minor - partial merge with 1.11.x

pull/2944/head
Julio Montoya 6 years ago
parent de7e550830
commit 510ee8662b
  1. 99
      main/inc/lib/display.lib.php
  2. 9
      main/lp/lp_controller.php
  3. 2
      main/lp/lp_view.php
  4. 19
      main/lp/scorm_api.php
  5. 2
      main/messages/view_message.php
  6. 2
      main/mySpace/company_reports.php
  7. 126
      main/mySpace/myStudents.php
  8. 9
      main/mySpace/student.php
  9. 49
      main/mySpace/survey_report.php
  10. 2
      main/search/search_suggestions.php
  11. 1
      main/session/about.php
  12. 2
      main/session/session_category_list.php
  13. 4
      main/session/session_list.php
  14. 5
      main/social/map.php
  15. 18
      main/social/my_skills_report.php
  16. 10
      main/social/personal_data.php
  17. 38
      main/social/profile.php
  18. 16
      main/survey/fillsurvey.php
  19. 103
      main/survey/survey.lib.php
  20. 55
      main/survey/surveyUtil.class.php
  21. 18
      main/survey/survey_invite.php
  22. 2
      main/work/work.lib.php
  23. 14
      src/CoreBundle/Component/Editor/CkEditor/Toolbar/Basic.php
  24. 55
      src/CoreBundle/Component/Editor/CkEditor/Toolbar/Documents.php
  25. 58
      src/CoreBundle/Component/Editor/CkEditor/Toolbar/IntroductionSection.php
  26. 50
      src/CoreBundle/Component/Editor/CkEditor/Toolbar/TestQuestionDescription.php
  27. 6
      src/CoreBundle/Component/Utils/ChamiloApi.php
  28. 4
      src/CoreBundle/Composer/ScriptHandler.php

@ -2848,70 +2848,85 @@ HTML;
*/
public static function getFrameReadyBlock($frameName)
{
$defaultFeatures = ['playpause', 'current', 'progress', 'duration', 'tracks', 'volume', 'fullscreen', 'vrview'];
$webPublicPath = api_get_path(WEB_PUBLIC_PATH);
$videoFeatures = [
'playpause',
'current',
'progress',
'duration',
'tracks',
'volume',
'fullscreen',
'vrview',
'markersrolls',
];
$features = api_get_configuration_value('video_features');
$bowerJsFiles = [];
$bowerCSSFiles = [];
$videoPluginsJS = [];
$videoPluginCSS = [];
if (!empty($features) && isset($features['features'])) {
foreach ($features['features'] as $feature) {
if ($feature === 'vrview') {
continue;
}
$defaultFeatures[] = $feature;
$bowerJsFiles[] = "mediaelement/plugins/$feature/$feature.js";
$bowerCSSFiles[] = "mediaelement/plugins/$feature/$feature.css";
$videoPluginsJS[] = "mediaelement/plugins/$feature/$feature.js";
$videoPluginCSS[] = "mediaelement/plugins/$feature/$feature.css";
}
}
$translateHtml = '';
$translate = api_get_configuration_value('translate_html');
if ($translate) {
$translateHtml = '{type:"script", id:"_fr4", src:"'.api_get_path(WEB_AJAX_PATH).'lang.ajax.php?a=translate_html&'.api_get_cidreq().'"},';
$videoPluginFiles = '';
foreach ($videoPluginsJS as $file) {
$videoPluginFiles .= '{type: "script", src: "'.$webPublicPath.'assets/'.$file.'"},';
}
$counter = 10;
$extraMediaFiles = '';
foreach ($bowerJsFiles as $file) {
$extraMediaFiles .= '{type: "script", id: "media_'.$counter.'", src: "'.api_get_path(WEB_PUBLIC_PATH).'assets/'.$file.'"},';
$counter++;
$videoPluginCssFiles = '';
foreach ($videoPluginCSS as $file) {
$videoPluginCssFiles .= '{type: "stylesheet", src: "'.$webPublicPath.'assets/'.$file.'"},';
}
foreach ($bowerCSSFiles as $file) {
$extraMediaFiles .= '{type: "stylesheet", id: "media_'.$counter.'", src: "'.api_get_path(WEB_PUBLIC_PATH).'assets/'.$file.'"},';
$counter++;
$translateHtml = '';
$translate = api_get_configuration_value('translate_html');
if ($translate) {
$translateHtml = '{type:"script", src:"'.api_get_path(WEB_AJAX_PATH).'lang.ajax.php?a=translate_html&'.api_get_cidreq().'"},';
}
$defaultFeatures = implode("','", $defaultFeatures);
$videoFeatures = implode("','", $videoFeatures);
$frameReady = '
$.frameReady(function() {
$(function() {
$("video:not(.skip), audio:not(.skip)").mediaelementplayer({
pluginPath: "'.api_get_path(WEB_PUBLIC_PATH).'assets/mediaelement/build/",
features: ["'.$defaultFeatures.'"],
$.frameReady(function() {
$(function () {
$("video:not(.skip), audio:not(.skip)").mediaelementplayer({
pluginPath: "'.$webPublicPath.'assets/mediaelement/plugins/",
features: [\''.$videoFeatures.'\'],
success: function(mediaElement, originalNode, instance) {
'.ChamiloApi::getQuizMarkersRollsJS().'
},
vrPath: "'.api_get_path(WEB_PUBLIC_PATH).'assets/vrview/build/vrview.js"
vrPath: "'.$webPublicPath.'assets/vrview/build/vrview.js"
});
});
}, "'.$frameName.'",
{
load: [
{ type:"script", id:"_fr1", src:"'.api_get_jquery_web_path().'"},
{ type:"script", id:"_fr7", src:"'.api_get_path(WEB_PUBLIC_PATH).'assets/MathJax/MathJax.js?config=AM_HTMLorMML"},
{ type:"script", id:"_fr4", src:"'.api_get_path(WEB_PUBLIC_PATH).'assets/jquery-ui/jquery-ui.min.js"},
{ type:"stylesheet", id:"_fr5", src:"'.api_get_path(WEB_PUBLIC_PATH).'assets/jquery-ui/themes/smoothness/jquery-ui.min.css"},
{ type:"stylesheet", id:"_fr6", src:"'.api_get_path(WEB_PUBLIC_PATH).'assets/jquery-ui/themes/smoothness/theme.css"},
{ type:"script", id:"_fr2", src:"'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.highlight.js"},
{ type:"stylesheet", id:"_fr7", src:"'.api_get_path(WEB_PUBLIC_PATH).'css/dialog.css"},
{ type:"script", id:"_fr3", src:"'.api_get_path(WEB_CODE_PATH).'glossary/glossary.js.php?'.api_get_cidreq().'"},
{type: "script", id: "_media1", src: "'.api_get_path(WEB_PUBLIC_PATH).'assets/mediaelement/build/mediaelement-and-player.min.js"},
{type: "stylesheet", id: "_media2", src: "'.api_get_path(WEB_PUBLIC_PATH).'assets/mediaelement/build/mediaelementplayer.min.css"},
{type: "stylesheet", id: "_media4", src: "'.api_get_path(WEB_PUBLIC_PATH).'assets/mediaelement/plugins/vrview/vrview.css"},
{type: "script", id: "_media4", src: "'.api_get_path(WEB_PUBLIC_PATH).'assets/mediaelement/plugins/vrview/vrview.js"},
'.$extraMediaFiles.'
},
"'.$frameName.'",
[
{type:"script", src:"'.api_get_jquery_web_path().'", deps: [
{type:"script", src:"'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.highlight.js"},
{type:"script", src:"'.api_get_path(WEB_CODE_PATH).'glossary/glossary.js.php?'.api_get_cidreq().'"},
{type:"script", src:"'.$webPublicPath.'assets/jquery-ui/jquery-ui.min.js"},
{type:"script", src: "'.$webPublicPath.'assets/mediaelement/build/mediaelement-and-player.min.js",
deps: [
{type:"script", src: "'.$webPublicPath.'assets/mediaelement/plugins/vrview/vrview.js"},
{type:"script", src: "'.$webPublicPath.'assets/mediaelement/plugins/markersrolls/markersrolls.js"},
'.$videoPluginFiles.'
]},
'.$translateHtml.'
]
});';
]},
'.$videoPluginCssFiles.'
{type:"script", src:"'.$webPublicPath.'assets/MathJax/MathJax.js?config=AM_HTMLorMML"},
{type:"stylesheet", src:"'.$webPublicPath.'assets/jquery-ui/themes/smoothness/jquery-ui.min.css"},
{type:"stylesheet", src:"'.$webPublicPath.'assets/jquery-ui/themes/smoothness/theme.css"},
{type:"stylesheet", src:"'.$webPublicPath.'css/dialog.css"},
{type:"stylesheet", src: "'.$webPublicPath.'assets/mediaelement/build/mediaelementplayer.min.css"},
{type:"stylesheet", src: "'.$webPublicPath.'assets/mediaelement/plugins/vrview/vrview.css"},
]);';
return $frameReady;
}

@ -55,7 +55,7 @@ $htmlHeadXtra[] = '
/*
Script to manipulate Learning Path items with Drag and drop
*/
var newOrderData = "";
var newOrderData = "";
function buildLPtree(in_elem, in_parent_id) {
var item_tag = in_elem.get(0).tagName;
var item_id = in_elem.attr("id");
@ -71,7 +71,7 @@ $htmlHeadXtra[] = '
});
}
// same than buildLPtree with some text display for debug in string lptree_debug
// return the interge part of an UL id
// (0 for lp_item_list)
function get_UL_integer_id(in_ul_id) {
in_parent_integer_id = in_ul_id;
@ -682,7 +682,8 @@ switch ($action) {
}
break;
case 'auto_launch':
if (api_get_course_setting('enable_lp_auto_launch') == 1) { //Redirect to a specific LP
// Redirect to a specific LP
if (api_get_course_setting('enable_lp_auto_launch') == 1) {
if (!$is_allowed_to_edit) {
api_not_allowed(true);
}
@ -1136,7 +1137,7 @@ switch ($action) {
exit;
}
break;
case 'add_sub_item': // Add an item inside a dir/chapter.
case 'add_sub_item':
// Add an item inside a dir/chapter.
// @todo check if this is @deprecated
if (!$is_allowed_to_edit) {

@ -607,7 +607,7 @@ $template->assign(
)
);
$frameReady = Display::getFrameReadyBlock('top.content_name');
$frameReady = Display::getFrameReadyBlock('#content_id, #content_id_blank');
$template->assign('frame_ready', $frameReady);
$template->displayTemplate('@ChamiloTheme/LearnPath/view.html.twig');

@ -210,8 +210,8 @@ if (olms.score == 0 && olms.lms_item_type == 'sco' && olms.lesson_status == 'not
}
olms.asset_timer = 0;
olms.userfname = '<?php echo str_replace("'", "\\'", $user['firstname']); ?>';
olms.userlname = '<?php echo str_replace("'", "\\'", $user['lastname']); ?>';
olms.userfname = '<?php echo addslashes(trim($user['firstname'])); ?>';
olms.userlname = '<?php echo addslashes(trim($user['lastname'])); ?>';
olms.execute_stats = false;
var courseUrl = '?cidReq='+olms.lms_course_code+'&id_session='+olms.lms_session_id;
@ -238,7 +238,6 @@ $(function() {
olms.info_lms_item[0] = '<?php echo $oItem->get_id(); ?>';
olms.info_lms_item[1] = '<?php echo $oItem->get_id(); ?>';
//$("#content_id").load(function() {
$("#content_id").on('load', function() {
logit_lms('#content_id load event starts');
olms.info_lms_item[0] = olms.info_lms_item[1];
@ -476,7 +475,7 @@ function LMSGetValue(param) {
} else if(param == 'cmi.core.student_name'){
// ---- cmi.core.student_name
<?php
$who = addslashes($user['lastname']).', '.addslashes($user['firstname']);
$who = addslashes(trim($user['lastname']).', '.trim($user['firstname']));
echo "result='$who';";
?>
} else if(param == 'cmi.core.lesson_location'){
@ -1446,12 +1445,18 @@ function reinit_updatable_vars_list() {
*/
function switch_item(current_item, next_item)
{
logit_lms('switch_item() called with params '+olms.lms_item_id+' and '+next_item+'',2);
if (olms.lms_initialized == 0) {
// Fix error when flash is not loaded and SCO is not started BT#14944
olms.G_LastError = G_NotInitialized;
olms.G_LastError = G_NotInitialized;
olms.G_LastErrorMessage = G_NotInitializedMessage;
logit_scorm('Error '+ G_NotInitialized + G_NotInitializedMessage, 0);
window.location.reload(false);
//window.location.reload(false);
var url = window.location.href + '&item_id=' + parseInt(next_item);
window.location.replace(url);
return false;
}
@ -1469,8 +1474,6 @@ function switch_item(current_item, next_item)
olms.statusSignalReceived = 1;
}
logit_lms('switch_item() called with params '+olms.lms_item_id+' and '+next_item+'',2);
/*
There are four "cases" for switching items:
(1) asset switching to asset

@ -56,7 +56,7 @@ $logInfo = [
];
Event::registerLog($logInfo);
// MAIN CONTENT
// LEFT COLUMN
if (api_get_setting('allow_social_tool') === 'true') {
// Block Social Menu
$social_menu_block = SocialManager::show_social_menu($show_menu);

@ -34,7 +34,7 @@ $columns = [
get_lang('Email'),
get_lang('ManHours'),
get_lang('CertificateGenerated'),
get_lang('Approved'),
get_lang('LearnpathsDone'),
get_lang('CourseAdvance'),
];

@ -96,7 +96,7 @@ if ($export) {
$csv_content = [];
$from_myspace = false;
$this_section = SECTION_COURSES;
if (isset($_GET['from']) && $_GET['from'] == 'myspace') {
if (isset($_GET['from']) && $_GET['from'] === 'myspace') {
$from_myspace = true;
$this_section = SECTION_TRACKING;
}
@ -163,7 +163,7 @@ if (!empty($details)) {
} else {
if ($origin === 'resume_session') {
$interbreadcrumb[] = [
'url' => "../session/session_list.php",
'url' => '../session/session_list.php',
'name' => get_lang('SessionList'),
];
if (!empty($sessionId)) {
@ -335,13 +335,6 @@ switch ($action) {
$totalScore += $bestScore;
}
/*$score = Tracking::get_avg_student_score(
$user_info['user_id'],
$courseCodeItem,
[],
$sId
);*/
$progress = empty($progress) ? '0%' : $progress.'%';
$score = empty($bestScore) ? '0%' : $bestScore.'%';
@ -903,9 +896,7 @@ $timezone_user = UserManager::get_extra_user_data_by_field(
'timezone'
);
$use_users_timezone = api_get_setting('use_users_timezone', 'timezones');
if ($timezone_user['timezone'] != null &&
$use_users_timezone == 'true'
) {
if ($timezone_user['timezone'] != null && $use_users_timezone === 'true') {
$timezone = $timezone_user['timezone'];
}
if ($timezone !== null) {
@ -941,28 +932,37 @@ if (api_get_setting('allow_terms_conditions') === 'true') {
list($legalId, $legalLanguageId, $legalTime) = explode(':', $value['value']);
$icon = Display::return_icon('accept.png');
$btn = Display::url(
get_lang('DeleteLegal'),
api_get_self().'?action=delete_legal&student='.$student_id.'&course='.$course_code,
['class' => 'btn btn-danger']
);
get_lang('DeleteLegal'),
api_get_self().'?action=delete_legal&student='.$student_id.'&course='.$course_code,
['class' => 'btn btn-danger']
);
$timeLegalAccept = api_get_local_time($legalTime);
} else {
$btn = Display::url(
get_lang('SendLegal'),
api_get_self().'?action=send_legal&student='.$student_id.'&course='.$course_code,
['class' => 'btn btn-primary']
);
get_lang('SendLegal'),
api_get_self().'?action=send_legal&student='.$student_id.'&course='.$course_code,
['class' => 'btn btn-primary']
);
$timeLegalAccept = get_lang('NotRegistered');
}
}
$userInfo['legal'] = [
'icon' => $icon,
'datetime' => $timeLegalAccept,
'url_send' => $btn,
'icon' => $icon,
'datetime' => $timeLegalAccept,
'url_send' => $btn,
];
}
$details = true;
$tpl = new Template(
'',
false,
false,
false,
false,
false,
false
);
if (!empty($courseInfo)) {
$nb_assignments = Tracking::count_student_assignments($student_id, $course_code, $sessionId);
@ -971,6 +971,7 @@ if (!empty($courseInfo)) {
$chat_last_connection = Tracking::chat_last_connection($student_id, $courseInfo['real_id'], $sessionId);
$documents = Tracking::count_student_downloaded_documents($student_id, $courseInfo['real_id'], $sessionId);
$uploaded_documents = Tracking::count_student_uploaded_documents($student_id, $course_code, $sessionId);
$tpl->assign('title', $courseInfo['title']);
$userInfo['tools'] = [
'tasks' => $nb_assignments,
@ -984,13 +985,6 @@ if (!empty($courseInfo)) {
$details = false;
}
$tpl = new Template('',
false,
false,
false,
false,
false,
false);
$tpl->assign('user', $userInfo);
$tpl->assign('details', $details);
$templateName = $tpl->get_template('my_space/user_details.tpl');
@ -1015,38 +1009,26 @@ if ($allowAll) {
$sessionId
);
}
echo '<br><br>';
?>
<div class="row">
<div class="col-sm-5">
<?php if (!empty($userGroups)) {
?>
<table class="table table-striped table-hover">
<thead>
<tr>
<th><?php echo get_lang('Classes'); ?></th>
echo '<br /><br />';
echo '<div class="row">
<div class="col-sm-5">';
if (!empty($userGroups)) {
echo '<table class="table table-striped table-hover">
<thead>
<tr>
<th>';
echo get_lang('Classes');
echo '</th>
</tr>
</thead>
<tbody>
<?php foreach ($userGroups as $class) {
?>
<tr>
<td><?php echo $class; ?></td>
</tr>
<?php
} ?>
</tbody>
</table>
<?php
} ?>
</div>
</div>
<?php
<tbody>';
foreach ($userGroups as $class) {
echo '<tr><td>'.$class.'</td></tr>';
}
echo '</tbody></table>';
}
echo '</div></div>';
$exportCourseList = [];
$lpIdList = [];
@ -1369,8 +1351,8 @@ if (empty($details)) {
];
$timeCourse = null;
if (Tracking::minimunTimeAvailable($session_id, $courseInfo['real_id'])) {
$timeCourse = Tracking::getCalculateTime($student_id, $courseInfo['real_id'], $session_id);
if (Tracking::minimunTimeAvailable($sessionId, $courseInfo['real_id'])) {
$timeCourse = Tracking::getCalculateTime($student_id, $courseInfo['real_id'], $sessionId);
}
if ($user_info['status'] != INVITEE) {
@ -1417,7 +1399,7 @@ if (empty($details)) {
/** @var CLpCategory $item */
foreach ($categories as $item) {
$categoryId = $item->getId();
if (!learnpath::categoryIsVisibleForStudent($item, $userEntity)) {
if (!learnpath::categoryIsVisibleForStudent($item, $userEntity, $courseInfo['real_id'], $sessionId)) {
continue;
}
@ -1538,9 +1520,9 @@ if (empty($details)) {
}
if ($i % 2 == 0) {
$css_class = "row_even";
$css_class = 'row_even';
} else {
$css_class = "row_odd";
$css_class = 'row_odd';
}
$i++;
@ -1745,14 +1727,14 @@ if (empty($details)) {
echo '<td>';
$sql = 'SELECT exe_id FROM '.$tbl_stats_exercices.'
WHERE
exe_exo_id = "'.$exercise_id.'" AND
exe_user_id ="'.$student_id.'" AND
c_id = '.$courseInfo['real_id'].' AND
session_id = "'.$sessionId.'" AND
status = ""
ORDER BY exe_date DESC
LIMIT 1';
WHERE
exe_exo_id = "'.$exercise_id.'" AND
exe_user_id ="'.$student_id.'" AND
c_id = '.$courseInfo['real_id'].' AND
session_id = "'.$sessionId.'" AND
status = ""
ORDER BY exe_date DESC
LIMIT 1';
$result_last_attempt = Database::query($sql);
if (Database::num_rows($result_last_attempt) > 0) {
$id_last_attempt = Database::result($result_last_attempt, 0, 0);

@ -254,12 +254,7 @@ if (api_is_drh()) {
),
];
$nb_menu_items = count($menu_items);
if ($nb_menu_items > 1) {
foreach ($menu_items as $key => $item) {
$actionsLeft .= $item;
}
}
$actionsLeft .= implode('', $menu_items);
} elseif (api_is_student_boss()) {
$actionsLeft .= Display::url(
Display::return_icon('statistics.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM),
@ -269,7 +264,7 @@ if (api_is_drh()) {
Display::return_icon('user_na.png', get_lang('Students'), [], ICON_SIZE_MEDIUM),
'#'
);
$actions .= Display::url(
$actionsLeft .= Display::url(
Display::return_icon('skills.png', get_lang('Skills'), [], ICON_SIZE_MEDIUM),
$webCodePath.'social/my_skills_report.php'
);

@ -0,0 +1,49 @@
<?php
/* For licensing terms, see /license.txt */
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';
$this_section = SECTION_TRACKING;
$csv_content = [];
$nameTools = get_lang('MySpace');
$allowToTrack = api_is_platform_admin(true, true);
if (!$allowToTrack) {
api_not_allowed(true);
}
$form = new FormValidator('survey');
$form->addSelectAjax(
'user_id',
get_lang('User'),
[],
[
'url' => api_get_path(WEB_AJAX_PATH).'user_manager.ajax.php?a=get_user_like',
]
);
$form->addButtonSearch();
$userInfo = [];
if ($form->validate()) {
$userId = $form->exportValue('user_id');
$userInfo = api_get_user_info($userId);
}
Display::display_header($nameTools);
echo '<div class="actions">';
echo MySpace::getTopMenu();
echo '</div>';
echo MySpace::getAdminActions();
$form->display();
if (!empty($userInfo)) {
echo Display::page_subheader($userInfo['complete_name']);
echo SurveyManager::surveyReport($userInfo);
echo SurveyManager::surveyReport($userInfo, 1);
}
Display::display_footer();

@ -120,6 +120,6 @@ if (isset($_GET['term'])) {
if (!$q) {
return;
}
//echo $q . "| value\n";
get_suggestions_from_search_engine($q);
}

@ -1,6 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\ExtraField;
use Chamilo\CoreBundle\Entity\SequenceResource;
use Chamilo\CoreBundle\Entity\Session;

@ -48,7 +48,7 @@ $interbreadcrumb[] = ['url' => 'session_list.php', 'name' => get_lang('SessionLi
if (isset($_GET['search']) && $_GET['search'] === 'advanced') {
$interbreadcrumb[] = ['url' => 'session_category_list.php', 'name' => get_lang('ListSessionCategory')];
$tool_name = get_lang('SearchASession');
Display :: display_header($tool_name);
Display::display_header($tool_name);
$form = new FormValidator('advanced_search', 'get');
$form->addElement('header', '', $tool_name);
$active_group = [];

@ -311,7 +311,7 @@ $orderUrl = api_get_path(WEB_AJAX_PATH).'session.ajax.php?a=order';
});
orderList = JSON.stringify(orderList);
$.get("<?php echo $orderUrl; ?>", "order="+orderList, function (result) {
console.log(result);
//console.log(result);
});
}
};
@ -335,7 +335,7 @@ $orderUrl = api_get_path(WEB_AJAX_PATH).'session.ajax.php?a=order';
}
?>
//Select first elements by default
// Fixes search table.
var searchDialogAll = $("#fbox_"+grid[0].id);
searchDialogAll.addClass("table");
var searchDialog = $("#searchmodfbox_"+grid[0].id);

@ -91,7 +91,10 @@ if ($loadFromDatabase) {
}
foreach ($data as &$result) {
$result['complete_name'] = addslashes(api_get_person_name($result['firstname'], $result['lastname']));
// Clean process is made in twig with escape('js')
$result['complete_name'] = $result['firstname'].' '.$result['lastname'];
$result['lastname'] = '';
$result['firstname'] = '';
$parts = explode('::', $result['ville']);
if (isset($parts[1]) && !empty($parts[1])) {
$parts2 = explode(',', $parts[1]);

@ -47,15 +47,26 @@ if ($isStudent) {
$tpl->assign('skill_table', $result['table']);
$tplPath = 'skill/student_report.tpl';
} elseif ($isStudentBoss) {
$selectedStudent = isset($_REQUEST['student']) ? (int) $_REQUEST['student'] : 0;
$tableRows = [];
$followedStudents = UserManager::getUsersFollowedByStudentBoss($userId);
$frmStudents = new FormValidator('students', 'get');
$slcStudent = $frmStudents->addSelect(
'student',
get_lang('Student'),
['0' => get_lang('Select')]
);
$frmStudents->addButtonSearch(get_lang('Search'));
foreach ($followedStudents as &$student) {
$student['completeName'] = api_get_person_name($student['firstname'], $student['lastname']);
$slcStudent->addOption($student['completeName'], $student['user_id']);
}
if ($selectedStudent > 0) {
if ($frmStudents->validate()) {
$selectedStudent = (int) $frmStudents->exportValue('student');
$sql = "SELECT s.name, sru.acquired_skill_at, c.title, c.directory
FROM $skillTable s
INNER JOIN $skillRelUserTable sru
@ -109,8 +120,7 @@ if ($isStudent) {
}
$tplPath = 'skill/student_boss_report.tpl';
$tpl->assign('followed_students', $followedStudents);
$tpl->assign('selected_student', $selectedStudent);
$tpl->assign('form', $frmStudents->returnForm());
} elseif ($isDRH) {
$selectedCourse = isset($_REQUEST['course']) ? intval($_REQUEST['course']) : null;
$selectedSkill = isset($_REQUEST['skill']) ? intval($_REQUEST['skill']) : 0;

@ -1,6 +1,8 @@
<?php
/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Entity\Repository\LegalRepository;
/**
* @package chamilo.messages
*/
@ -268,7 +270,13 @@ foreach ($properties as $key => $value) {
$personalDataContent .= '<li>'.get_lang('NoData').'</li>';
} else {
foreach ($value as $subValue) {
$personalDataContent .= '<li>'.$subValue->variable.': '.Security::remove_XSS($subValue->value).'</li>';
if (is_array($subValue->value)) {
// tags fields can be stored as arrays
$val = json_encode(Security::remove_XSS($subValue->value));
} else {
$val = Security::remove_XSS($subValue->value);
}
$personalDataContent .= '<li>'.$subValue->variable.': '.$val.'</li>';
}
}
$personalDataContent .= '</ul>';

@ -179,43 +179,7 @@ $posts = SocialManager::getWallMessagesByUser($friendId);
$socialAutoExtendLink = SocialManager::getAutoExtendLink($user_id, $countPost);
// Added a Jquery Function to return the Preview of OpenGraph URL Content
$htmlHeadXtra[] = '<script>
$(function() {
var getUrl = $("[name=\'social_wall_new_msg_main\']");
var matchUrl = /https?:\/\/w{0,3}\w*?\.(\w*?\.)?\w{2,3}\S*|www\.(\w*?\.)?\w*?\.\w{2,3}\S*|(\w*?\.)?\w*?\.\w{2,3}[\/\?]\S*/ ;
getUrl.on("paste", function(e) {
$.ajax({
contentType: "application/x-www-form-urlencoded",
beforeSend: function() {
$("[name=\'wall_post_button\']").prop( "disabled", true );
$(".panel-preview").hide();
$(".spinner").html("'.
'<div class=\'text-center\'>'.
'<em class=\'fa fa-spinner fa-pulse fa-1x\'></em>'.
'<p>'.get_lang('Loading').' '.get_lang('Preview').'</p>'.
'</div>'.
'");
},
type: "POST",
url: "'.api_get_path(WEB_AJAX_PATH).'social.ajax.php?a=read_url_with_open_graph",
data: "social_wall_new_msg_main=" + e.originalEvent.clipboardData.getData("text"),
success: function(response) {
$("[name=\'wall_post_button\']").prop( "disabled", false );
if (!response == false) {
$(".spinner").html("");
$(".panel-preview").show();
$(".url_preview").html(response);
$("[name=\'url_content\']").val(response);
$(".url_preview img").addClass("img-fluid");
} else {
$(".spinner").html("");
}
}
});
});
});
</script>';
$htmlHeadXtra[] = SocialManager::getScriptToGetOpenGraph();
$socialRightInformation = '';
$social_right_content = '';

@ -99,8 +99,20 @@ if ($invitationcode == 'auto' && isset($_GET['scode'])) {
if ($isAnonymous) {
$autoInvitationcode = 'auto-ANONY_'.md5(time())."-$surveyCode";
} else {
// New invitation code from userid
$autoInvitationcode = "auto-$userid-$surveyCode";
$invitations = SurveyManager::getUserInvitationsForSurveyInCourse(
$userid,
$surveyCode,
$courseInfo['real_id'],
$sessionId
);
$lastInvitation = current($invitations);
if (!$lastInvitation) {
// New invitation code from userid
$autoInvitationcode = "auto-$userid-$surveyCode";
} else {
$autoInvitationcode = $lastInvitation->getInvitationCode();
}
}
// The survey code must exist in this course, or the URL is invalid

@ -2359,4 +2359,107 @@ class SurveyManager
);
}
}
/**
* @param int $userId
* @param string $surveyCode
* @param int $courseId
* @param int $sessionId
* @param int $groupId
*
* @return array|CSurveyInvitation[]
*/
public static function getUserInvitationsForSurveyInCourse(
$userId,
$surveyCode,
$courseId,
$sessionId = 0,
$groupId = 0
) {
$invitationRepo = Database::getManager()->getRepository('ChamiloCourseBundle:CSurveyInvitation');
$invitations = $invitationRepo->findBy(
[
'user' => $userId,
'cId' => $courseId,
'sessionId' => $sessionId,
'groupId' => $groupId,
'surveyCode' => $surveyCode,
],
['invitationDate' => 'DESC']
);
return $invitations;
}
/**
* @param array $userInfo
* @param int $answered
*
* @return string
*/
public static function surveyReport($userInfo, $answered = 0)
{
$userId = isset($userInfo['user_id']) ? (int) $userInfo['user_id'] : 0;
$answered = (int) $answered;
if (empty($userId)) {
return '';
}
$em = Database::getManager();
$repo = $em->getRepository('ChamiloCourseBundle:CSurveyInvitation');
$repoSurvey = $em->getRepository('ChamiloCourseBundle:CSurvey');
$invitations = $repo->findBy(['user' => $userId, 'answered' => $answered]);
$mainUrl = api_get_path(WEB_CODE_PATH).'survey/survey.php?';
$content = '';
if (empty($answered)) {
$content .= Display::page_subheader(get_lang('Answered'));
} else {
$content .= Display::page_subheader(get_lang('Unanswered'));
}
if (!empty($invitations)) {
$table = new HTML_Table(['class' => 'table']);
$table->setHeaderContents(0, 0, get_lang('SurveyName'));
$table->setHeaderContents(0, 1, get_lang('Course'));
// Not answered
/** @var CSurveyInvitation $invitation */
$row = 1;
foreach ($invitations as $invitation) {
$courseId = $invitation->getCId();
$courseInfo = api_get_course_info_by_id($courseId);
$sessionId = $invitation->getSessionId();
$surveyCode = $invitation->getSurveyCode();
$survey = $repoSurvey->findOneBy([
'cId' => $courseId,
'sessionId' => $sessionId,
'code' => $surveyCode
]);
if (empty($survey)) {
continue;
}
$url = $mainUrl.'survey_id='.$survey->getSurveyId().'&cidReq='.$courseInfo['code'].'&id_session='.$sessionId;
$title = $survey->getTitle();
$title = Display::url($title, $url);
if (!empty($sessionId)) {
$sessionInfo = api_get_session_info($sessionId);
$courseInfo['name'] .= ' ('.$sessionInfo['name'].')';
}
$table->setCellContents($row, 0, $title);
$table->setCellContents($row, 1, $courseInfo['name']);
$row++;
}
$content .= $table->toHtml();
} else {
$content .= Display::return_message(get_lang('NoData'));
}
return $content;
}
}

@ -2069,9 +2069,9 @@ class SurveyUtil
$table_survey_answer = Database::get_course_table(TABLE_SURVEY_ANSWER);
$sql = "SELECT * FROM $table_survey_answer
WHERE
c_id = $course_id AND
survey_id='".intval($survey_id)."' AND
WHERE
c_id = $course_id AND
survey_id='".intval($survey_id)."' AND
question_id='".intval($question_id)."'
ORDER BY USER ASC";
$result = Database::query($sql);
@ -2180,8 +2180,8 @@ class SurveyUtil
* @param int $reminder
* @param bool $sendmail
* @param int $remindUnAnswered
*
* @return bool $isAdditionalEmail
* @param bool $isAdditionalEmail
* @param bool $hideLink
*
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University
* @author Julio Montoya - Adding auto-generated link support
@ -2195,7 +2195,8 @@ class SurveyUtil
$reminder = 0,
$sendmail = false,
$remindUnAnswered = 0,
$isAdditionalEmail = false
$isAdditionalEmail = false,
$hideLink = false
) {
if (!is_array($users_array)) {
// Should not happen
@ -2210,7 +2211,8 @@ class SurveyUtil
// Remind unanswered is a special version of remind all reminder
$exclude_users = [];
if ($remindUnAnswered == 1) { // Remind only unanswered users
if ($remindUnAnswered == 1) {
// Remind only unanswered users
$reminder = 1;
$exclude_users = SurveyManager::get_people_who_filled_survey($_GET['survey_id']);
}
@ -2300,7 +2302,8 @@ class SurveyUtil
$value,
$invitation_code,
$invitation_title,
$invitation_text
$invitation_text,
$hideLink
);
$counter++;
}
@ -2374,7 +2377,8 @@ class SurveyUtil
$invitedUser,
$invitation_code,
$invitation_title,
$invitation_text
$invitation_text,
$hideLink = false
) {
$_user = api_get_user_info();
$_course = api_get_course_info();
@ -2382,14 +2386,17 @@ class SurveyUtil
// Replacing the **link** part with a valid link for the user
$link = self::generateFillSurveyLink($invitation_code, $_course, $sessionId);
if ($hideLink) {
$full_invitation_text = str_replace('**link**', '', $invitation_text);
} else {
$text_link = '<a href="'.$link.'">'.get_lang('ClickHereToAnswerTheSurvey')."</a><br />\r\n<br />\r\n"
.get_lang('OrCopyPasteTheFollowingUrl')." <br /> \r\n <br /> \r\n ".$link;
$text_link = '<a href="'.$link.'">'.get_lang('ClickHereToAnswerTheSurvey')."</a><br />\r\n<br />\r\n"
.get_lang('OrCopyPasteTheFollowingUrl')." <br /> \r\n <br /> \r\n ".$link;
$replace_count = 0;
$full_invitation_text = api_str_ireplace('**link**', $text_link, $invitation_text, $replace_count);
if ($replace_count < 1) {
$full_invitation_text = $full_invitation_text."<br />\r\n<br />\r\n".$text_link;
$replace_count = 0;
$full_invitation_text = api_str_ireplace('**link**', $text_link, $invitation_text, $replace_count);
if ($replace_count < 1) {
$full_invitation_text = $full_invitation_text."<br />\r\n<br />\r\n".$text_link;
}
}
// Sending the mail
@ -3370,7 +3377,13 @@ class SurveyUtil
$now = api_get_utc_datetime(null, false, true);
$filterDate = $allowSurveyAvailabilityDatetime ? $now->format('Y-m-d H:i') : $now->format('Y-m-d');
$sql = "SELECT *
$sql = "SELECT survey_invitation.answered,
survey_invitation.invitation_code,
survey_invitation.session_id,
survey.title,
survey.visible_results,
survey.survey_id,
survey.anonymous
FROM $table_survey survey
INNER JOIN
$table_survey_invitation survey_invitation
@ -3391,7 +3404,13 @@ class SurveyUtil
$efv = new ExtraFieldValue('survey');
$surveyIds = [];
while ($row = Database::fetch_array($result, 'ASSOC')) {
if (in_array($row['survey_id'], $surveyIds)) {
continue;
}
echo '<tr>';
if ($row['answered'] == 0) {
echo '<td>';
@ -3442,6 +3461,8 @@ class SurveyUtil
echo '<td class="text-center">'.($efvMandatory['value'] ? get_lang('Yes') : get_lang('No')).'</td>';
}
echo '</tr>';
$surveyIds[] = $row['survey_id'];
}
echo '</tbody>';
echo '</table>';

@ -157,14 +157,10 @@ if ($survey_data['anonymous'] != 1 || api_get_configuration_value('survey_anonym
}
// Allow resending to all selected users
$form->addElement('checkbox', 'resend_to_all', '', get_lang('ReminderResendToAllUsers'));
$form->addElement('checkbox', 'hide_link', '', get_lang('HideSurveyInvitationLink'));
// Submit button
$form->addButtonSave(get_lang('PublishSurvey'));
// The rules (required fields)
/*if ($survey_data['send_mail'] == 0) {
$form->addRule('mail_title', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('mail_text', get_lang('ThisFieldIsRequired'), 'required');
}*/
$portal_url = api_get_path(WEB_PATH);
if (api_is_multiple_url_enabled()) {
$access_url_id = api_get_current_access_url_id();
@ -175,7 +171,12 @@ if (api_is_multiple_url_enabled()) {
}
// Show the URL that can be used by users to fill a survey without invitation
$auto_survey_link = SurveyUtil::generateFillSurveyLink('auto', $_course, $survey_data['session_id'], $survey_data['survey_code']);
$auto_survey_link = SurveyUtil::generateFillSurveyLink(
'auto',
$_course,
$survey_data['session_id'],
$survey_data['survey_code']
);
$form->addElement('label', null, get_lang('AutoInviteLink'));
$form->addElement('label', null, $auto_survey_link);
@ -187,6 +188,7 @@ if ($form->validate()) {
$sendMail = isset($values['send_mail']) ? $values['send_mail'] : '';
$remindUnAnswered = isset($values['remindUnAnswered']) ? $values['remindUnAnswered'] : '';
$users = isset($values['users']) ? $values['users'] : [];
$hideLink = isset($values['hide_link']) && $values['hide_link'] ? true : false;
if ($sendMail) {
if (empty($values['mail_title']) || empty($values['mail_text'])) {
@ -223,7 +225,9 @@ if ($form->validate()) {
$values['mail_text'],
$resendAll,
$sendMail,
$remindUnAnswered
$remindUnAnswered,
false,
$hideLink
);
// Saving the invitations for the additional users

@ -3758,7 +3758,7 @@ function sendAlertToUsers($workId, $courseInfo, $sessionId)
if ($send == SEND_EMAIL_EVERYONE || $send == SEND_EMAIL_TEACHERS) {
// Lets predefine some variables. Be sure to change the from address!
if (empty($sessionId)) {
//Teachers
// Teachers
$userList = CourseManager::get_user_list_from_course_code(
api_get_course_id(),
null,

@ -237,9 +237,9 @@ class Basic extends Toolbar
['Link', 'Image', 'Video', 'Oembed', 'Flash', 'Youtube', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
['BulletedList', 'NumberedList', 'HorizontalRule'],
['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
['Styles', 'Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor', 'Source'],
api_get_setting('enabled_wiris') === 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : [''],
['Toolbarswitch'],
['Styles', 'Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor'],
api_get_setting('enabled_wiris') == 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : [''],
['Toolbarswitch', 'Source'],
];
}
@ -274,11 +274,11 @@ class Basic extends Toolbar
['BulletedList', 'NumberedList', 'HorizontalRule', '-', 'Outdent', 'Indent', 'Blockquote'],
['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
['Bold', 'Italic', 'Underline', 'Strike', '-', 'Subscript', 'Superscript', '-', 'TextColor', 'BGColor'],
[api_get_setting('allow_spellcheck') === 'true' ? 'Scayt' : ''],
[api_get_setting('allow_spellcheck') == 'true' ? 'Scayt' : ''],
['Styles', 'Format', 'Font', 'FontSize'],
['PageBreak', 'ShowBlocks', 'Source'],
api_get_setting('enabled_wiris') === 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : [''],
['Toolbarswitch'],
['PageBreak', 'ShowBlocks'],
api_get_setting('enabled_wiris') == 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : [''],
['Toolbarswitch', 'Source'],
];
}
}

@ -10,6 +10,8 @@ namespace Chamilo\CoreBundle\Component\Editor\CkEditor\Toolbar;
*/
class Documents extends Basic
{
public $plugins = [];
/**
* Get the toolbar config.
*
@ -23,6 +25,7 @@ class Documents extends Basic
$config['toolbar'] = $this->getNormalToolbar();
} else {
$config['toolbar_minToolbar'] = $this->getMinimizedToolbar();
$config['toolbar_maxToolbar'] = $this->getMaximizedToolbar();
}
$config['extraPlugins'] = $this->getPluginsToString();
@ -88,6 +91,55 @@ class Documents extends Basic
];
}
/**
* @return array
*/
protected function getMaximizedToolbar()
{
return [
$this->getNewPageBlock(),
['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', 'inserthtml'],
['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'],
['Link', 'Unlink', 'Anchor', 'Glossary'],
[
'Image',
'Mapping',
'Video',
'Oembed',
'Flash',
'Youtube',
'Audio',
'leaflet',
'Smiley',
'SpecialChar',
'Asciimath',
'Asciisvg',
],
'/',
['Table', '-', 'CreateDiv'],
['BulletedList', 'NumberedList', 'HorizontalRule', '-', 'Outdent', 'Indent', 'Blockquote'],
['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
[
'Bold',
'Italic',
'Underline',
'Strike',
'-',
'Subscript',
'Superscript',
'-',
'TextColor',
'BGColor',
api_get_configuration_value('translate_html') ? 'Language' : '',
],
[api_get_setting('allow_spellcheck') == 'true' ? 'Scayt' : ''],
['Styles', 'Format', 'Font', 'FontSize'],
['PageBreak', 'ShowBlocks'],
api_get_setting('enabled_wiris') == 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : [''],
['Toolbarswitch', 'Source'],
];
}
/**
* Get the toolbar configuration when CKEditor is minimized.
*
@ -126,8 +178,7 @@ class Documents extends Basic
'ShowBlocks',
],
api_get_setting('enabled_wiris') === 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : [''],
['Toolbarswitch'],
['Source'],
['Toolbarswitch', 'Source'],
];
}
}

@ -25,6 +25,7 @@ class IntroductionSection extends Basic
$config['toolbar'] = $this->getNormalToolbar();
} else {
$config['toolbar_minToolbar'] = $this->getMinimizedToolbar();
$config['toolbar_maxToolbar'] = $this->getMaximizedToolbar();
}
$config['extraPlugins'] = $this->getPluginsToString();
@ -113,7 +114,8 @@ class IntroductionSection extends Basic
],
['BulletedList', 'NumberedList', 'HorizontalRule'],
['JustifyLeft', 'JustifyCenter', 'JustifyBlock'],
['Styles',
[
'Styles',
'Format',
'Font',
'FontSize',
@ -122,14 +124,62 @@ class IntroductionSection extends Basic
'Underline',
'TextColor',
'BGColor',
api_get_configuration_value('translate_html') ? 'Language' : '',
],
[
'Language',
'ShowBlocks',
'Source',
],
api_get_setting('enabled_wiris') === 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : [''],
['Toolbarswitch'],
['Toolbarswitch', 'Source'],
];
}
/**
* @return array
*/
protected function getMaximizedToolbar()
{
return [
$this->getNewPageBlock(),
['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', 'inserthtml'],
['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'],
['Link', 'Unlink', 'Anchor', 'Glossary'],
[
'Image',
'Mapping',
'Video',
'Oembed',
'Flash',
'Youtube',
'Audio',
'leaflet',
'Smiley',
'SpecialChar',
'Asciimath',
'Asciisvg',
],
'/',
['Table', '-', 'CreateDiv'],
['BulletedList', 'NumberedList', 'HorizontalRule', '-', 'Outdent', 'Indent', 'Blockquote'],
['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
[
'Bold',
'Italic',
'Underline',
'Strike',
'-',
'Subscript',
'Superscript',
'-',
'TextColor',
'BGColor',
api_get_configuration_value('translate_html') ? 'Language' : '',
],
[api_get_setting('allow_spellcheck') == 'true' ? 'Scayt' : ''],
['Styles', 'Format', 'Font', 'FontSize'],
['PageBreak', 'ShowBlocks'],
api_get_setting('enabled_wiris') == 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : [''],
['Toolbarswitch', 'Source'],
];
}
}

@ -40,7 +40,6 @@ class TestQuestionDescription extends Basic
$config['toolbar'] = $this->getNormalToolbar();
} else {
$config['toolbar_minToolbar'] = $this->getMinimizedToolbar();
$config['toolbar_maxToolbar'] = $this->getMaximizedToolbar();
}
@ -53,7 +52,7 @@ class TestQuestionDescription extends Basic
public function getConditionalPlugins()
{
$plugins = [];
if (api_get_setting('show_glossary_in_documents') == 'ismanual') {
if (api_get_setting('show_glossary_in_documents') === 'ismanual') {
$plugins[] = 'glossary';
}
@ -90,11 +89,23 @@ class TestQuestionDescription extends Basic
['Table', '-', 'CreateDiv'],
['BulletedList', 'NumberedList', 'HorizontalRule', '-', 'Outdent', 'Indent', 'Blockquote'],
['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
['Bold', 'Italic', 'Underline', 'Strike', '-', 'Subscript', 'Superscript', '-', 'TextColor', 'BGColor'],
[
'Bold',
'Italic',
'Underline',
'Strike',
'-',
'Subscript',
'Superscript',
'-',
'TextColor',
'BGColor',
api_get_configuration_value('translate_html') ? 'Language' : '',
],
[api_get_setting('allow_spellcheck') == 'true' ? 'Scayt' : ''],
['Styles', 'Format', 'Font', 'FontSize'],
['PageBreak', 'ShowBlocks', 'Source'],
['Toolbarswitch'],
['PageBreak', 'ShowBlocks'],
['Toolbarswitch', 'Source'],
];
}
@ -110,11 +121,23 @@ class TestQuestionDescription extends Basic
['Link', 'Unlink'],
['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'Audio'],
['Table', 'SpecialChar'],
['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'TextColor', 'BGColor', '-', 'Source'],
[
'NumberedList',
'BulletedList',
'-',
'Outdent',
'Indent',
'-',
'TextColor',
'BGColor',
'-',
api_get_configuration_value('translate_html') ? 'Language' : '',
],
'/',
['Styles', 'Format', 'Font', 'FontSize'],
['Bold', 'Italic', 'Underline'],
['JustifyLeft', 'JustifyCenter', 'JustifyRight'],
['Source'],
];
}
@ -131,8 +154,19 @@ class TestQuestionDescription extends Basic
['Link', 'Unlink', 'Image', 'Video', 'Flash', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
['BulletedList', 'NumberedList', 'HorizontalRule'],
['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
['Styles', 'Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor'],
['Source', 'Toolbarswitch'],
[
'Styles',
'Format',
'Font',
'FontSize',
'Bold',
'Italic',
'Underline',
'TextColor',
'BGColor',
api_get_configuration_value('translate_html') ? 'Language' : '',
],
['Toolbarswitch', 'Source'],
];
}
}

@ -364,6 +364,7 @@ class ChamiloApi
public static function getQuizMarkersRollsJS()
{
$webCodePath = api_get_path(WEB_CODE_PATH);
$cidReq = api_get_cidreq(true, true, 'embeddable');
$colorPalette = self::getColorPalette(false, true);
return "
@ -380,13 +381,12 @@ class ChamiloApi
instance.options.markersRolls = {};
qMarkersRolls.forEach(function (qMarkerRoll) {
var url = '{$webCodePath}exercise/exercise_submit.php?{{ _p.web_cid_query }}&'
var url = '{$webCodePath}exercise/exercise_submit.php?$cidReq&'
+ $.param({
exerciseId: qMarkerRoll[1],
learnpath_id: 0,
learnpath_item_id: 0,
learnpath_item_view_id: 0,
origin: 'embeddable'
learnpath_item_view_id: 0
});
instance.options.markersRolls[qMarkerRoll[0]] = url;

@ -22,6 +22,10 @@ class ScriptHandler
}
$fs = new Filesystem();
$fs->mirror($appCss, $newPath, null, ['override' => true]);*/
if (function_exists('opcache_reset')) {
opcache_reset();
}
}
/**

Loading…
Cancel
Save