Scrutinizer Auto-Fixes

This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
remotes/angel/1.11.x
Scrutinizer Auto-Fixer 8 years ago
parent a98f331670
commit d91507ffeb
  1. 2
      index.php
  2. 46
      main/admin/course_add.php
  3. 2
      main/admin/event_controller.php
  4. 20
      main/admin/extra_field_workflow.php
  5. 12
      main/admin/filler.php
  6. 2
      main/admin/inactive_user_list.php
  7. 12
      main/admin/skills_gradebook.php
  8. 18
      main/admin/skills_import.php
  9. 6
      main/admin/skills_profile.php
  10. 6
      main/admin/user_import.php
  11. 12
      main/admin/usergroup_import.php
  12. 12
      main/attendance/attendance_add.php
  13. 32
      main/attendance/attendance_sheet.php
  14. 44
      main/document/edit_document.php
  15. 58
      main/dropbox/index.php
  16. 22
      main/exercise/hotspot.class.php
  17. 2
      main/exercise/question_admin.inc.php
  18. 8
      main/gradebook/gradebook_edit_link.php
  19. 10
      main/gradebook/gradebook_showlog_link.php
  20. 18
      main/gradebook/lib/fe/dataform.class.php
  21. 4
      main/gradebook/lib/fe/linkform.class.php
  22. 14
      main/gradebook/lib/gradebook_result.class.php
  23. 4
      main/inc/ajax/lp.ajax.php
  24. 2
      main/inc/lib/fileDisplay.lib.php
  25. 8
      main/inc/lib/notification.lib.php
  26. 12
      main/inc/lib/plugin.lib.php
  27. 8
      main/lp/lp_add_item.php
  28. 66
      main/lp/lp_list.php
  29. 46
      main/messages/new_message.php
  30. 8
      main/mySpace/student.php
  31. 70
      main/social/group_view.php
  32. 36
      main/upload/upload.document.php
  33. 4
      plugin/advanced_subscription/src/terms_and_conditions.php
  34. 2
      plugin/createdrupaluser/config.php
  35. 12
      plugin/pens/pens.php
  36. 2
      whoisonline.php

@ -45,7 +45,7 @@ if (isset($_GET['submitAuth']) && $_GET['submitAuth'] == 1) {
Event::addEvent(
LOG_ATTEMPTED_FORCED_LOGIN,
'tried_hacking_get',
$_SERVER['REMOTE_ADDR'].(empty($_POST['login'])?'':'/'.$_POST['login']),
$_SERVER['REMOTE_ADDR'].(empty($_POST['login']) ? '' : '/'.$_POST['login']),
null,
$i
);

@ -23,7 +23,7 @@ $sql = "SELECT user_id,lastname,firstname
WHERE status=1".$order_clause;
// Filtering teachers when creating a course.
if (api_is_multiple_url_enabled()) {
$access_url_rel_user_table= Database :: get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
$access_url_rel_user_table = Database :: get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
$sql = "SELECT u.user_id,lastname,firstname
FROM $table_user as u
INNER JOIN $access_url_rel_user_table url_rel_user
@ -92,12 +92,12 @@ $form->addElement(
);
// Course department
$form->addText('department_name', get_lang('CourseDepartment'), false, array ('size' => '60'));
$form->addText('department_name', get_lang('CourseDepartment'), false, array('size' => '60'));
$form->applyFilter('department_name', 'html_filter');
$form->applyFilter('department_name', 'trim');
// Department URL
$form->addText('department_url', get_lang('CourseDepartmentURL'), false, array ('size' => '60'));
$form->addText('department_url', get_lang('CourseDepartmentURL'), false, array('size' => '60'));
$form->applyFilter('department_url', 'html_filter');
// Course language.
@ -123,32 +123,32 @@ if (api_get_setting('teacher_can_select_course_template') === 'true') {
get_lang('PickACourseAsATemplateForThisNewCourse'),
],
null,
['url' => api_get_path(WEB_AJAX_PATH) . 'course.ajax.php?a=search_course']
['url' => api_get_path(WEB_AJAX_PATH).'course.ajax.php?a=search_course']
);
}
$form->addElement('checkbox', 'exemplary_content', '', get_lang('FillWithExemplaryContent'));
$group = array();
$group[]= $form->createElement('radio', 'visibility', get_lang('CourseAccess'), get_lang('OpenToTheWorld'), COURSE_VISIBILITY_OPEN_WORLD);
$group[]= $form->createElement('radio', 'visibility', null, get_lang('OpenToThePlatform'), COURSE_VISIBILITY_OPEN_PLATFORM);
$group[]= $form->createElement('radio', 'visibility', null, get_lang('Private'), COURSE_VISIBILITY_REGISTERED);
$group[]= $form->createElement('radio', 'visibility', null, get_lang('CourseVisibilityClosed'), COURSE_VISIBILITY_CLOSED);
$group[]= $form->createElement('radio', 'visibility', null, get_lang('CourseVisibilityHidden'), COURSE_VISIBILITY_HIDDEN);
$group[] = $form->createElement('radio', 'visibility', get_lang('CourseAccess'), get_lang('OpenToTheWorld'), COURSE_VISIBILITY_OPEN_WORLD);
$group[] = $form->createElement('radio', 'visibility', null, get_lang('OpenToThePlatform'), COURSE_VISIBILITY_OPEN_PLATFORM);
$group[] = $form->createElement('radio', 'visibility', null, get_lang('Private'), COURSE_VISIBILITY_REGISTERED);
$group[] = $form->createElement('radio', 'visibility', null, get_lang('CourseVisibilityClosed'), COURSE_VISIBILITY_CLOSED);
$group[] = $form->createElement('radio', 'visibility', null, get_lang('CourseVisibilityHidden'), COURSE_VISIBILITY_HIDDEN);
$form->addGroup($group,'', get_lang('CourseAccess'));
$form->addGroup($group, '', get_lang('CourseAccess'));
$group = array();
$group[]= $form->createElement('radio', 'subscribe', get_lang('Subscription'), get_lang('Allowed'), 1);
$group[]= $form->createElement('radio', 'subscribe', null, get_lang('Denied'), 0);
$form->addGroup($group,'', get_lang('Subscription'));
$group[] = $form->createElement('radio', 'subscribe', get_lang('Subscription'), get_lang('Allowed'), 1);
$group[] = $form->createElement('radio', 'subscribe', null, get_lang('Denied'), 0);
$form->addGroup($group, '', get_lang('Subscription'));
$group = array();
$group[]= $form->createElement('radio', 'unsubscribe', get_lang('Unsubscription'), get_lang('AllowedToUnsubscribe'), 1);
$group[]= $form->createElement('radio', 'unsubscribe', null, get_lang('NotAllowedToUnsubscribe'), 0);
$group[] = $form->createElement('radio', 'unsubscribe', get_lang('Unsubscription'), get_lang('AllowedToUnsubscribe'), 1);
$group[] = $form->createElement('radio', 'unsubscribe', null, get_lang('NotAllowedToUnsubscribe'), 0);
$form->addGroup($group, '', get_lang('Unsubscription'));
$form->addElement('text','disk_quota',array(get_lang('CourseQuota'), null, get_lang('MB')));
$form->addElement('text', 'disk_quota', array(get_lang('CourseQuota'), null, get_lang('MB')));
$form->addRule('disk_quota', get_lang('ThisFieldShouldBeNumeric'), 'numeric');
$obj = new GradeModel();
@ -158,7 +158,7 @@ $obj->fill_grade_model_select_in_form($form);
$extra_field = new ExtraField('course');
$extra = $extra_field->addElements($form);
$htmlHeadXtra[] ='
$htmlHeadXtra[] = '
<script>
$(function() {
@ -171,7 +171,7 @@ $form->addButtonCreate(get_lang('CreateCourse'));
// Set some default values.
$values['course_language'] = api_get_setting('platformLanguage');
$values['disk_quota'] = round(api_get_setting('default_document_quotum')/1024/1024, 1);
$values['disk_quota'] = round(api_get_setting('default_document_quotum') / 1024 / 1024, 1);
$default_course_visibility = api_get_setting('courses_default_creation_visibility');
@ -191,16 +191,16 @@ if ($form->validate()) {
$course = $form->exportValues();
$course_teachers = isset($course['course_teachers']) ? $course['course_teachers'] : null;
$course['disk_quota'] = $course['disk_quota']*1024*1024;
$course['disk_quota'] = $course['disk_quota'] * 1024 * 1024;
$course['exemplary_content'] = empty($course['exemplary_content']) ? false : true;
$course['teachers'] = $course_teachers;
$course['wanted_code'] = $course['visual_code'];
$course['gradebook_model_id'] = isset($course['gradebook_model_id']) ? $course['gradebook_model_id'] : null;
$course['gradebook_model_id'] = isset($course['gradebook_model_id']) ? $course['gradebook_model_id'] : null;
// Fixing category code
$course['course_category'] = isset($course['category_code']) ? $course['category_code'] : '';
$course['course_category'] = isset($course['category_code']) ? $course['category_code'] : '';
include_once api_get_path(SYS_CODE_PATH) . 'lang/english/trad4all.inc.php';
$file_to_include = api_get_path(SYS_CODE_PATH) . 'lang/' . $course['course_language'] . '/trad4all.inc.php';
include_once api_get_path(SYS_CODE_PATH).'lang/english/trad4all.inc.php';
$file_to_include = api_get_path(SYS_CODE_PATH).'lang/'.$course['course_language'].'/trad4all.inc.php';
if (file_exists($file_to_include)) {
include $file_to_include;

@ -62,7 +62,7 @@ $extra_params['height'] = 'auto';
$htmlHeadXtra[] = api_get_jqgrid_js();
$htmlHeadXtra[] = '<script>
$(function() {
'.Display::grid_js('event_email_template', $url,$columns,$column_model,$extra_params, array(), $action_links,true).'
'.Display::grid_js('event_email_template', $url, $columns, $column_model, $extra_params, array(), $action_links, true).'
});
</script>';

@ -15,7 +15,7 @@ $type = isset($_REQUEST['type']) ? $_REQUEST['type'] : null;
api_protect_admin_script();
// setting breadcrumbs
$interbreadcrumb[] = array('url' => 'index.php','name' => get_lang('PlatformAdmin'));
$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
$tool_name = null;
@ -36,16 +36,16 @@ $check = Security::check_token('request');
$token = Security::get_token();
if ($action == 'add') {
$interbreadcrumb[]=array('url' => 'extra_fields.php?type='.$extraField->type,'name' => $extraField->pageName);
$interbreadcrumb[]=array(
$interbreadcrumb[] = array('url' => 'extra_fields.php?type='.$extraField->type, 'name' => $extraField->pageName);
$interbreadcrumb[] = array(
'url' => 'extra_fields.php?type='.$extraField->type.'&action=edit&id='.$extraFieldInfo['id'],
'name' => $extraFieldInfo['display_text']
);
$interbreadcrumb[]=array(
$interbreadcrumb[] = array(
'url' => 'extra_field_options.php?type='.$extraField->type.'&field_id='.$extraFieldInfo['id'],
'name' => get_lang('EditExtraFieldOptions')
);
$interbreadcrumb[]=array('url' => '#','name' => get_lang('Add'));
$interbreadcrumb[] = array('url' => '#', 'name' => get_lang('Add'));
} elseif ($action == 'edit') {
$interbreadcrumb[] = array(
'url' => 'extra_fields.php?type='.$extraField->type,
@ -83,9 +83,9 @@ $params = 'field_id='.$field_id.'&type='.$extraField->type.'&roleId='.$roleId;
$paramsNoRole = 'field_id='.$field_id.'&type='.$extraField->type;
//The order is important you need to check the the $column variable in the model.ajax.php file
$columns = array(get_lang('Name'), get_lang('Value'), get_lang('Order'), get_lang('Actions'));
$columns = array(get_lang('Name'), get_lang('Value'), get_lang('Order'), get_lang('Actions'));
$htmlHeadXtra[]='<script>
$htmlHeadXtra[] = '<script>
function setHidden(obj) {
var name = $(obj).attr("name");
@ -186,9 +186,9 @@ foreach ($result as $item) {
if (!empty($roleId)) {
$form->addElement('html', $table->toHtml());
$group = array();
$group[]= $form->createElement('button', 'submit', get_lang('Save'));
$group[]= $form->createElement('button', 'select_all', get_lang('SelectAll'), array('class' => 'btn select_all'));
$group[]= $form->createElement('button', 'unselect_all', get_lang('UnSelectAll'), array('class' => 'btn unselect_all'));
$group[] = $form->createElement('button', 'submit', get_lang('Save'));
$group[] = $form->createElement('button', 'select_all', get_lang('SelectAll'), array('class' => 'btn select_all'));
$group[] = $form->createElement('button', 'unselect_all', get_lang('UnSelectAll'), array('class' => 'btn unselect_all'));
$form->addGroup($group, '', null, ' ');
$form->setDefaults(array('status' => $roleId));

@ -22,7 +22,7 @@ api_protect_admin_script(true);
$nameTools = get_lang('PlatformAdmin');
// setting breadcrumbs
$interbreadcrumb[] = array ('url' => 'index.php', 'name' => $nameTools);
$interbreadcrumb[] = array('url' => 'index.php', 'name' => $nameTools);
// setting the name of the tool
$nameTools = get_lang('DataFiller');
@ -47,7 +47,7 @@ if (!empty($_GET['fill'])) {
Display::display_header($nameTools);
$result = '';
if (count($output)>0) {
if (count($output) > 0) {
$result = '<div class="filler-report">'."\n";
$result .= '<h3>'.$output[0]['title'].'</h3>'."\n";
$result .= '<table>';
@ -58,16 +58,16 @@ if (count($output)>0) {
}
$result .= '</table>';
$result .= '</div>';
Display::display_normal_message($result,false);
Display::display_normal_message($result, false);
}
?>
<div id="datafiller" class="panel panel-default">
<div class="panel-body">
<h4><?php echo Display::return_icon('bug.png', get_lang('DataFiller'), null, ICON_SIZE_MEDIUM).' '.get_lang('DataFiller')?></h4>
<div class="description"><?php echo get_lang('ThisSectionIsOnlyVisibleOnSourceInstalls');?></div>
<div class="description"><?php echo get_lang('ThisSectionIsOnlyVisibleOnSourceInstalls'); ?></div>
<ul class="fillers">
<li><a href="filler.php?fill=users"><?php echo Display::return_icon('user.png', get_lang('FillUsers'), null, ICON_SIZE_SMALL).' '.get_lang('FillUsers');?></a></li>
<li><a href="filler.php?fill=courses"><?php echo Display::return_icon('new-course.png', get_lang('FillCourses'), null, ICON_SIZE_SMALL).' '.get_lang('FillCourses');?></a></li>
<li><a href="filler.php?fill=users"><?php echo Display::return_icon('user.png', get_lang('FillUsers'), null, ICON_SIZE_SMALL).' '.get_lang('FillUsers'); ?></a></li>
<li><a href="filler.php?fill=courses"><?php echo Display::return_icon('new-course.png', get_lang('FillCourses'), null, ICON_SIZE_SMALL).' '.get_lang('FillCourses'); ?></a></li>
</ul>
</div>
</div>

@ -23,7 +23,7 @@ api_protect_admin_script(true);
Display :: display_header($tool_name);
//On sélectionne les user élèves
$sql = "SELECT user_id FROM ".$table_user." user WHERE user.status= '5' ORDER by lastname " ;
$sql = "SELECT user_id FROM ".$table_user." user WHERE user.status= '5' ORDER by lastname ";
$result = Database::query($sql);
while ($row = Database::fetch_array($result)) {

@ -25,9 +25,9 @@ $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'display';
// setting breadcrumbs
$tool_name = get_lang('SkillsAndGradebooks');
$interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('PlatformAdmin'));
$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
if ($action == 'add_skill') {
$interbreadcrumb[]=array('url' => 'skills_gradebook.php','name' => get_lang('SkillsAndGradebooks'));
$interbreadcrumb[] = array('url' => 'skills_gradebook.php', 'name' => get_lang('SkillsAndGradebooks'));
$tool_name = get_lang('Add');
}
@ -86,9 +86,9 @@ $extra_params['height'] = 'auto';
$action_links = 'function action_formatter(cellvalue, options, rowObject) {
//certificates
if (rowObject[4] == 1) {
return \'<a href="?action=add_skill&id=\'+options.rowId+\'">'.Display::return_icon('add.png', get_lang('AddSkill'),'',ICON_SIZE_SMALL).'</a>'.'\';
return \'<a href="?action=add_skill&id=\'+options.rowId+\'">'.Display::return_icon('add.png', get_lang('AddSkill'), '', ICON_SIZE_SMALL).'</a>'.'\';
} else {
return \''.Display::return_icon('add_na.png', get_lang('YourGradebookFirstNeedsACertificateInOrderToBeLinkedToASkill'),'',ICON_SIZE_SMALL).''.'\';
return \''.Display::return_icon('add_na.png', get_lang('YourGradebookFirstNeedsACertificateInOrderToBeLinkedToASkill'), '', ICON_SIZE_SMALL).''.'\';
}
}';
?>
@ -96,7 +96,7 @@ $action_links = 'function action_formatter(cellvalue, options, rowObject) {
$(function() {
<?php
// grid definition see the $career->display() function
echo Display::grid_js('gradebooks', $url, $columns, $column_model, $extra_params, array(), $action_links,true);
echo Display::grid_js('gradebooks', $url, $columns, $column_model, $extra_params, array(), $action_links, true);
?>
});
</script>
@ -111,7 +111,7 @@ switch ($action) {
$id = isset($_REQUEST['id']) ? $_REQUEST['id'] : null;
$gradebook_info = $gradebook->get($id);
$url = api_get_self().'?action='.$action.'&id='.$id;
$form = $gradebook->show_skill_form($id, $url, $gradebook_info['name']);
$form = $gradebook->show_skill_form($id, $url, $gradebook_info['name']);
if ($form->validate()) {
$values = $form->exportValues();
$res = $gradebook->update_skills_to_gradebook($values['id'], $values['skill']);

@ -161,7 +161,7 @@ $this_section = SECTION_PLATFORM_ADMIN;
api_protect_admin_script(true);
$tool_name = get_lang('ImportSkillsListCSV');
$interbreadcrumb[] = array ("url" => 'index.php', "name" => get_lang('PlatformAdmin'));
$interbreadcrumb[] = array("url" => 'index.php', "name" => get_lang('PlatformAdmin'));
set_time_limit(0);
$extra_fields = UserManager::get_extra_fields(0, 0, 5, 'ASC', true);
@ -172,13 +172,13 @@ if (!empty($_POST['formSent']) && $_FILES['import_file']['size'] !== 0) {
$file_type = $_POST['file_type'];
Security::clear_token();
$tok = Security::get_token();
$allowed_file_mimetype = array('csv','xml');
$allowed_file_mimetype = array('csv', 'xml');
$error_kind_file = false;
$error_message = '';
$ext_import_file = substr($_FILES['import_file']['name'], (strrpos($_FILES['import_file']['name'],'.')+1));
$ext_import_file = substr($_FILES['import_file']['name'], (strrpos($_FILES['import_file']['name'], '.') + 1));
if (in_array($ext_import_file,$allowed_file_mimetype)) {
if (in_array($ext_import_file, $allowed_file_mimetype)) {
if (strcmp($file_type, 'csv') === 0 && $ext_import_file == $allowed_file_mimetype[0]) {
$skills = parse_csv_data($_FILES['import_file']['tmp_name']);
$errors = validate_data($skills);
@ -238,7 +238,7 @@ if (!empty($_POST['formSent']) && $_FILES['import_file']['size'] !== 0) {
}
}
$interbreadcrumb[] = array ("url" => 'skill_list.php', "name" => get_lang('ManageSkills'));
$interbreadcrumb[] = array("url" => 'skill_list.php', "name" => get_lang('ManageSkills'));
Display :: display_header($tool_name);
@ -251,7 +251,7 @@ if (!empty($see_message_import)) {
$toolbar = Display::toolbarButton(
get_lang('ManageSkills'),
api_get_path(WEB_CODE_PATH) . 'admin/skill_list.php',
api_get_path(WEB_CODE_PATH).'admin/skill_list.php',
'list',
'success',
['title' => get_lang('CreateSkill')]
@ -259,7 +259,7 @@ $toolbar = Display::toolbarButton(
$toolbar .= '&nbsp;&nbsp;';
$toolbar .= Display::toolbarButton(
get_lang('SkillsWheel'),
api_get_path(WEB_CODE_PATH) . 'admin/skills_wheel.php',
api_get_path(WEB_CODE_PATH).'admin/skills_wheel.php',
'bullseye',
'primary',
['title' => get_lang('CreateSkill')]
@ -267,7 +267,7 @@ $toolbar .= Display::toolbarButton(
$toolbar .= '&nbsp;&nbsp;';
$toolbar .= Display::toolbarButton(
get_lang('BadgesManagement'),
api_get_path(WEB_CODE_PATH) . 'admin/skill_badge_list.php',
api_get_path(WEB_CODE_PATH).'admin/skill_badge_list.php',
'shield',
'warning',
['title' => get_lang('BadgesManagement')]
@ -276,7 +276,7 @@ $toolbar .= '<br /><br />';
echo $toolbar;
$form = new FormValidator('user_import','post','skills_import.php');
$form = new FormValidator('user_import', 'post', 'skills_import.php');
$form->addElement('header', '', $tool_name);
$form->addElement('hidden', 'formSent');
$form->addElement('file', 'import_file', get_lang('ImportFileLocation'));

@ -26,7 +26,7 @@ $skill = new Skill();
$skill_profile = new SkillProfile();
$skill_rel_user = new SkillRelUser();
$url = api_get_path(WEB_AJAX_PATH).'skill.ajax.php';
$url = api_get_path(WEB_AJAX_PATH).'skill.ajax.php';
$tpl = new Template(get_lang('Skills'));
@ -63,7 +63,7 @@ if ($form->validate()) {
$user_list = array();
$count_skills = count($skills);
$users = $skill_rel_user->get_user_by_skills($skills);
$users = $skill_rel_user->get_user_by_skills($skills);
if (!empty($users)) {
foreach ($users as $user) {
@ -71,7 +71,7 @@ if (!empty($users)) {
$user_list[$user['user_id']]['user'] = $user_info;
$my_user_skills = $skill_rel_user->get_user_skills($user['user_id']);
$user_skills = array();
$found_counts = 0 ;
$found_counts = 0;
foreach ($my_user_skills as $my_skill) {
$found = false;
if (in_array($my_skill['skill_id'], $skills)) {

@ -280,7 +280,7 @@ function element_start($parser, $data)
global $current_tag;
switch ($data) {
case 'Contact':
$user = array ();
$user = array();
break;
default:
$current_tag = $data;
@ -373,7 +373,7 @@ if (isset($_POST['formSent']) && $_POST['formSent'] AND
$allowed_file_mimetype = array('csv', 'xml');
$error_kind_file = false;
$checkUniqueEmail = isset($_POST['check_unique_email']) ? $_POST['check_unique_email'] :null;
$checkUniqueEmail = isset($_POST['check_unique_email']) ? $_POST['check_unique_email'] : null;
$uploadInfo = pathinfo($_FILES['import_file']['name']);
$ext_import_file = $uploadInfo['extension'];
@ -382,7 +382,7 @@ if (isset($_POST['formSent']) && $_POST['formSent'] AND
if (strcmp($file_type, 'csv') === 0 &&
$ext_import_file == $allowed_file_mimetype[0]
) {
$users = parse_csv_data($_FILES['import_file']['tmp_name']);
$users = parse_csv_data($_FILES['import_file']['tmp_name']);
$errors = validate_data($users, $checkUniqueEmail);
$error_kind_file = false;
} elseif (strcmp($file_type, 'xml') === 0 && $ext_import_file == $allowed_file_mimetype[1]) {

@ -23,8 +23,8 @@ function validate_data($classes) {
// 2. Check whether class doesn't exist yet.
if ($usergroup->usergroup_exists($class['name'])) {
$class['line'] = $index + 2;
$class['error'] = get_lang('ClassNameExists') .
': <strong>' .$class['name'] . '</strong>';
$class['error'] = get_lang('ClassNameExists').
': <strong>'.$class['name'].'</strong>';
$errors[] = $class;
}
}
@ -102,7 +102,7 @@ $group[] = $form->createElement(
'radio',
'file_type',
'',
'CSV (<a href="example_class.csv" target="_blank">' . get_lang('ExampleCSVFile') . '</a>)',
'CSV (<a href="example_class.csv" target="_blank">'.get_lang('ExampleCSVFile').'</a>)',
'csv'
);
$form->addGroup($group, '', get_lang('FileType'), null);
@ -113,12 +113,12 @@ if ($form->validate()) {
$errors = validate_data($classes);
if (count($errors) == 0) {
$number_of_added_classes = save_data($classes);
Display::display_normal_message($number_of_added_classes . ' ' . get_lang('Added'));
Display::display_normal_message($number_of_added_classes.' '.get_lang('Added'));
} else {
$error_message = get_lang('ErrorsWhenImportingFile');
$error_message .= '<ul>';
foreach ($errors as $index => $error_class) {
$error_message .= '<li>' . $error_class['error'] . ' (' . get_lang('Line') . ' ' . $error_class['line'] . ')';
$error_message .= '<li>'.$error_class['error'].' ('.get_lang('Line').' '.$error_class['line'].')';
$error_message .= '</li>';
}
$error_message .= '</ul>';
@ -129,7 +129,7 @@ if ($form->validate()) {
$form->display();
?>
<p><?php echo get_lang('CSVMustLookLike') . ' (' . get_lang('MandatoryFields') . ')'; ?> :</p>
<p><?php echo get_lang('CSVMustLookLike').' ('.get_lang('MandatoryFields').')'; ?> :</p>
<pre>
<b>name;description;</b>users

@ -12,7 +12,7 @@ api_protect_course_script(true);
// error messages
if (isset($error)) {
Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'),false);
Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'), false);
}
if (!isset($error)) {
@ -28,7 +28,7 @@ $form->addElement('header', '', get_lang('CreateANewAttendance'));
$form->addElement('hidden', 'sec_token', $token);
$form->addText('title', get_lang('Title'), true);
$form->applyFilter('title','html_filter');
$form->applyFilter('title', 'html_filter');
$form->addHtmlEditor(
'description',
get_lang('Description'),
@ -41,7 +41,7 @@ $form->addHtmlEditor(
if ((api_get_session_id() != 0 && Gradebook::is_active()) || api_get_session_id() == 0) {
$form->addButtonAdvancedSettings('id_qualify');
$form->addElement('html','<div id="id_qualify_options" style="display:none">');
$form->addElement('html', '<div id="id_qualify_options" style="display:none">');
// Qualify Attendance for gradebook option
$form->addElement(
@ -51,7 +51,7 @@ if ((api_get_session_id() != 0 && Gradebook::is_active()) || api_get_session_id(
get_lang('QualifyAttendanceGradebook'),
'onclick="javascript: if(this.checked){document.getElementById(\'options_field\').style.display = \'block\';}else{document.getElementById(\'options_field\').style.display = \'none\';}"'
);
$form->addElement('html','<div id="options_field" style="display:none">');
$form->addElement('html', '<div id="options_field" style="display:none">');
GradebookUtils::load_gradebook_select_in_tool($form);
@ -64,8 +64,8 @@ if ((api_get_session_id() != 0 && Gradebook::is_active()) || api_get_session_id(
'value="0.00" Style="width:40px" onfocus="javascript: this.select();"'
);
$form->applyFilter('attendance_weight', 'html_filter');
$form->addElement('html','</div>');
$form->addElement('html','</div>');
$form->addElement('html', '</div>');
$form->addElement('html', '</div>');
}
$form->addButtonCreate(get_lang('Save'));
$form->display();

@ -24,7 +24,7 @@ if (api_is_allowed_to_edit(null, true) ||
$form = new FormValidator(
'filter',
'post',
'index.php?action=attendance_sheet_list&' . api_get_cidreq().'&attendance_id=' . $attendance_id,
'index.php?action=attendance_sheet_list&'.api_get_cidreq().'&attendance_id='.$attendance_id,
null,
array(),
'inline'
@ -215,7 +215,7 @@ if (api_is_allowed_to_edit(null, true) ||
<th width="100px"><?php echo get_lang('AttendancesFaults')?></th>
</tr>
<tr class="tableFloatingHeaderOriginal" >
<th width="10px"><?php echo '#';?></th>
<th width="10px"><?php echo '#'; ?></th>
<th width="10px"><?php echo get_lang('Photo')?></th>
<th width="150px"><?php echo get_lang('LastName')?></th>
<th width="140px"><?php echo get_lang('FirstName')?></th>
@ -229,9 +229,9 @@ if (api_is_allowed_to_edit(null, true) ||
foreach ($users_in_course as $data) {
$faults = 0;
if ($i % 2 == 0) {
$class='row_odd';
$class = 'row_odd';
} else {
$class='row_even';
$class = 'row_even';
}
$username = api_htmlentities(sprintf(get_lang('LoginX'), $data['username']), ENT_QUOTES);
?>
@ -241,7 +241,7 @@ if (api_is_allowed_to_edit(null, true) ||
<td><span title="<?php echo $username ?>"><?php echo $data['lastname'] ?></span></td>
<td><?php echo $data['firstname'] ?></td>
<td>
<div class="attendance-faults-bar" style="background-color:<?php echo (!empty($data['result_color_bar'])?$data['result_color_bar']:'none') ?>">
<div class="attendance-faults-bar" style="background-color:<?php echo (!empty($data['result_color_bar']) ? $data['result_color_bar'] : 'none') ?>">
<?php echo $data['attendance_result'] ?>
</div>
</td>
@ -263,7 +263,7 @@ if (api_is_allowed_to_edit(null, true) ||
foreach ($attendant_calendar as $calendar) {
$date = $calendar['date'];
$time = $calendar['time'];
$datetime = '<div class="grey">'. $date . ' - ' . $time . '</div>';
$datetime = '<div class="grey">'.$date.' - '.$time.'</div>';
$img_lock = Display::return_icon(
'lock-closed.png',
@ -272,21 +272,21 @@ if (api_is_allowed_to_edit(null, true) ||
);
if (!empty($calendar['done_attendance'])) {
$datetime = '<div class="blue">' . $date . ' - ' . $time . '</div>';
$datetime = '<div class="blue">'.$date.' - '.$time.'</div>';
}
$disabled_check = 'disabled = "true"';
$input_hidden = '<input type="hidden" id="hidden_input_'.$calendar['id'].'" name="hidden_input[]" value="" disabled />';
if ($next_attendance_calendar_id == $calendar['id']) {
$input_hidden = '<input type="hidden" id="hidden_input_'.$calendar['id'].'" name="hidden_input[]" value="'.$calendar['id'].'" />';
$disabled_check = '';
$img_lock = Display::return_icon('lock-closed.png',get_lang('DateLock'),array('class'=>'img_unlock','id'=>'datetime_column_'.$calendar['id']));
$img_lock = Display::return_icon('lock-closed.png', get_lang('DateLock'), array('class'=>'img_unlock', 'id'=>'datetime_column_'.$calendar['id']));
}
$result .= '<th>';
$result .= '<div class="date-attendance">'.$datetime.'&nbsp;';
if (api_is_allowed_to_edit(null, true)) {
$result .= '<span id="attendance_lock" style="cursor:pointer">'.(!$is_locked_attendance || api_is_platform_admin()?$img_lock:'').'</span>';
$result .= '<span id="attendance_lock" style="cursor:pointer">'.(!$is_locked_attendance || api_is_platform_admin() ? $img_lock : '').'</span>';
}
if ($is_locked_attendance == false) {
@ -297,7 +297,7 @@ if (api_is_allowed_to_edit(null, true) ||
}
} else {
$result = '<th width="2000px"><span><a href="index.php?'.api_get_cidreq().'&action=calendar_list&attendance_id='.$attendance_id.'">';
$result .= Display::return_icon('attendance_calendar.png',get_lang('AttendanceCalendar'),'',ICON_SIZE_MEDIUM).' '.get_lang('GoToAttendanceCalendar').'</a></span></th>';
$result .= Display::return_icon('attendance_calendar.png', get_lang('AttendanceCalendar'), '', ICON_SIZE_MEDIUM).' '.get_lang('GoToAttendanceCalendar').'</a></span></th>';
}
echo '<tr class="tableFloatingHeader row_odd" style="position: absolute; top: 0px; left: 0px; visibility: hidden; margin:0px;padding:0px">';
@ -311,7 +311,7 @@ if (api_is_allowed_to_edit(null, true) ||
$i = 0;
foreach ($users_in_course as $user) {
$class = '';
if ($i%2 == 0) {
if ($i % 2 == 0) {
$class = 'row_even';
} else {
$class = 'row_odd';
@ -358,7 +358,7 @@ if (api_is_allowed_to_edit(null, true) ||
echo '<input type="checkbox" name="check_presence['.$calendar['id'].'][]" value="'.$user['user_id'].'" '.$disabled.' '.$checked.' />';
echo '<span class="anchor_'.$calendar['id'].'"></span>';
} else {
echo $presence ? Display::return_icon('checkbox_on.gif',get_lang('Presence')) : Display::return_icon('checkbox_off.gif',get_lang('Presence'));
echo $presence ? Display::return_icon('checkbox_on.gif', get_lang('Presence')) : Display::return_icon('checkbox_off.gif', get_lang('Presence'));
}
} else {
switch ($presence) {
@ -389,7 +389,7 @@ if (api_is_allowed_to_edit(null, true) ||
</td>';
}
echo '</tr>';
$i++ ;
$i++;
}
echo '</tbody></table>';
echo '</div></div>';
@ -417,13 +417,13 @@ if (api_is_allowed_to_edit(null, true) ||
echo Display::page_header(get_lang('AttendanceSheetReport'));
// View for students
?>
<?php if(!empty($users_presence)) { ?>
<?php if (!empty($users_presence)) { ?>
<div>
<table width="250px;">
<tr>
<td><?php echo get_lang('ToAttend').': ' ?></td>
<td>
<center><div class="attendance-faults-bar" style="background-color:<?php echo (!empty($faults['color_bar'])?$faults['color_bar']:'none') ?>">
<center><div class="attendance-faults-bar" style="background-color:<?php echo (!empty($faults['color_bar']) ? $faults['color_bar'] : 'none') ?>">
<?php echo $faults['faults'].'/'.$faults['total'].' ('.$faults['faults_porcent'].'%)' ?></div></center>
</td>
</tr>
@ -448,7 +448,7 @@ if (api_is_allowed_to_edit(null, true) ||
?>
<tr class="<?php echo $class ?>">
<td>
<?php echo $presence['presence'] ? Display::return_icon('checkbox_on.gif',get_lang('Presence')) : Display::return_icon('checkbox_off.gif',get_lang('Presence')) ?>
<?php echo $presence['presence'] ? Display::return_icon('checkbox_on.gif', get_lang('Presence')) : Display::return_icon('checkbox_off.gif', get_lang('Presence')) ?>
<?php echo "&nbsp; ".$presence['date_time'] ?>
</td>
</tr>

@ -121,7 +121,7 @@ for ($i = 0; $i < ($count_dir); $i++) {
}
$editorConfig = array(
'ToolbarSet' => (api_is_allowed_to_edit(null, true) ? 'Documents' :'DocumentsStudent'),
'ToolbarSet' => (api_is_allowed_to_edit(null, true) ? 'Documents' : 'DocumentsStudent'),
'Width' => '100%',
'Height' => '400',
'cols-size' => [2, 10, 0],
@ -164,13 +164,13 @@ if (!$is_certificate_mode) {
"name" => get_lang('Documents'),
);
} else {
$interbreadcrumb[]= array('url' => '../gradebook/'.$_SESSION['gradebook_dest'], 'name' => get_lang('Gradebook'));
$interbreadcrumb[] = array('url' => '../gradebook/'.$_SESSION['gradebook_dest'], 'name' => get_lang('Gradebook'));
}
if (empty($document_data['parents'])) {
$interbreadcrumb[] = array('url' => '#', 'name' => $document_data['title']);
} else {
foreach($document_data['parents'] as $document_sub_data) {
foreach ($document_data['parents'] as $document_sub_data) {
if ($document_data['title'] == $document_sub_data['title']) {
continue;
}
@ -354,7 +354,7 @@ if ($is_allowed_to_edit) {
$dir,
api_get_user_id()
);
header('Location: document.php?id=' . $document_data['parent_id'] . '&' . api_get_cidreq() . ($is_certificate_mode?'&curdirpath=/certificates&selectcat=1':''));
header('Location: document.php?id='.$document_data['parent_id'].'&'.api_get_cidreq().($is_certificate_mode ? '&curdirpath=/certificates&selectcat=1' : ''));
exit;
} else {
Display::addFlash(Display::return_message(get_lang('Impossible'), 'warning'));
@ -397,7 +397,7 @@ if (file_exists($document_data['absolute_path'])) {
/* Display user interface */
// Display the header
$nameTools = get_lang('EditDocument') . ': '.Security::remove_XSS($document_data['title']);
$nameTools = get_lang('EditDocument').': '.Security::remove_XSS($document_data['title']);
Display::display_header($nameTools, 'Doc');
$document_info = api_get_item_property_info(
@ -480,7 +480,7 @@ if ($owner_id == api_get_user_id() ||
$form->addElement('textarea', 'comment', get_lang('Comment'), ['cols-size' => [2, 10, 0]]);
if ($owner_id == api_get_user_id() || api_is_platform_admin()) {
$checked =& $form->addElement('checkbox', 'readonly', null, get_lang('ReadOnly'));
$checked = & $form->addElement('checkbox', 'readonly', null, get_lang('ReadOnly'));
if ($readonly == 1) {
$checked->setChecked(true);
}
@ -520,14 +520,14 @@ if ($owner_id == api_get_user_id() ||
foreach ($all_information_by_create_certificate[0] as $info_value) {
$str_info .= $info_value.'<br/>';
}
$create_certificate=get_lang('CreateCertificateWithTags');
$create_certificate = get_lang('CreateCertificateWithTags');
Display::display_normal_message(
$create_certificate.': <br /><br />'.$str_info,
false
);
}
if ($extension=='svg' && !api_browser_support('svg') && api_get_setting('enabled_support_svg') == 'true'){
if ($extension == 'svg' && !api_browser_support('svg') && api_get_setting('enabled_support_svg') == 'true') {
Display::display_warning_message(get_lang('BrowserDontSupportsSVG'));
}
// HTML-editor
@ -579,7 +579,7 @@ function change_name($base_work_dir, $source_file, $rename_to, $dir, $doc)
}
//return button back to
function show_return($document_id, $path, $call_from_tool='', $slide_id=0, $is_certificate_mode=false)
function show_return($document_id, $path, $call_from_tool = '', $slide_id = 0, $is_certificate_mode = false)
{
$actionsLeft = null;
@ -588,29 +588,29 @@ function show_return($document_id, $path, $call_from_tool='', $slide_id=0, $is_c
if ($is_certificate_mode) {
$selectedCategory = (isset($_GET['curdirpath']) ? Security::remove_XSS($_GET['curdirpath']) : '');
$actionsLeft .= '<a href="document.php?curdirpath='. $selectedCategory .'&selectcat=' . $selectedCategory .'">'.
Display::return_icon('back.png',get_lang('Back').' '.get_lang('To').' '.get_lang('CertificateOverview'),'',ICON_SIZE_MEDIUM).'</a>';
$actionsLeft .= '<a id="hide_bar_template" href="#" role="button">'.Display::return_icon('expand.png',get_lang('Expand'),array('id'=>'expand'),ICON_SIZE_MEDIUM).Display::return_icon('contract.png',get_lang('Collapse'),array('id'=>'contract', 'class'=>'hide'),ICON_SIZE_MEDIUM).'</a>';
} elseif($call_from_tool=='slideshow') {
$actionsLeft .= '<a href="document.php?curdirpath='.$selectedCategory.'&selectcat='.$selectedCategory.'">'.
Display::return_icon('back.png', get_lang('Back').' '.get_lang('To').' '.get_lang('CertificateOverview'), '', ICON_SIZE_MEDIUM).'</a>';
$actionsLeft .= '<a id="hide_bar_template" href="#" role="button">'.Display::return_icon('expand.png', get_lang('Expand'), array('id'=>'expand'), ICON_SIZE_MEDIUM).Display::return_icon('contract.png', get_lang('Collapse'), array('id'=>'contract', 'class'=>'hide'), ICON_SIZE_MEDIUM).'</a>';
} elseif ($call_from_tool == 'slideshow') {
$actionsLeft .= '<a href="'.api_get_path(WEB_PATH).'main/document/slideshow.php?slide_id='.$slide_id.'&curdirpath='.Security::remove_XSS(urlencode($_GET['curdirpath'])).'">'.
Display::return_icon('slideshow.png', get_lang('BackTo').' '.get_lang('ViewSlideshow'),'',ICON_SIZE_MEDIUM).'</a>';
} elseif($call_from_tool=='editdraw') {
Display::return_icon('slideshow.png', get_lang('BackTo').' '.get_lang('ViewSlideshow'), '', ICON_SIZE_MEDIUM).'</a>';
} elseif ($call_from_tool == 'editdraw') {
$actionsLeft .= '<a href="'.$url.'">'.
Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), '', ICON_SIZE_MEDIUM).'</a>';
$actionsLeft .= '<a href="javascript:history.back(1)">'.Display::return_icon('draw.png', get_lang('BackTo').' '.get_lang('Draw'), array(), 32).'</a>';
} elseif($call_from_tool=='editodf') {
} elseif ($call_from_tool == 'editodf') {
$actionsLeft .= '<a href="'.$url.'">'.
Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), '', ICON_SIZE_MEDIUM).'</a>';
$actionsLeft .= '<a href="javascript:history.back(1)">'.Display::return_icon('draw.png', get_lang('BackTo').' '.get_lang('Write'), array(), 32).'</a>';
$actionsLeft .= '<a id="hide_bar_template" href="#" role="button">'.Display::return_icon('expand.png',get_lang('Expand'),array('id'=>'expand'),ICON_SIZE_MEDIUM).Display::return_icon('contract.png',get_lang('Collapse'),array('id'=>'contract', 'class'=>'hide'),ICON_SIZE_MEDIUM).'</a>';
} elseif($call_from_tool=='editpaint'){
$actionsLeft .= '<a id="hide_bar_template" href="#" role="button">'.Display::return_icon('expand.png', get_lang('Expand'), array('id'=>'expand'), ICON_SIZE_MEDIUM).Display::return_icon('contract.png', get_lang('Collapse'), array('id'=>'contract', 'class'=>'hide'), ICON_SIZE_MEDIUM).'</a>';
} elseif ($call_from_tool == 'editpaint') {
$actionsLeft .= '<a href="'.$url.'">'.
Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), array(), ICON_SIZE_MEDIUM).'</a>';
$actionsLeft .= '<a href="javascript:history.back(1)">'.Display::return_icon('paint.png', get_lang('BackTo').' '.get_lang('Paint'), array(), 32).'</a>';
} else {
$actionsLeft .= '<a href="'.$url.'">'.
Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>';
$actionsLeft .= '<a id="hide_bar_template" href="#" role="button">'.Display::return_icon('expand.png',get_lang('Expand'),array('id'=>'expand'),ICON_SIZE_MEDIUM).Display::return_icon('contract.png',get_lang('Collapse'),array('id'=>'contract', 'class'=>'hide'),ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), '', ICON_SIZE_MEDIUM).'</a>';
$actionsLeft .= '<a id="hide_bar_template" href="#" role="button">'.Display::return_icon('expand.png', get_lang('Expand'), array('id'=>'expand'), ICON_SIZE_MEDIUM).Display::return_icon('contract.png', get_lang('Collapse'), array('id'=>'contract', 'class'=>'hide'), ICON_SIZE_MEDIUM).'</a>';
}
echo $toolbar = Display::toolbarAction('actions-documents', array($actionsLeft));

@ -218,23 +218,23 @@ if ($action != 'add') {
if (api_get_session_id() == 0) {
echo '<div class="actions">';
if ($view_dropbox_category_received != 0 && api_is_allowed_to_session_edit(false, true)) {
echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category=0&view_sent_category='.$viewSentCategory.'&view='.$view.'">'.Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('Root'),'',ICON_SIZE_MEDIUM)."</a>";
if ($view_dropbox_category_received != 0 && api_is_allowed_to_session_edit(false, true)) {
echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category=0&view_sent_category='.$viewSentCategory.'&view='.$view.'">'.Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('Root'), '', ICON_SIZE_MEDIUM)."</a>";
echo get_lang('Category').': <strong>'.Security::remove_XSS($dropbox_categories[$view_dropbox_category_received]['cat_name']).'</strong> ';
$movelist[0] = 'Root'; // move_received selectbox content
} else {
echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=addreceivedcategory&view='.$view.'">'.Display::return_icon('new_folder.png', get_lang('AddNewCategory'),'',ICON_SIZE_MEDIUM).'</a>';
echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=addreceivedcategory&view='.$view.'">'.Display::return_icon('new_folder.png', get_lang('AddNewCategory'), '', ICON_SIZE_MEDIUM).'</a>';
}
echo '</div>';
} else {
if (api_is_allowed_to_session_edit(false, true)) {
echo '<div class="actions">';
if ($view_dropbox_category_received != 0 && api_is_allowed_to_session_edit(false, true)) {
echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category=0&view_sent_category='.$viewSentCategory.'&view='.$view.'">'.Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('Root'),'',ICON_SIZE_MEDIUM)."</a>";
echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category=0&view_sent_category='.$viewSentCategory.'&view='.$view.'">'.Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('Root'), '', ICON_SIZE_MEDIUM)."</a>";
echo get_lang('Category').': <strong>'.Security::remove_XSS($dropbox_categories[$view_dropbox_category_received]['cat_name']).'</strong> ';
$movelist[0] = 'Root'; // move_received selectbox content
} else {
echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=addreceivedcategory&view='.$view.'">'.Display::return_icon('new_folder.png', get_lang('AddNewCategory'),'',ICON_SIZE_MEDIUM).'</a>';
echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=addreceivedcategory&view='.$view.'">'.Display::return_icon('new_folder.png', get_lang('AddNewCategory'), '', ICON_SIZE_MEDIUM).'</a>';
}
echo '</div>';
}
@ -254,13 +254,13 @@ if ($action != 'add') {
if (api_get_session_id() == 0) {
echo '<div class="actions">';
if ($view_dropbox_category_sent != 0) {
echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category=0&view='.$view.'">'.Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('Root'),'',ICON_SIZE_MEDIUM)."</a>";
echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category=0&view='.$view.'">'.Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('Root'), '', ICON_SIZE_MEDIUM)."</a>";
echo get_lang('Category').': <strong>'.Security::remove_XSS($dropbox_categories[$view_dropbox_category_sent]['cat_name']).'</strong> ';
} else {
echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=addsentcategory\">".Display::return_icon('new_folder.png', get_lang('AddNewCategory'),'',ICON_SIZE_MEDIUM)."</a>\n";
echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=addsentcategory\">".Display::return_icon('new_folder.png', get_lang('AddNewCategory'), '', ICON_SIZE_MEDIUM)."</a>\n";
}
if (empty($viewSentCategory)) {
echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=add\">".Display::return_icon('upload_file.png', get_lang('UploadNewFile'),'',ICON_SIZE_MEDIUM)."</a>";
echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=add\">".Display::return_icon('upload_file.png', get_lang('UploadNewFile'), '', ICON_SIZE_MEDIUM)."</a>";
}
echo '</div>';
} else {
@ -268,12 +268,12 @@ if ($action != 'add') {
echo '<div class="actions">';
if ($view_dropbox_category_sent != 0) {
echo get_lang('CurrentlySeeing').': <strong>'.Security::remove_XSS($dropbox_categories[$view_dropbox_category_sent]['cat_name']).'</strong> ';
echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category=0&view='.$view.'">'.Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('Root'),'',ICON_SIZE_MEDIUM)."</a>";
echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category=0&view='.$view.'">'.Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('Root'), '', ICON_SIZE_MEDIUM)."</a>";
} else {
echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=addsentcategory\">".Display::return_icon('new_folder.png', get_lang('AddNewCategory'),'',ICON_SIZE_MEDIUM)."</a>\n";
echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=addsentcategory\">".Display::return_icon('new_folder.png', get_lang('AddNewCategory'), '', ICON_SIZE_MEDIUM)."</a>\n";
}
if (empty($viewSentCategory)) {
echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=add\">".Display::return_icon('upload_file.png', get_lang('UploadNewFile'),'',ICON_SIZE_MEDIUM)."</a>";
echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=add\">".Display::return_icon('upload_file.png', get_lang('UploadNewFile'), '', ICON_SIZE_MEDIUM)."</a>";
}
echo '</div>';
}
@ -326,7 +326,7 @@ if ($action != 'add') {
if (api_get_session_id() == 0) {
$column_header[] = array(get_lang('Modify'), false, '', 'nowrap style="text-align: right"');
} elseif (api_is_allowed_to_session_edit(false,true)) {
} elseif (api_is_allowed_to_session_edit(false, true)) {
$column_header[] = array(get_lang('Modify'), false, '', 'nowrap style="text-align: right"');
}
@ -387,7 +387,7 @@ if ($action != 'add') {
$link_open = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&id='.$dropbox_file->id.'">';
$dropbox_file_data[] = $link_open.DocumentManager::build_document_icon_tag('file', $dropbox_file->title).'</a>';
$dropbox_file_data[] = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&id='.$dropbox_file->id.'&action=download">'.
Display::return_icon('save.png', get_lang('Download'), array('style' => 'float:right;'),ICON_SIZE_SMALL).'</a>'.$link_open.$dropbox_file->title.'</a>'.$new_icon.'<br />'.$dropbox_file->description;
Display::return_icon('save.png', get_lang('Download'), array('style' => 'float:right;'), ICON_SIZE_SMALL).'</a>'.$link_open.$dropbox_file->title.'</a>'.$new_icon.'<br />'.$dropbox_file->description;
$file_size = $dropbox_file->filesize;
$dropbox_file_data[] = format_file_size($file_size);
@ -403,10 +403,10 @@ if ($action != 'add') {
api_format_date($last_upload_date).'</span>';
$action_icons = check_number_feedback($dropbox_file->id, $number_feedback).' '.get_lang('Feedback').'
<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=viewfeedback&id='.$dropbox_file->id.'&'.$sort_params.'">'.Display::return_icon('discuss.png', get_lang('Comment'),'',ICON_SIZE_SMALL).'</a>
<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=movereceived&move_id='.$dropbox_file->id.'&'.$sort_params.'">'.Display::return_icon('move.png', get_lang('Move'),'',ICON_SIZE_SMALL).'</a>
<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=viewfeedback&id='.$dropbox_file->id.'&'.$sort_params.'">'.Display::return_icon('discuss.png', get_lang('Comment'), '', ICON_SIZE_SMALL).'</a>
<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=movereceived&move_id='.$dropbox_file->id.'&'.$sort_params.'">'.Display::return_icon('move.png', get_lang('Move'), '', ICON_SIZE_SMALL).'</a>
<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=deletereceivedfile&id='.$dropbox_file->id.'&'.$sort_params.'" onclick="javascript: return confirmation(\''.$dropbox_file->title.'\');">'.
Display::return_icon('delete.png', get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>';
Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>';
// This is a hack to have an additional row in a sortable table
@ -440,12 +440,12 @@ if ($action != 'add') {
// The icon of the category
$link_open = '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$category['cat_id'].'&view_sent_category='.$viewSentCategory.'&view='.$view.'">';
$dropbox_category_data[] = $link_open.DocumentManager::build_document_icon_tag('folder', $category['cat_name']).'</a>';
$dropbox_category_data[] = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&cat_id='.$category['cat_id'].'&action=downloadcategory&sent_received=received">'.Display::return_icon('save_pack.png', get_lang('Save'), array('style' => 'float:right;'),ICON_SIZE_SMALL).'</a>'.$link_open.$category['cat_name'].'</a>';
$dropbox_category_data[] = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&cat_id='.$category['cat_id'].'&action=downloadcategory&sent_received=received">'.Display::return_icon('save_pack.png', get_lang('Save'), array('style' => 'float:right;'), ICON_SIZE_SMALL).'</a>'.$link_open.$category['cat_name'].'</a>';
$dropbox_category_data[] = '';
$dropbox_category_data[] = '';
$dropbox_category_data[] = '';
$dropbox_category_data[] = '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=editcategory&id='.$category['cat_id'].'">'.Display::return_icon('edit.png',get_lang('Edit'),'',ICON_SIZE_SMALL).'</a>
<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=deletereceivedcategory&id='.$category['cat_id'].'" onclick="javascript: return confirmation(\''.Security::remove_XSS($category['cat_name']).'\');">'.Display::return_icon('delete.png', get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>';
$dropbox_category_data[] = '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=editcategory&id='.$category['cat_id'].'">'.Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'</a>
<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=deletereceivedcategory&id='.$category['cat_id'].'" onclick="javascript: return confirmation(\''.Security::remove_XSS($category['cat_name']).'\');">'.Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>';
}
if (is_array($dropbox_category_data) && count($dropbox_category_data) > 0) {
$dropbox_data_recieved[] = $dropbox_category_data;
@ -465,8 +465,8 @@ if ($action != 'add') {
);
if (is_array($movelist)) {
foreach ($movelist as $catid => $catname){
$selectlist['move_received_'.$catid] = get_lang('Move') . '->'. Security::remove_XSS($catname);
foreach ($movelist as $catid => $catname) {
$selectlist['move_received_'.$catid] = get_lang('Move').'->'.Security::remove_XSS($catname);
}
}
@ -560,7 +560,7 @@ if ($action != 'add') {
$link_open = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&id='.$dropbox_file->id.'">';
$dropbox_file_data[] = $link_open.DocumentManager::build_document_icon_tag('file', $dropbox_file->title).'</a>';
$dropbox_file_data[] = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&id='.$dropbox_file->id.'&action=download">'.
Display::return_icon('save.png', get_lang('Save'), array('style' => 'float:right;'),ICON_SIZE_SMALL).'</a>'.$link_open.$dropbox_file->title.'</a><br />'.$dropbox_file->description;
Display::return_icon('save.png', get_lang('Save'), array('style' => 'float:right;'), ICON_SIZE_SMALL).'</a>'.$link_open.$dropbox_file->title.'</a><br />'.$dropbox_file->description;
$file_size = $dropbox_file->filesize;
$dropbox_file_data[] = format_file_size($file_size);
$receivers_celldata = null;
@ -578,9 +578,9 @@ if ($action != 'add') {
$receivers_celldata = '';
$action_icons = check_number_feedback($dropbox_file->id, $number_feedback).' '.get_lang('Feedback').'
<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=viewfeedback&id='.$dropbox_file->id.'&'.$sort_params.'">'.Display::return_icon('discuss.png', get_lang('Comment'),'',ICON_SIZE_SMALL).'</a>
<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=movesent&move_id='.$dropbox_file->id.'&'.$sort_params.'">'.Display::return_icon('move.png', get_lang('Move'),'',ICON_SIZE_SMALL).'</a>
<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=deletesentfile&id='.$dropbox_file->id.'&'.$sort_params.'" onclick="javascript: return confirmation(\''.$dropbox_file->title.'\');">'.Display::return_icon('delete.png', get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>';
<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=viewfeedback&id='.$dropbox_file->id.'&'.$sort_params.'">'.Display::return_icon('discuss.png', get_lang('Comment'), '', ICON_SIZE_SMALL).'</a>
<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=movesent&move_id='.$dropbox_file->id.'&'.$sort_params.'">'.Display::return_icon('move.png', get_lang('Move'), '', ICON_SIZE_SMALL).'</a>
<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=deletesentfile&id='.$dropbox_file->id.'&'.$sort_params.'" onclick="javascript: return confirmation(\''.$dropbox_file->title.'\');">'.Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>';
// This is a hack to have an additional row in a sortable table
if ($action == 'viewfeedback' && isset($_GET['id']) && is_numeric($_GET['id']) && $dropbox_file->id == $_GET['id']) {
$action_icons .= "</td></tr>\n"; // ending the normal row of the sortable table
@ -609,16 +609,16 @@ if ($action != 'add') {
// This is where the checkbox icon for the files appear.
$link_open = '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$category['cat_id'].'&view='.$view.'">';
$dropbox_category_data[] = $link_open.DocumentManager::build_document_icon_tag('folder', Security::remove_XSS($category['cat_name'])).'</a>';
$dropbox_category_data[] = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&cat_id='.$category['cat_id'].'&action=downloadcategory&sent_received=sent">'.Display::return_icon('save_pack.png', get_lang('Save'), array('style' => 'float:right;'),ICON_SIZE_SMALL).'</a>'.$link_open.Security::remove_XSS($category['cat_name']).'</a>';
$dropbox_category_data[] = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&cat_id='.$category['cat_id'].'&action=downloadcategory&sent_received=sent">'.Display::return_icon('save_pack.png', get_lang('Save'), array('style' => 'float:right;'), ICON_SIZE_SMALL).'</a>'.$link_open.Security::remove_XSS($category['cat_name']).'</a>';
//$dropbox_category_data[] = '';
$dropbox_category_data[] = '';
//$dropbox_category_data[] = '';
$dropbox_category_data[] = '';
$dropbox_category_data[] = '';
$dropbox_category_data[] = '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=editcategory&id='.$category['cat_id'].'">'.
Display::return_icon('edit.png', get_lang('Edit'),'',ICON_SIZE_SMALL).'</a>
Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'</a>
<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=deletesentcategory&id='.$category['cat_id'].'" onclick="javascript: return confirmation(\''.Security::remove_XSS($category['cat_name']).'\');">'.
Display::return_icon('delete.png', get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>';
Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>';
}
if (is_array($dropbox_category_data) && count($dropbox_category_data) > 0) {
$dropbox_data_sent[] = $dropbox_category_data;
@ -640,7 +640,7 @@ if ($action != 'add') {
if (!empty($moveList)) {
foreach ($moveList as $catid => $catname) {
$selectlist['move_sent_'.$catid] = get_lang('Move') . '->'. Security::remove_XSS($catname);
$selectlist['move_sent_'.$catid] = get_lang('Move').'->'.Security::remove_XSS($catname);
}
}

@ -32,7 +32,7 @@ class HotSpot extends Question
* @param FormValidator $form
* @param int $fck_config
*/
public function createForm (&$form, $fck_config=0)
public function createForm(&$form, $fck_config = 0)
{
parent::createForm($form, $fck_config);
@ -50,7 +50,7 @@ class HotSpot extends Question
// Saving a question
$form->addButtonSave(get_lang('GoToQuestion'), 'submitQuestion');
//$form->addButtonSave(get_lang('GoToQuestion'), 'submitQuestion');
$form->addRule('imageUpload', get_lang('OnlyImagesAllowed'), 'filetype', array ('jpg', 'jpeg', 'png', 'gif'));
$form->addRule('imageUpload', get_lang('OnlyImagesAllowed'), 'filetype', array('jpg', 'jpeg', 'png', 'gif'));
$form->addRule('imageUpload', get_lang('NoImage'), 'uploadedfile');
} else {
// setting the save button here and not in the question class.php
@ -70,7 +70,7 @@ class HotSpot extends Question
$_course = api_get_course_info();
parent::processCreation($form, $objExercise);
if(!empty($file_info['tmp_name'])) {
if (!empty($file_info['tmp_name'])) {
$this->uploadPicture($file_info['tmp_name'], $file_info['name']);
$documentPath = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document';
$picturePath = $documentPath.'/images';
@ -114,25 +114,25 @@ class HotSpotDelineation extends HotSpot
}
function createForm(&$form, $fck_config=0)
function createForm(&$form, $fck_config = 0)
{
parent::createForm ($form, $fck_config);
parent::createForm($form, $fck_config);
}
function processCreation ($form, $objExercise = null)
function processCreation($form, $objExercise = null)
{
$file_info = $form -> getSubmitValue('imageUpload');
parent::processCreation ($form, $objExercise);
parent::processCreation($form, $objExercise);
}
function createAnswersForm ($form)
function createAnswersForm($form)
{
parent::createAnswersForm ($form);
parent::createAnswersForm($form);
}
function processAnswersCreation ($form)
function processAnswersCreation($form)
{
parent::processAnswersCreation ($form);
parent::processAnswersCreation($form);
}
}

@ -10,7 +10,7 @@
*/
if (isset($_GET['editQuestion'])) {
$objQuestion = Question::read ($_GET['editQuestion']);
$objQuestion = Question::read($_GET['editQuestion']);
$action = api_get_self()."?".api_get_cidreq()."&myid=1&modifyQuestion=".$modifyQuestion."&editQuestion=".$objQuestion->id;
} else {
$objQuestion = Question :: getInstance($_REQUEST['answerType']);

@ -24,7 +24,7 @@ if ($link->is_locked() && !api_is_platform_admin()) {
}
$linkcat = isset($_GET['selectcat']) ? (int) $_GET['selectcat'] : 0;
$linkedit = isset($_GET['editlink']) ? Security::remove_XSS($_GET['editlink']):'';
$linkedit = isset($_GET['editlink']) ? Security::remove_XSS($_GET['editlink']) : '';
$course_code = api_get_course_id();
$session_id = api_get_session_id();
@ -48,7 +48,7 @@ $form = new LinkAddEditForm(
null,
$link,
'edit_link_form',
api_get_self() . '?selectcat=' . $linkcat. '&editlink=' . $linkedit.'&'.api_get_cidreq()
api_get_self().'?selectcat='.$linkcat.'&editlink='.$linkedit.'&'.api_get_cidreq()
);
if ($form->validate()) {
$values = $form->exportValues();
@ -65,7 +65,7 @@ if ($form->validate()) {
//Update weight for attendance
$sql = 'SELECT ref_id FROM '.$tbl_grade_links.'
WHERE id = '.intval($_GET['editlink']).' AND type='.LINK_ATTENDANCE;
$rs_attendance = Database::query($sql);
$rs_attendance = Database::query($sql);
if (Database::num_rows($rs_attendance) > 0) {
$row_attendance = Database::fetch_array($rs_attendance);
$attendance_id = $row_attendance['ref_id'];
@ -104,7 +104,7 @@ if ($form->validate()) {
'type' => LINK_STUDENTPUBLICATION
]);
header('Location: '.$_SESSION['gradebook_dest'].'?linkedited=&selectcat=' . $link->get_category_id().'&'.api_get_cidreq());
header('Location: '.$_SESSION['gradebook_dest'].'?linkedited=&selectcat='.$link->get_category_id().'&'.api_get_cidreq());
exit;
}

@ -39,15 +39,15 @@ $sql = "SELECT lk.name,lk.description,lk.weight,lk.visible,lk.type,lk.created_at
FROM ".$t_link_log." lk inner join ".$t_user." us
ON lk.user_id_log=us.user_id
WHERE lk.id_linkeval_log=".$evaledit[0]->get_id()." AND lk.type='link';";
$result=Database::query($sql);
$list_info=array();
while ($row=Database::fetch_row($result)) {
$result = Database::query($sql);
$list_info = array();
while ($row = Database::fetch_row($result)) {
$list_info[] = $row;
}
foreach ($list_info as $key => $info_log) {
$list_info[$key][5]=($info_log[5]) ? api_convert_and_format_date($info_log[5]) : 'N/A';
$list_info[$key][3]=($info_log[3]==1) ? get_lang('GradebookVisible') : get_lang('GradebookInvisible');
$list_info[$key][5] = ($info_log[5]) ? api_convert_and_format_date($info_log[5]) : 'N/A';
$list_info[$key][3] = ($info_log[3] == 1) ? get_lang('GradebookVisible') : get_lang('GradebookInvisible');
}
$parameters = array(

@ -41,13 +41,13 @@ class DataForm extends FormValidator
protected function build_pdf_export_form()
{
$renderer =& $this->defaultRenderer();
$renderer = & $this->defaultRenderer();
$renderer->setCustomElementTemplate('<span>{element}</span>');
$this->addElement('header', get_lang('ChooseOrientation'));
$this->addElement('radio', 'orientation', null, get_lang('Portrait'), 'portrait');
$this->addElement('radio', 'orientation', null, get_lang('Landscape'), 'landscape');
$this->addButtonExport(get_lang('Export'));
$this->setDefaults(array (
$this->setDefaults(array(
'orientation' => 'portrait'
));
}
@ -59,12 +59,12 @@ class DataForm extends FormValidator
$this->addElement('radio', 'file_type', null, 'XML (Extensible Markup Language)', 'xml');
$this->addElement('radio', 'file_type', null, 'PDF (Portable Document Format)', 'pdf');
$this->addButtonExport(get_lang('Export'));
$this->setDefaults(array (
$this->setDefaults(array(
'file_type' => 'csv'
));
}
protected function build_export_form_option($show_pdf=true)
protected function build_export_form_option($show_pdf = true)
{
$this->addElement('header', get_lang('ChooseFormat'));
$this->addElement('radio', 'file_type', get_lang('OutputFileType'), 'CSV (Comma-Separated Values)', 'csv');
@ -78,7 +78,7 @@ class DataForm extends FormValidator
array('disabled')
);
$this->addButtonExport(get_lang('Export'));
$this->setDefaults(array (
$this->setDefaults(array(
'file_type' => 'csv'
));
}
@ -87,14 +87,14 @@ class DataForm extends FormValidator
{
$this->addElement('hidden', 'formSent');
$this->addElement('header', get_lang('ImportFileLocation'));
$this->addElement('file', 'import_file',get_lang('Location'));
$allowed_file_types = array (
$this->addElement('file', 'import_file', get_lang('Location'));
$allowed_file_types = array(
'xml',
'csv'
);
//$this->addRule('file', get_lang('InvalidExtension') . ' (' . implode(',', $allowed_file_types) . ')', 'filetype', $allowed_file_types);
$this->addElement('radio', 'file_type', get_lang('FileType'), 'CSV (<a href="docs/example_csv.html" target="_blank">' . get_lang('ExampleCSVFile') . '</a>)', 'csv');
$this->addElement('radio', 'file_type', null, 'XML (<a href="docs/example_xml.html" target="_blank">' . get_lang('ExampleXMLFile') . '</a>)', 'xml');
$this->addElement('radio', 'file_type', get_lang('FileType'), 'CSV (<a href="docs/example_csv.html" target="_blank">'.get_lang('ExampleCSVFile').'</a>)', 'csv');
$this->addElement('radio', 'file_type', null, 'XML (<a href="docs/example_xml.html" target="_blank">'.get_lang('ExampleXMLFile').'</a>)', 'xml');
$this->addElement('checkbox', 'overwrite', null, get_lang('OverwriteScores'));
$this->addElement('checkbox', 'ignoreerrors', null, get_lang('IgnoreErrors'));
$this->addButtonImport(get_lang('Ok'));

@ -56,7 +56,7 @@ class LinkForm extends FormValidator
protected function build_move()
{
$renderer =& $this->defaultRenderer();
$renderer = & $this->defaultRenderer();
$renderer->setCustomElementTemplate('<span>{element}</span> ');
$this->addElement(
'static',
@ -145,7 +145,7 @@ class LinkForm extends FormValidator
$link = LinkFactory::create($link);
if (!empty($courseCode)) {
$link->set_course_code($courseCode);
} elseif(!empty($_GET['course_code'])) {
} elseif (!empty($_GET['course_code'])) {
$link->set_course_code(Database::escape_string($_GET['course_code'], null, false));
}

@ -14,7 +14,7 @@ class GradeBookResult
/**
* constructor of the class
*/
public function __construct($get_questions=false,$get_answers=false)
public function __construct($get_questions = false, $get_answers = false)
{
}
@ -37,7 +37,7 @@ class GradeBookResult
foreach ($dato[0] as $header_col) {
if (!empty($header_col)) {
$data .= str_replace("\r\n",' ',api_html_entity_decode(strip_tags($header_col))).';';
$data .= str_replace("\r\n", ' ', api_html_entity_decode(strip_tags($header_col))).';';
}
}
@ -46,10 +46,10 @@ class GradeBookResult
for ($i = 0; $i < $cant_students; $i++) {
$column = 0;
foreach($dato[1][$i] as $col_name) {
$data .= str_replace("\r\n",' ',api_html_entity_decode(strip_tags($col_name))).';';
foreach ($dato[1][$i] as $col_name) {
$data .= str_replace("\r\n", ' ', api_html_entity_decode(strip_tags($col_name))).';';
}
$data .="\r\n";
$data .= "\r\n";
}
//output the results
@ -124,7 +124,7 @@ class GradeBookResult
*/
public function exportCompleteReportDOC($data)
{
$filename = 'gradebook_results_'.api_get_local_time() . '.docx';
$filename = 'gradebook_results_'.api_get_local_time().'.docx';
$doc = new \PhpOffice\PhpWord\PhpWord();
$section = $doc->addSection(['orientation' => 'landscape']);
@ -143,7 +143,7 @@ class GradeBookResult
}
}
$file = api_get_path(SYS_ARCHIVE_PATH) . api_replace_dangerous_char($filename);
$file = api_get_path(SYS_ARCHIVE_PATH).api_replace_dangerous_char($filename);
$doc->save($file, 'Word2007');
DocumentManager::file_send_for_download($file, true, $filename);

@ -84,7 +84,7 @@ switch ($action) {
foreach ($tab_parents_id as $parent_id) {
$Same_parent_LP_item_list = $LP_item_list->get_item_with_same_parent($parent_id);
$previous_item_id = 0;
for ($i=0; $i < count($Same_parent_LP_item_list->list); $i++) {
for ($i = 0; $i < count($Same_parent_LP_item_list->list); $i++) {
$item_id = $Same_parent_LP_item_list->list[$i]->id;
// display_order
$display_order = $i + 1;
@ -95,7 +95,7 @@ switch ($action) {
// next_item_id
$next_item_id = 0;
if ($i < count($Same_parent_LP_item_list->list) - 1) {
$next_item_id = $Same_parent_LP_item_list->list[$i+1]->id;
$next_item_id = $Same_parent_LP_item_list->list[$i + 1]->id;
}
$LP_item_list->set_parameters_for_id($item_id, $next_item_id, "next_item_id");
}

@ -283,7 +283,7 @@ function get_total_folder_size($path, $can_see_invisible = false)
'props.session_id'
);
$visibility_rule = ' props.visibility ' . ($can_see_invisible ? '<> 2' : '= 1');
$visibility_rule = ' props.visibility '.($can_see_invisible ? '<> 2' : '= 1');
$sql = "SELECT SUM(table1.size) FROM (
SELECT props.ref, size

@ -368,7 +368,7 @@ class Notification extends Model
$newMessageText = '';
$linkToNewMessage = Display::url(
get_lang('SeeMessage'),
api_get_path(WEB_CODE_PATH) . 'messages/inbox.php'
api_get_path(WEB_CODE_PATH).'messages/inbox.php'
);
break;
case self::NOTIFICATION_TYPE_MESSAGE:
@ -383,7 +383,7 @@ class Notification extends Model
}
$linkToNewMessage = Display::url(
get_lang('SeeMessage'),
api_get_path(WEB_CODE_PATH) . 'messages/inbox.php'
api_get_path(WEB_CODE_PATH).'messages/inbox.php'
);
break;
case self::NOTIFICATION_TYPE_INVITATION:
@ -398,7 +398,7 @@ class Notification extends Model
}
$linkToNewMessage = Display::url(
get_lang('SeeInvitation'),
api_get_path(WEB_CODE_PATH) . 'social/invitations.php'
api_get_path(WEB_CODE_PATH).'social/invitations.php'
);
break;
case self::NOTIFICATION_TYPE_GROUP:
@ -496,7 +496,7 @@ class Notification extends Model
}
$headers = [
'Authorization: key=' . $gdcApiKey,
'Authorization: key='.$gdcApiKey,
'Content-Type: application/json'
];

@ -426,7 +426,7 @@ class AppPlugin
// Extra options
$plugin_settings = api_get_settings_params(
array(
"subkey = ? AND category = ? AND type = ? " => array($plugin_name, 'Plugins','setting')
"subkey = ? AND category = ? AND type = ? " => array($plugin_name, 'Plugins', 'setting')
)
);
@ -532,7 +532,7 @@ class AppPlugin
if (!empty($obj->course_settings)) {
if (is_file(api_get_path(SYS_CODE_PATH).'img/icons/'.ICON_SIZE_SMALL.'/'.$plugin_name.'.png')) {
$icon = Display::return_icon(
$plugin_name . '.png',
$plugin_name.'.png',
Security::remove_XSS($pluginTitle),
'',
ICON_SIZE_SMALL
@ -548,18 +548,18 @@ class AppPlugin
$form->addHtml('<div class="panel panel-default">');
$form->addHtml('
<div class="panel-heading" role="tab" id="heading-' . $plugin_name . '-settings">
<div class="panel-heading" role="tab" id="heading-' . $plugin_name.'-settings">
<h4 class="panel-title">
<a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse-' . $plugin_name . '-settings" aria-expanded="false" aria-controls="collapse-' . $plugin_name . '-settings">
<a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse-' . $plugin_name.'-settings" aria-expanded="false" aria-controls="collapse-'.$plugin_name.'-settings">
');
$form->addHtml($icon . ' ' . $pluginTitle);
$form->addHtml($icon.' '.$pluginTitle);
$form->addHtml('
</a>
</h4>
</div>
');
$form->addHtml('
<div id="collapse-' . $plugin_name . '-settings" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading-' . $plugin_name . '-settings">
<div id="collapse-' . $plugin_name.'-settings" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading-'.$plugin_name.'-settings">
<div class="panel-body">
');

@ -91,7 +91,7 @@ if (isset($_SESSION['gradebook'])) {
}
if (!empty($gradebook) && $gradebook == 'view') {
$interbreadcrumb[] = array (
$interbreadcrumb[] = array(
'url' => '../gradebook/'.$_SESSION['gradebook_dest'],
'name' => get_lang('ToolGradebook')
);
@ -113,7 +113,7 @@ switch ($type) {
'url' => 'lp_controller.php?action=add_item&type=step&lp_id='.$learnPath->get_id().'&'.api_get_cidreq(),
'name' => get_lang('NewStep'),
);
$interbreadcrumb[]= array('url' => '#', 'name' => get_lang('NewChapter'));
$interbreadcrumb[] = array('url' => '#', 'name' => get_lang('NewChapter'));
break;
case 'document':
$interbreadcrumb[] = array(
@ -122,12 +122,12 @@ switch ($type) {
);
break;
default:
$interbreadcrumb[]= array('url' => '#', 'name' => get_lang('NewStep'));
$interbreadcrumb[] = array('url' => '#', 'name' => get_lang('NewStep'));
break;
}
if ($action == 'add_item' && $type == 'document') {
$interbreadcrumb[]= array ('url' => '#', 'name' => get_lang('NewDocumentCreated'));
$interbreadcrumb[] = array('url' => '#', 'name' => get_lang('NewDocumentCreated'));
}
// Theme calls.

@ -355,7 +355,7 @@ foreach ($categories as $item) {
if ($current_session == $details['lp_session']) {
$dsp_edit_lp = Display::url(
Display::return_icon('settings.png', get_lang('CourseSettings'), '', ICON_SIZE_SMALL),
"lp_controller.php?" . api_get_cidreq() . "&action=edit&lp_id=$id"
"lp_controller.php?".api_get_cidreq()."&action=edit&lp_id=$id"
);
} else {
$dsp_edit_lp = Display::return_icon(
@ -371,7 +371,7 @@ foreach ($categories as $item) {
if ($details['lp_type'] == 1 || $details['lp_type'] == 2) {
$dsp_build = Display::url(
Display::return_icon('edit.png', get_lang('LearnpathEditLearnpath'), '', ICON_SIZE_SMALL),
'lp_controller.php?' . api_get_cidreq() . '&' . http_build_query([
'lp_controller.php?'.api_get_cidreq().'&'.http_build_query([
'action' => 'add_item',
'type' => 'step',
'lp_id' => $id,
@ -405,19 +405,19 @@ foreach ($categories as $item) {
if ($details['lp_visibility'] == 0) {
$dsp_visible = Display::url(
Display::return_icon('invisible.png', get_lang('Show'), '', ICON_SIZE_SMALL),
api_get_self() . '?' . api_get_cidreq() . "&lp_id=$id&action=toggle_visible&new_status=1"
api_get_self().'?'.api_get_cidreq()."&lp_id=$id&action=toggle_visible&new_status=1"
);
} else {
$dsp_visible = Display::url(
Display::return_icon('visible.png', get_lang('Hide'), '', ICON_SIZE_SMALL),
api_get_self() . '?' . api_get_cidreq() . "&lp_id=$id&action=toggle_visible&new_status=0"
api_get_self().'?'.api_get_cidreq()."&lp_id=$id&action=toggle_visible&new_status=0"
);
}
}
//Tracking command
$trackingActionUrl = 'lp_controller.php?'
. api_get_cidreq() . '&'
. api_get_cidreq().'&'
. http_build_query([
'action' => 'report',
'lp_id' => $id,
@ -438,7 +438,7 @@ foreach ($categories as $item) {
'',
ICON_SIZE_SMALL
),
api_get_self() . '?' . api_get_cidreq() . "&lp_id=$id&action=toggle_publish&new_status=v"
api_get_self().'?'.api_get_cidreq()."&lp_id=$id&action=toggle_publish&new_status=v"
);
} else {
$dsp_publish = "<a href='".api_get_self()."?".api_get_cidreq()."&lp_id=$id&action=toggle_publish&new_status=i'>".
@ -455,7 +455,7 @@ foreach ($categories as $item) {
'',
ICON_SIZE_SMALL
),
api_get_self() . '?' . api_get_cidreq() . "&lp_id=$id&action=toggle_publish&new_status=i"
api_get_self().'?'.api_get_cidreq()."&lp_id=$id&action=toggle_publish&new_status=i"
);
}
} else {
@ -483,7 +483,7 @@ foreach ($categories as $item) {
'',
ICON_SIZE_SMALL
),
"lp_controller.php?" . api_get_cidreq() . "&action=switch_attempt_mode&lp_id=$id"
"lp_controller.php?".api_get_cidreq()."&action=switch_attempt_mode&lp_id=$id"
);
}
if ($details['seriousgame_mode'] == 0 && $details['lp_prevent_reinit'] == 1) { //single mode | next = multiple
@ -494,7 +494,7 @@ foreach ($categories as $item) {
'',
ICON_SIZE_SMALL
),
"lp_controller.php?" . api_get_cidreq() . "&action=switch_attempt_mode&lp_id=$id"
"lp_controller.php?".api_get_cidreq()."&action=switch_attempt_mode&lp_id=$id"
);
}
if ($details['seriousgame_mode'] == 0 && $details['lp_prevent_reinit'] == 0) { //multiple mode | next = seriousgame
@ -505,7 +505,7 @@ foreach ($categories as $item) {
'',
ICON_SIZE_SMALL
),
"lp_controller.php?" . api_get_cidreq() . "&action=switch_attempt_mode&lp_id=$id"
"lp_controller.php?".api_get_cidreq()."&action=switch_attempt_mode&lp_id=$id"
);
}
} else {
@ -528,8 +528,8 @@ foreach ($categories as $item) {
'',
ICON_SIZE_SMALL
),
'lp_controller.php?' . api_get_cidreq()
. '&action=switch_view_mode&lp_id=' . $id . $token_parameter
'lp_controller.php?'.api_get_cidreq()
. '&action=switch_view_mode&lp_id='.$id.$token_parameter
);
break;
case 'embedded':
@ -540,8 +540,8 @@ foreach ($categories as $item) {
'',
ICON_SIZE_SMALL
),
'lp_controller.php?' . api_get_cidreq()
. '&action=switch_view_mode&lp_id=' . $id . $token_parameter
'lp_controller.php?'.api_get_cidreq()
. '&action=switch_view_mode&lp_id='.$id.$token_parameter
);
break;
case 'embedframe':
@ -552,8 +552,8 @@ foreach ($categories as $item) {
'',
ICON_SIZE_SMALL
),
'lp_controller.php?' . api_get_cidreq()
. '&action=switch_view_mode&lp_id=' . $id . $token_parameter
'lp_controller.php?'.api_get_cidreq()
. '&action=switch_view_mode&lp_id='.$id.$token_parameter
);
break;
case 'impress':
@ -564,8 +564,8 @@ foreach ($categories as $item) {
'',
ICON_SIZE_SMALL
),
'lp_controller.php?' . api_get_cidreq()
. '&action=switch_view_mode&lp_id=' . $id . $token_parameter
'lp_controller.php?'.api_get_cidreq()
. '&action=switch_view_mode&lp_id='.$id.$token_parameter
);
break;
}
@ -597,7 +597,7 @@ foreach ($categories as $item) {
'',
ICON_SIZE_SMALL
),
"lp_controller.php?" . api_get_cidreq() . "&action=switch_scorm_debug&lp_id=$id"
"lp_controller.php?".api_get_cidreq()."&action=switch_scorm_debug&lp_id=$id"
);
} else {
$dsp_debug = Display::url(
@ -607,7 +607,7 @@ foreach ($categories as $item) {
'',
ICON_SIZE_SMALL
),
"lp_controller.php?" . api_get_cidreq() . "&action=switch_scorm_debug&lp_id=$id"
"lp_controller.php?".api_get_cidreq()."&action=switch_scorm_debug&lp_id=$id"
);
}
}
@ -660,7 +660,7 @@ foreach ($categories as $item) {
if ($details['subscribe_users'] == 1) {
$subscribeUsers = Display::url(
Display::return_icon('user.png', get_lang('SubscribeUsersToLp')),
api_get_path(WEB_CODE_PATH) . "lp/lp_subscribe_users.php?lp_id=$id&".api_get_cidreq()
api_get_path(WEB_CODE_PATH)."lp/lp_subscribe_users.php?lp_id=$id&".api_get_cidreq()
);
}
@ -670,12 +670,12 @@ foreach ($categories as $item) {
$autolaunch_exists = true;
$lp_auto_launch_icon = Display::url(
Display::return_icon('launch.png', get_lang('DisableLPAutoLaunch')),
api_get_self() . '?' . api_get_cidreq() . "&action=auto_launch&status=0&lp_id=$id"
api_get_self().'?'.api_get_cidreq()."&action=auto_launch&status=0&lp_id=$id"
);
} else {
$lp_auto_launch_icon = Display::url(
Display::return_icon('launch_na.png', get_lang('EnableLPAutoLaunch')),
api_get_self() . '?' . api_get_cidreq() . "&action=auto_launch&status=1&lp_id=$id"
api_get_self().'?'.api_get_cidreq()."&action=auto_launch&status=1&lp_id=$id"
);
}
}
@ -688,7 +688,7 @@ foreach ($categories as $item) {
'',
ICON_SIZE_SMALL
),
api_get_self() . '?' . api_get_cidreq() . "&action=export_to_pdf&lp_id=$id"
api_get_self().'?'.api_get_cidreq()."&action=export_to_pdf&lp_id=$id"
);
/* Delete */
@ -700,8 +700,8 @@ foreach ($categories as $item) {
'',
ICON_SIZE_SMALL
),
'lp_controller.php?' . api_get_cidreq() . "&action=delete&lp_id=$id",
['onclick' => "javascript: return confirmation('" . addslashes($name) . "');"]
'lp_controller.php?'.api_get_cidreq()."&action=delete&lp_id=$id",
['onclick' => "javascript: return confirmation('".addslashes($name)."');"]
);
} else {
$dsp_delete = Display::return_icon(
@ -718,23 +718,23 @@ foreach ($categories as $item) {
if ($details['lp_display_order'] == 1 && $max != 1) {
$dsp_order .= Display::url(
Display::return_icon('down.png', get_lang('MoveDown'), '', ICON_SIZE_SMALL),
"lp_controller.php?" . api_get_cidreq() . "&action=move_lp_down&lp_id=$id"
"lp_controller.php?".api_get_cidreq()."&action=move_lp_down&lp_id=$id"
);
} elseif ($current == $max - 1 && $max != 1) {
$dsp_order .= Display::url(
Display::return_icon('up.png', get_lang('MoveUp'), '', ICON_SIZE_SMALL),
"lp_controller.php?" . api_get_cidreq() . "&action=move_lp_up&lp_id=$id"
"lp_controller.php?".api_get_cidreq()."&action=move_lp_up&lp_id=$id"
);
} elseif ($max == 1) {
$dsp_order = '';
} else {
$dsp_order .= Display::url(
Display::return_icon('down.png', get_lang('MoveDown'), '', ICON_SIZE_SMALL),
"lp_controller.php?" . api_get_cidreq() . "&action=move_lp_down&lp_id=$id"
"lp_controller.php?".api_get_cidreq()."&action=move_lp_down&lp_id=$id"
);
$dsp_order .= Display::url(
Display::return_icon('up.png', get_lang('MoveUp'), '', ICON_SIZE_SMALL),
"lp_controller.php?" . api_get_cidreq() . "&action=move_lp_up&lp_id=$id"
"lp_controller.php?".api_get_cidreq()."&action=move_lp_up&lp_id=$id"
);
}
}
@ -750,7 +750,7 @@ foreach ($categories as $item) {
if ($details['seriousgame_mode'] == 0) {
$actionSeriousGame = Display::toolbarButton(
null,
api_get_self() . '?' . api_get_cidreq() . "&lp_id=$id&action=toggle_seriousgame",
api_get_self().'?'.api_get_cidreq()."&lp_id=$id&action=toggle_seriousgame",
'trophy',
'default',
[
@ -761,7 +761,7 @@ foreach ($categories as $item) {
} else {
$actionSeriousGame = Display::toolbarButton(
null,
api_get_self() . '?' . api_get_cidreq() . "&lp_id=$id&action=toggle_seriousgame",
api_get_self().'?'.api_get_cidreq()."&lp_id=$id&action=toggle_seriousgame",
'trophy',
'warning',
[
@ -775,7 +775,7 @@ foreach ($categories as $item) {
// Student
$export_icon = Display::url(
Display::return_icon('pdf.png', get_lang('ExportToPDF'), '', ICON_SIZE_SMALL),
api_get_self() . '?' . api_get_cidreq() . "&action=export_to_pdf&lp_id=$id"
api_get_self().'?'.api_get_cidreq()."&action=export_to_pdf&lp_id=$id"
);
}

@ -24,7 +24,7 @@ if (api_get_setting('allow_message_tool') !== 'true') {
$nameTools = api_xml_http_response_encode(get_lang('Messages'));
/* Constants and variables */
$htmlHeadXtra[]='
$htmlHeadXtra[] = '
<script>
function validate(form, list) {
if(list.selectedIndex<0) {
@ -82,7 +82,7 @@ function show_compose_reply_to_message($message_id, $receiver_id)
FROM $table_message
WHERE user_receiver_id = ".intval($receiver_id)." AND id='".intval($message_id)."';";
$result = Database::query($query);
$row = Database::fetch_array($result,'ASSOC');
$row = Database::fetch_array($result, 'ASSOC');
if (!isset($row['user_sender_id'])) {
$html = get_lang('InvalidMessageId');
@ -95,7 +95,7 @@ function show_compose_reply_to_message($message_id, $receiver_id)
return $html;
}
function show_compose_to_user ($receiver_id)
function show_compose_to_user($receiver_id)
{
$userInfo = api_get_user_info($receiver_id);
$html = get_lang('To').':&nbsp;<strong>'.$userInfo['complete_name'].'</strong>';
@ -109,7 +109,7 @@ function show_compose_to_user ($receiver_id)
function manage_form($default, $select_from_user_list = null, $sent_to = null)
{
$group_id = isset($_REQUEST['group_id']) ? intval($_REQUEST['group_id']) : null;
$message_id = isset($_GET['message_id']) ? intval($_GET['message_id']) : null;
$message_id = isset($_GET['message_id']) ? intval($_GET['message_id']) : null;
$param_f = isset($_GET['f']) && $_GET['f'] == 'social' ? 'social' : null;
$form = new FormValidator(
@ -133,7 +133,7 @@ function manage_form($default, $select_from_user_list = null, $sent_to = null)
);
$form->addRule('id_text_name', get_lang('ThisFieldIsRequired'), 'required');
$form->addElement('html', '<div id="id_div_search" style="padding:0px" class="message-select-box" >&nbsp;</div>');
$form->addElement('hidden','user_list', 0, array('id'=>'user_list'));
$form->addElement('hidden', 'user_list', 0, array('id'=>'user_list'));
} else {
if (!empty($sent_to)) {
$form->addLabel(get_lang('SendMessageTo'), $sent_to);
@ -147,7 +147,7 @@ function manage_form($default, $select_from_user_list = null, $sent_to = null)
array(),
[
'multiple' => 'multiple',
'url' => api_get_path(WEB_AJAX_PATH) . 'message.ajax.php?a=find_users'
'url' => api_get_path(WEB_AJAX_PATH).'message.ajax.php?a=find_users'
]
);
} else {
@ -211,7 +211,7 @@ function manage_form($default, $select_from_user_list = null, $sent_to = null)
$form->addLabel(
'',
'<span id="link-more-attach"><a href="javascript://" onclick="return add_image_form()">'.get_lang('AddOneMoreFile').'</a></span>&nbsp;('.sprintf(get_lang('MaximunFileSizeX'),format_file_size(api_get_setting('message_max_upload_filesize'))).')'
'<span id="link-more-attach"><a href="javascript://" onclick="return add_image_form()">'.get_lang('AddOneMoreFile').'</a></span>&nbsp;('.sprintf(get_lang('MaximunFileSizeX'), format_file_size(api_get_setting('message_max_upload_filesize'))).')'
);
}
@ -233,7 +233,7 @@ function manage_form($default, $select_from_user_list = null, $sent_to = null)
$content = $default['content'];
$group_id = isset($default['group_id']) ? $default['group_id'] : null;
$parent_id = isset($default['parent_id']) ? $default['parent_id'] : null;
if (is_array($user_list) && count($user_list)> 0) {
if (is_array($user_list) && count($user_list) > 0) {
//all is well, send the message
foreach ($user_list as $userId) {
$res = MessageManager::send_message(
@ -248,7 +248,7 @@ function manage_form($default, $select_from_user_list = null, $sent_to = null)
if ($res) {
$userInfo = api_get_user_info($userId);
Display::addFlash(Display::return_message(
get_lang('MessageSentTo') ."&nbsp;<b>" .$userInfo['complete_name'] ."</b>",
get_lang('MessageSentTo')."&nbsp;<b>".$userInfo['complete_name']."</b>",
'confirmation',
false
));
@ -291,9 +291,9 @@ $social_right_content = null;
if ($group_id != 0) {
$social_right_content .= '<div class=actions>';
$social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/social/group_view.php?id='.$group_id.'">'.
Display::return_icon('back.png',api_xml_http_response_encode(get_lang('ComposeMessage'))).'</a>';
Display::return_icon('back.png', api_xml_http_response_encode(get_lang('ComposeMessage'))).'</a>';
$social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php?group_id='.$group_id.'">'.
Display::return_icon('message_new.png',api_xml_http_response_encode(get_lang('ComposeMessage'))).'</a>';
Display::return_icon('message_new.png', api_xml_http_response_encode(get_lang('ComposeMessage'))).'</a>';
$social_right_content .= '</div>';
} else {
if ($socialToolIsActive) {
@ -305,11 +305,11 @@ if ($group_id != 0) {
}
if (api_get_setting('allow_message_tool') === 'true') {
$social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php">'.
Display::return_icon('message_new.png',get_lang('ComposeMessage')).'</a>';
Display::return_icon('message_new.png', get_lang('ComposeMessage')).'</a>';
$social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.
Display::return_icon('inbox.png',get_lang('Inbox')).'</a>';
Display::return_icon('inbox.png', get_lang('Inbox')).'</a>';
$social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/outbox.php">'.
Display::return_icon('outbox.png',get_lang('Outbox')).'</a>';
Display::return_icon('outbox.png', get_lang('Outbox')).'</a>';
}
$social_right_content .= '</div>';
}
@ -323,21 +323,21 @@ if (api_get_setting('allow_social_tool') == 'true') {
$social_right_content .= '<div class="row">';
$social_right_content .= '<div class="col-md-12">';
$social_right_content .= '<div class="actions">';
$social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php?f=social">'.
$social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php?f=social">'.
Display::return_icon('back.png', get_lang('Back'), array(), 32).'</a>';
$social_right_content .= '</div>';
$social_right_content .= '</div>';
$social_right_content .= '</div>';
$social_right_content .= '</div>';
$social_right_content .= '<div class="col-md-12">';
}
// MAIN CONTENT
if (!isset($_POST['compose'])) {
if(isset($_GET['re_id'])) {
if (isset($_GET['re_id'])) {
$social_right_content .= show_compose_reply_to_message(
$_GET['re_id'],
api_get_user_id()
);
} elseif(isset($_GET['send_to_user'])) {
} elseif (isset($_GET['send_to_user'])) {
$social_right_content .= show_compose_to_user($_GET['send_to_user']);
} else {
$social_right_content .= show_compose_to_any(api_get_user_id());
@ -348,7 +348,7 @@ if (!isset($_POST['compose'])) {
$restrict = true;
} elseif (isset($_POST['group_id'])) {
$restrict = true;
} elseif(isset($_POST['hidden_user'])) {
} elseif (isset($_POST['hidden_user'])) {
$restrict = true;
}
@ -371,13 +371,13 @@ if (!isset($_POST['compose'])) {
}
$social_right_content .= manage_form($default);
} else {
$social_right_content .= Display::return_message(get_lang('ErrorSendingMessage'),'error');
$social_right_content .= Display::return_message(get_lang('ErrorSendingMessage'), 'error');
}
}
}
if (api_get_setting('allow_social_tool') === 'true') {
$social_right_content .= '</div>';
$social_right_content .= '</div>';
$social_right_content .= '</div>';
$social_right_content .= '</div>';
}
$tpl = new Template(get_lang('ComposeMessage'));

@ -31,7 +31,7 @@ if (isset($_GET["user_id"]) && $_GET["user_id"] != "" && !isset($_GET["type"]))
);
}
if (isset($_GET["user_id"]) && $_GET["user_id"]!="" && isset($_GET["type"]) && $_GET["type"] == "coach") {
if (isset($_GET["user_id"]) && $_GET["user_id"] != "" && isset($_GET["type"]) && $_GET["type"] == "coach") {
$interbreadcrumb[] = array("url" => "coaches.php", "name" => get_lang('Tutors'));
}
@ -167,7 +167,7 @@ function get_users($from, $limit, $column, $direction)
$detailsLink = '<a href="myStudents.php?student='.$student_id.'&id_coach='.$coach_id.'&id_session='.$sessionId.'">
'.Display::return_icon('2rightarrow.png').'</a>';
} else {
$detailsLink = '<a href="myStudents.php?student='.$student_id.'">
$detailsLink = '<a href="myStudents.php?student='.$student_id.'">
'.Display::return_icon('2rightarrow.png').'</a>';
}
@ -239,7 +239,7 @@ if (api_is_drh()) {
);
$actionsLeft .= Display::url(
Display::return_icon("statistics.png", get_lang("CompanyReport"), array(), ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH) . "mySpace/company_reports.php"
api_get_path(WEB_CODE_PATH)."mySpace/company_reports.php"
);
$actionsLeft .= Display::url(
Display::return_icon(
@ -248,7 +248,7 @@ if (api_is_drh()) {
[],
ICON_SIZE_MEDIUM
),
api_get_path(WEB_CODE_PATH) . "gradebook/certificate_report.php"
api_get_path(WEB_CODE_PATH)."gradebook/certificate_report.php"
);
}

@ -86,31 +86,31 @@ function validate_text_empty (str,msg) {
</script>';
$allowed_views = array('mygroups','newest','pop');
$allowed_views = array('mygroups', 'newest', 'pop');
$content = null;
if (isset($_GET['view']) && in_array($_GET['view'],$allowed_views)) {
if (isset($_GET['view']) && in_array($_GET['view'], $allowed_views)) {
if ($_GET['view'] == 'mygroups') {
$interbreadcrumb[]= array ('url' =>'groups.php','name' => get_lang('Groups'));
$interbreadcrumb[]= array ('url' =>'#','name' => get_lang('MyGroups'));
} else if ( $_GET['view'] == 'newest') {
$interbreadcrumb[]= array ('url' =>'groups.php','name' => get_lang('Groups'));
$interbreadcrumb[]= array ('url' =>'#','name' => get_lang('Newest'));
} else {
$interbreadcrumb[]= array ('url' =>'groups.php','name' => get_lang('Groups'));
$interbreadcrumb[]= array ('url' =>'#','name' => get_lang('Popular'));
$interbreadcrumb[] = array('url' =>'groups.php', 'name' => get_lang('Groups'));
$interbreadcrumb[] = array('url' =>'#', 'name' => get_lang('MyGroups'));
} else if ($_GET['view'] == 'newest') {
$interbreadcrumb[] = array('url' =>'groups.php', 'name' => get_lang('Groups'));
$interbreadcrumb[] = array('url' =>'#', 'name' => get_lang('Newest'));
} else {
$interbreadcrumb[] = array('url' =>'groups.php', 'name' => get_lang('Groups'));
$interbreadcrumb[] = array('url' =>'#', 'name' => get_lang('Popular'));
}
} else {
$interbreadcrumb[]= array ('url' =>'groups.php','name' => get_lang('Groups'));
$interbreadcrumb[] = array('url' =>'groups.php', 'name' => get_lang('Groups'));
if (!isset($_GET['id'])) {
$interbreadcrumb[]= array ('url' =>'#','name' => get_lang('GroupList'));
$interbreadcrumb[] = array('url' =>'#', 'name' => get_lang('GroupList'));
} else {
//$interbreadcrumb[]= array ('url' =>'#','name' => get_lang('Group'));
}
}
// getting group information
$group_id = isset($_GET['id']) ? intval($_GET['id']) : null;
$group_id = isset($_GET['id']) ? intval($_GET['id']) : null;
$relation_group_title = '';
$role = 0;
@ -120,9 +120,9 @@ if ($group_id != 0) {
$group_info = $usergroup->get($group_id);
$interbreadcrumb[]= array ('url' =>'#','name' => $group_info['name']);
$interbreadcrumb[] = array('url' =>'#', 'name' => $group_info['name']);
if (isset($_GET['action']) && $_GET['action']=='leave') {
if (isset($_GET['action']) && $_GET['action'] == 'leave') {
$user_leaved = intval($_GET['u']);
// I can "leave me myself"
if (api_get_user_id() == $user_leaved) {
@ -136,7 +136,7 @@ if ($group_id != 0) {
}
// add a user to a group if its open
if (isset($_GET['action']) && $_GET['action']=='join') {
if (isset($_GET['action']) && $_GET['action'] == 'join') {
// we add a user only if is a open group
$user_join = intval($_GET['u']);
if (api_get_user_id() == $user_join && !empty($group_id)) {
@ -165,7 +165,7 @@ $socialForum = '';
$group_info = $usergroup->get($group_id);
//Loading group information
if (isset($_GET['status']) && $_GET['status']=='sent') {
if (isset($_GET['status']) && $_GET['status'] == 'sent') {
$social_right_content .= Display::return_message(get_lang('MessageHasBeenSent'), 'confirmation', false);
}
@ -174,7 +174,7 @@ $role = $usergroup->get_user_group_role(api_get_user_id(), $group_id);
if (!$is_group_member && $group_info['visibility'] == GROUP_PERMISSION_CLOSED) {
if ($role == GROUP_USER_PERMISSION_PENDING_INVITATION_SENT_BY_USER) {
$social_right_content .= Display::return_message(get_lang('YouAlreadySentAnInvitation'));
$social_right_content .= Display::return_message(get_lang('YouAlreadySentAnInvitation'));
}
}
@ -185,19 +185,19 @@ if ($is_group_member || $group_info['visibility'] == GROUP_PERMISSION_OPEN) {
) {
$social_right_content .= '<div class="group-tool">';
$social_right_content .= '<div class="pull-right">';
$social_right_content .= '<a class="btn btn-default btn-sm" href="group_view.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'.
$social_right_content .= '<a class="btn btn-default btn-sm" href="group_view.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'.
get_lang('JoinGroup').'</a>';
$social_right_content .= '</div>';
$social_right_content .= '</div>';
$social_right_content .= '</div>';
$social_right_content .= '</div>';
} elseif ($role == GROUP_USER_PERMISSION_PENDING_INVITATION) {
$social_right_content .= '<div class="group-tool">';
$social_right_content .= '<div class="pull-right">';
$social_right_content .= '<a class="btn btn-default btn-sm" href="group_view.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'.
$social_right_content .= '<a class="btn btn-default btn-sm" href="group_view.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'.
Display::returnFontAwesomeIcon('envelope').' '.
get_lang('YouHaveBeenInvitedJoinNow').'</a>';
}
$social_right_content .= '</div>';
$social_right_content .= '</div>';
$social_right_content .= '</div>';
$social_right_content .= '</div>';
}
$content = MessageManager::display_messages_for_group($group_id);
if ($is_group_member) {
@ -211,7 +211,7 @@ if ($is_group_member || $group_info['visibility'] == GROUP_PERMISSION_OPEN) {
'action' => 'add_message_group'
]);
$create_thread_link = Display::url(
Display::returnFontAwesomeIcon('commenting') . ' ' .
Display::returnFontAwesomeIcon('commenting').' '.
get_lang('YouShouldCreateATopic'),
$createThreadUrl,
[
@ -231,7 +231,7 @@ if ($is_group_member || $group_info['visibility'] == GROUP_PERMISSION_OPEN) {
'action' => 'add_message_group',
]);
$create_thread_link = Display::url(
Display::returnFontAwesomeIcon('commenting') . ' ' .
Display::returnFontAwesomeIcon('commenting').' '.
get_lang('NewTopic'),
$createThreadUrl,
[
@ -271,21 +271,21 @@ if ($is_group_member || $group_info['visibility'] == GROUP_PERMISSION_OPEN) {
foreach ($members as $member) {
// if is a member
if (in_array($member['relation_type'],
array(GROUP_USER_PERMISSION_ADMIN, GROUP_USER_PERMISSION_READER,GROUP_USER_PERMISSION_MODERATOR))
array(GROUP_USER_PERMISSION_ADMIN, GROUP_USER_PERMISSION_READER, GROUP_USER_PERMISSION_MODERATOR))
) {
//add icons
if ($member['relation_type'] == GROUP_USER_PERMISSION_ADMIN) {
$icon= Display::return_icon('social_group_admin.png', get_lang('Admin'));
$icon = Display::return_icon('social_group_admin.png', get_lang('Admin'));
} elseif ($member['relation_type'] == GROUP_USER_PERMISSION_MODERATOR) {
$icon= Display::return_icon('social_group_moderator.png', get_lang('Moderator'));
$icon = Display::return_icon('social_group_moderator.png', get_lang('Moderator'));
} else {
$icon= '';
$icon = '';
}
$userPicture = UserManager::getUserPicture($member['id']);
$member_content .= '<div class="col-md-3">';
$member_content .= '<div class="items-user">';
$member_name = Display::url(api_get_person_name(cut($member['user_info']['firstname'],15),cut($member['user_info']['lastname'],15)).'&nbsp;'.$icon, $member['user_info']['profile_url']);
$member_name = Display::url(api_get_person_name(cut($member['user_info']['firstname'], 15), cut($member['user_info']['lastname'], 15)).'&nbsp;'.$icon, $member['user_info']['profile_url']);
$member_content .= Display::div('<img class="img-circle" src="'.$userPicture.'"/>', array('class' => 'avatar'));
$member_content .= Display::div($member_name, array('class' => 'name'));
$member_content .= '</div>';
@ -297,10 +297,10 @@ if ($is_group_member || $group_info['visibility'] == GROUP_PERMISSION_OPEN) {
}
if (!empty($create_thread_link)) {
$create_thread_link = Display::div($create_thread_link, array('class'=>'pull-right'));
$create_thread_link = Display::div($create_thread_link, array('class'=>'pull-right'));
}
$headers = array(get_lang('Discussions'), get_lang('Members'));
$socialForum = Display::tabs($headers, array($content, $member_content),'tabs');
$socialForum = Display::tabs($headers, array($content, $member_content), 'tabs');
} else {
// if I already sent an invitation message
@ -312,9 +312,9 @@ if ($is_group_member || $group_info['visibility'] == GROUP_PERMISSION_OPEN) {
)
)
) {
$social_right_content .= '<a class="btn" href="group_view.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'.get_lang('JoinGroup').'</a>';
$social_right_content .= '<a class="btn" href="group_view.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'.get_lang('JoinGroup').'</a>';
} elseif ($role == GROUP_USER_PERMISSION_PENDING_INVITATION) {
$social_right_content .= '<a class="btn" href="group_view.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'.get_lang('YouHaveBeenInvitedJoinNow').'</a>';
$social_right_content .= '<a class="btn" href="group_view.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'.get_lang('YouHaveBeenInvitedJoinNow').'</a>';
}
}

@ -11,9 +11,9 @@
*/
$_course = api_get_course_info();
$courseDir = $_course['path'] . "/document";
$courseDir = $_course['path']."/document";
$sys_course_path = api_get_path(SYS_COURSE_PATH);
$base_work_dir = $sys_course_path . $courseDir;
$base_work_dir = $sys_course_path.$courseDir;
$noPHP_SELF = true;
$max_filled_space = DocumentManager::get_course_quota();
@ -35,12 +35,12 @@ if (!DocumentManager::get_document_id($_course, $path)) {
*/
$nameTools = get_lang('UplUploadDocument');
$interbreadcrumb[] = array(
"url" => api_get_path(WEB_CODE_PATH)."document/document.php?curdirpath=" . urlencode($path) . '&'.api_get_cidreq(),
"url" => api_get_path(WEB_CODE_PATH)."document/document.php?curdirpath=".urlencode($path).'&'.api_get_cidreq(),
"name" => $langDocuments
);
Display::display_header($nameTools, "Doc");
//show the title
api_display_tool_title($nameTools . $add_group_to_title);
api_display_tool_title($nameTools.$add_group_to_title);
/**
* Process
@ -74,7 +74,7 @@ if (isset($_FILES['user_upload'])) {
if ($new_title) {
$ct .= ", title='$new_title'";
}
Database::query("UPDATE $table_document SET" . substr($ct, 1) ." WHERE id = '$docid'");
Database::query("UPDATE $table_document SET".substr($ct, 1)." WHERE id = '$docid'");
}
//check for missing images in html files
$missing_files = check_for_missing_files($base_work_dir.$_POST['curdirpath'].$new_path);
@ -124,14 +124,14 @@ if (isset($_POST['submit_image'])) {
replace_img_path_in_html_file(
$_POST['img_file_path'],
$paths_to_replace_in_file,
$base_work_dir . $_POST['related_file']
$base_work_dir.$_POST['related_file']
);
//update parent folders
item_property_update_on_folder($_course, $_POST['curdirpath'], $_user['user_id']);
}
}
//they want to create a directory
if (isset($_POST['create_dir']) && $_POST['dirname']!='') {
if (isset($_POST['create_dir']) && $_POST['dirname'] != '') {
$added_slash = $path == '/' ? '' : '/';
$dir_name = $path.$added_slash.api_replace_dangerous_char($_POST['dirname']);
$created_dir = create_unexisting_directory(
@ -156,7 +156,7 @@ if (isset($_GET['createdir'])) {
//create the form that asks for the directory name
$new_folder_text = '<form action="'.api_get_self().'" method="POST">';
$new_folder_text .= '<input type="hidden" name="curdirpath" value="'.$path.'"/>';
$new_folder_text .= get_lang('NewDir') .' ';
$new_folder_text .= get_lang('NewDir').' ';
$new_folder_text .= '<input type="text" name="dirname"/>';
$new_folder_text .= '<input type="submit" name="create_dir" value="'.get_lang('Ok').'"/>';
$new_folder_text .= '</form>';
@ -167,7 +167,7 @@ if (isset($_GET['createdir'])) {
<p>
<a href="<?php echo api_get_self(); ?>?path=<?php echo $path; ?>&amp;createdir=1">
<?php echo Display::return_icon('new_folder.gif'); ?>
<?php echo(get_lang('CreateDir'));?>
<?php echo(get_lang('CreateDir')); ?>
</a>
</p>
<?php
@ -190,11 +190,11 @@ if (isset($_GET['createdir'])) {
</td>
</tr>
<tr>
<td><?php echo get_lang('Title');?></td>
<td><?php echo get_lang('Title'); ?></td>
<td><input type="text" size="20" name="title" style="width:300px;"></td>
</tr>
<tr>
<td valign="top"><?php echo get_lang('Comment');?></td>
<td valign="top"><?php echo get_lang('Comment'); ?></td>
<td><textarea rows="3" cols="20" name="comment" wrap="virtual" style="width:300px;"></textarea></td>
</tr>
<tr>
@ -202,21 +202,21 @@ if (isset($_GET['createdir'])) {
<?php echo get_lang('Options'); ?>
</td>
<td>
- <input type="checkbox" name="unzip" value="1" onclick="check_unzip()"/> <?php echo(get_lang('Uncompress'));?><br/>
- <?php echo (get_lang('UplWhatIfFileExists'));?><br/>
&nbsp;&nbsp;&nbsp;<input type="radio" name="if_exists" value="nothing" title="<?php echo (get_lang('UplDoNothingLong'));?>" checked="checked"/> <?php echo (get_lang('UplDoNothing'));?><br/>
&nbsp;&nbsp;&nbsp;<input type="radio" name="if_exists" value="overwrite" title="<?php echo (get_lang('UplOverwriteLong'));?>"/> <?php echo (get_lang('UplOverwrite'));?><br/>
&nbsp;&nbsp;&nbsp;<input type="radio" name="if_exists" value="rename" title="<?php echo (get_lang('UplRenameLong'));?>"/> <?php echo (get_lang('UplRename'));?>
- <input type="checkbox" name="unzip" value="1" onclick="check_unzip()"/> <?php echo(get_lang('Uncompress')); ?><br/>
- <?php echo (get_lang('UplWhatIfFileExists')); ?><br/>
&nbsp;&nbsp;&nbsp;<input type="radio" name="if_exists" value="nothing" title="<?php echo (get_lang('UplDoNothingLong')); ?>" checked="checked"/> <?php echo (get_lang('UplDoNothing')); ?><br/>
&nbsp;&nbsp;&nbsp;<input type="radio" name="if_exists" value="overwrite" title="<?php echo (get_lang('UplOverwriteLong')); ?>"/> <?php echo (get_lang('UplOverwrite')); ?><br/>
&nbsp;&nbsp;&nbsp;<input type="radio" name="if_exists" value="rename" title="<?php echo (get_lang('UplRenameLong')); ?>"/> <?php echo (get_lang('UplRename')); ?>
</td>
</tr>
</table>
<input type="submit" value="<?php echo(get_lang('Ok'));?>">
<input type="submit" value="<?php echo(get_lang('Ok')); ?>">
</form>
<!-- end upload form -->
<!-- so they can get back to the documents -->
<p><?php echo (get_lang('Back'));?> <?php echo (get_lang('To'));?> <a href="document.php?curdirpath=<?php echo $path; ?>"><?php echo (get_lang('DocumentsOverview'));?></a></p>
<p><?php echo (get_lang('Back')); ?> <?php echo (get_lang('To')); ?> <a href="document.php?curdirpath=<?php echo $path; ?>"><?php echo (get_lang('DocumentsOverview')); ?></a></p>
<?php
Display::display_footer();

@ -7,7 +7,7 @@
/**
* Init
*/
require_once __DIR__ . '/../config.php';
require_once __DIR__.'/../config.php';
// start plugin
$plugin = AdvancedSubscriptionPlugin::create();
// Session ID
@ -24,7 +24,7 @@ $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);
$isAllowToDoRequest = $plugin->isAllowedToDoRequest($data['studentUserId'], $data, true);
if (!$isAllowToDoRequest) {
$tpl->assign('errorMessages', $plugin->getErrorMessages());

@ -6,4 +6,4 @@
* @package chamilo.plugin.createDrupalUser
*/
require_once api_get_path(SYS_PATH) . 'main/inc/global.inc.php';
require_once api_get_path(SYS_PATH).'main/inc/global.inc.php';

@ -24,19 +24,19 @@
* @licence http://www.gnu.org/licenses/gpl.txt
*/
require_once __DIR__ . '/../../main/inc/global.inc.php';
require_once __DIR__ . '/lib/pens.php';
require_once __DIR__ . '/chamilo_pens.php';
require_once __DIR__.'/../../main/inc/global.inc.php';
require_once __DIR__.'/lib/pens.php';
require_once __DIR__.'/chamilo_pens.php';
class ChamiloPackageHandler extends PENSPackageHandler {
public function processPackage($request, $path_to_package) {
$server = PENSServer::singleton();
// Moves the package to archive/pens
$path_to_archives = api_get_path(SYS_ARCHIVE_PATH) . 'pens';
if(!is_dir($path_to_archives)) {
$path_to_archives = api_get_path(SYS_ARCHIVE_PATH).'pens';
if (!is_dir($path_to_archives)) {
mkdir($path_to_archives, 0777, true);
}
rename($path_to_package, $path_to_archives . '/' . $request->getFilename());
rename($path_to_package, $path_to_archives.'/'.$request->getFilename());
// Insert the request in the database
$chamilo_pens = new ChamiloPens($request);
$chamilo_pens->save();

@ -40,7 +40,7 @@ if ((api_get_setting('showonline', 'world') == 'true' && !$_user['user_id']) ||
if (!isset($_GET['id'])) {
if (api_get_setting('allow_social_tool') == 'true') {
if (!api_is_anonymous()) {
$query = isset($_GET['q']) ? $_GET['q']: null;
$query = isset($_GET['q']) ? $_GET['q'] : null;
$social_search = UserManager::get_search_form($query);
}
}

Loading…
Cancel
Save