Merge branch '1.11.x' of https://github.com/chamilo/chamilo-lms into 1.11.x

pull/2487/head
Alex Aragon 9 years ago
commit 116bf426dd
  1. 1
      app/Migrations/Schema/V111/Version111.php
  2. 39
      app/Migrations/Schema/V111/Version20160701110000.php
  3. 50
      main/admin/subscribe_user2course.php
  4. 2
      main/auth/inscription.php
  5. 2
      main/badge/assign.php
  6. 19
      main/create_course/add_course.php
  7. 33
      main/inc/lib/extra_field.lib.php
  8. 3
      main/inc/lib/legal.lib.php
  9. 145
      main/inc/lib/tracking.lib.php
  10. 50
      main/inc/lib/usermanager.lib.php
  11. 2
      main/inc/lib/userportal.lib.php
  12. 9
      main/lang/english/trad4all.inc.php
  13. 51
      main/lang/french/trad4all.inc.php
  14. 53
      main/lang/spanish/trad4all.inc.php
  15. 6
      main/link/link.php
  16. 37
      main/mySpace/myStudents.php
  17. 2
      main/template/default/social/avatar_block.tpl
  18. 22
      plugin/bbb/lib/bbb.lib.php
  19. 2
      plugin/bbb/listing.php
  20. 2
      src/Chamilo/CourseBundle/Entity/CCourseSetting.php
  21. 58
      src/Chamilo/UserBundle/Entity/Repository/UserRepository.php

@ -292,6 +292,7 @@ class Version111 extends AbstractMigrationChamilo
$this->addSql('ALTER TABLE user ADD profile_completed TINYINT(1) DEFAULT NULL;');
$this->addSql('ALTER TABLE extra_field_options CHANGE display_text display_text VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE extra_field CHANGE variable variable VARCHAR(255) NOT NULL');
$this->addSql('ALTER TABLE c_course_setting MODIFY COLUMN value TEXT');
if (!$schema->hasTable('version')) {
$this->addSql('CREATE TABLE version (version varchar(255), PRIMARY KEY(version));');

@ -0,0 +1,39 @@
<?php
/* For licensing terms, see /license.txt */
namespace Application\Migrations\Schema\V111;
use Application\Migrations\AbstractMigrationChamilo;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Types\Type;
/**
* Class Version20160701110000
* Add option to remove splash screen on course creation
* @package Application\Migrations\Schema\V111
*/
class Version20160701110000 extends AbstractMigrationChamilo
{
/**
* @param Schema $schema
* @throws \Doctrine\DBAL\DBALException
* @throws \Doctrine\DBAL\Schema\SchemaException
*/
public function up(Schema $schema)
{
$this->addSql("INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('course_creation_splash_screen',NULL,'radio','Course','true','CourseCreationSplashScreenTitle','CourseCreationSplashScreenComment','',NULL, 1)");
$this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('course_creation_splash_screen','true','Yes') ");
$this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('course_creation_splash_screen','false','No') ");
}
/**
* @param Schema $schema
* @throws \Doctrine\DBAL\DBALException
* @throws \Doctrine\DBAL\Schema\SchemaException
*/
public function down(Schema $schema)
{
$this->addSql("DELETE FROM settings_current WHERE variable = 'course_creation_splash_screen'");
$this->addSql("DELETE FROM settings_options WHERE variable = 'course_creation_splash_screen'");
}
}

@ -60,10 +60,21 @@ if (is_array($extra_field_list)) {
if ($extra_field[8] == 1 && $extra_field[2] == ExtraField::FIELD_TYPE_SELECT) {
$new_field_list[] = array(
'name' => $extra_field[3],
'type' => $extra_field[2],
'variable' => $extra_field[1],
'data' => $extra_field[9],
);
}
if ($extra_field[8] == 1 && $extra_field[2] == ExtraField::FIELD_TYPE_TAG) {
$options = UserManager::get_extra_user_data_for_tags($extra_field[1]);
$new_field_list[] = array(
'name' => $extra_field[3],
'type' => $extra_field[2],
'variable' => $extra_field[1],
'data' => $options['options'],
);
}
}
}
@ -118,7 +129,7 @@ if (empty($first_letter_user)) {
}
$where_filter = null;
$extra_field_result = [];
//Filter by Extra Fields
$use_extra_fields = false;
if (is_array($extra_field_list)) {
@ -126,13 +137,21 @@ if (is_array($extra_field_list)) {
$result_list = array();
foreach ($new_field_list as $new_field) {
$varname = 'field_'.$new_field['variable'];
$fieldtype = $new_field['type'];
if (UserManager::is_extra_field_available($new_field['variable'])) {
if (isset($_POST[$varname]) && $_POST[$varname] != '0') {
$use_extra_fields = true;
$extra_field_result[]= UserManager::get_extra_user_data_by_value(
$new_field['variable'],
$_POST[$varname]
);
if ($fieldtype == ExtraField::FIELD_TYPE_TAG) {
$extra_field_result[]= UserManager::get_extra_user_data_by_tags(
intval($_POST['field_id']),
$_POST[$varname]
);
} else {
$extra_field_result[]= UserManager::get_extra_user_data_by_value(
$new_field['variable'],
$_POST[$varname]
);
}
}
}
}
@ -227,7 +246,6 @@ if (api_is_multiple_url_enabled()) {
$result = Database::query($sql);
$db_courses = Database::store_result($result);
unset($result);
?>
<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>" style="margin:0px;">
<?php
@ -237,18 +255,30 @@ if (is_array($extra_field_list)) {
foreach ($new_field_list as $new_field) {
echo $new_field['name'];
$varname = 'field_'.$new_field['variable'];
$fieldtype = $new_field['type'];
echo '&nbsp;<select name="'.$varname.'">';
echo '<option value="0">--'.get_lang('Select').'--</option>';
foreach ($new_field['data'] as $option) {
$checked='';
if (isset($_POST[$varname])) {
if ($_POST[$varname] == $option[1]) {
$checked = 'selected="true"';
if ($fieldtype == ExtraField::FIELD_TYPE_TAG) {
if (isset($_POST[$varname])) {
if ($_POST[$varname] == $option['tag']) {
$checked = 'selected="true"';
}
}
echo '<option value="'.$option['tag'].'" '.$checked.'>'.$option['tag'].'</option>';
} else {
if (isset($_POST[$varname])) {
if ($_POST[$varname] == $option[1]) {
$checked = 'selected="true"';
}
}
echo '<option value="'.$option[1].'" '.$checked.'>'.$option[1].'</option>';
}
echo '<option value="'.$option[1].'" '.$checked.'>'.$option[1].'</option>';
}
echo '</select>';
$extraHidden = $fieldtype == ExtraField::FIELD_TYPE_TAG ? '<input type="hidden" name="field_id" value="'.$option['field_id'].'" />' : '';
echo $extraHidden;
echo '&nbsp;&nbsp;';
}
echo '<input class="btn btn-primary" type="button" value="'.get_lang('Filter').'" onclick="validate_filter()" ></input>';

@ -575,7 +575,7 @@ if (api_get_setting('allow_terms_conditions') == 'true') {
$form->addElement('hidden', 'legal_accept_type', $term_preview['version'].':'.$term_preview['language_id']);
$form->addElement('hidden', 'legal_info', $term_preview['id'].':'.$term_preview['language_id']);
if ($term_preview['type'] === 1) {
if ($term_preview['type'] == 1) {
$form->addElement(
'checkbox',
'legal_accept',

@ -13,7 +13,7 @@ use Chamilo\CoreBundle\Entity\SkillRelUser;
require_once '../inc/global.inc.php';
if (!api_is_platform_admin(false, true)) {
if (!api_is_platform_admin(false, true) && !api_is_student_boss()) {
api_not_allowed(true);
}

@ -309,12 +309,19 @@ if ($form->validate()) {
$add_course_tpl = $tpl->get_template('create_course/add_course.tpl');
$message = $tpl->fetch($add_course_tpl);*/
$url = api_get_path(WEB_CODE_PATH);
$url .= 'course_info/start.php?'.api_get_cidreq_params($course_info['code']);
$url .= '&first=1';
header('Location: ' . $url);
exit;
$splash = api_get_setting('course_creation_splash_screen');
if ($splash === 'true') {
$url = api_get_path(WEB_CODE_PATH);
$url .= 'course_info/start.php?' . api_get_cidreq_params($course_info['code']);
$url .= '&first=1';
header('Location: ' . $url);
exit;
} else {
$url = api_get_path(WEB_COURSE_PATH) . $course_info['directory'] . '/';
header('Location: ' . $url);
exit;
}
} else {
$message = Display::return_message(
get_lang('CourseCreationFailed'),

@ -285,6 +285,39 @@ class ExtraField extends Model
}
}
/**
* Get all the field info for User Tags
* @param string $variable
*
* @return array|bool
*/
public function get_handler_field_info_by_tags($variable)
{
$variable = Database::escape_string($variable);
$sql = "SELECT * FROM {$this->table}
WHERE
variable = '$variable' AND
extra_field_type = $this->extraFieldType";
$result = Database::query($sql);
if (Database::num_rows($result)) {
$row = Database::fetch_array($result, 'ASSOC');
$row['display_text'] = ExtraField::translateDisplayName($row['variable'], $row['display_text']);
// All the tags of the field
$sql = "SELECT * FROM $this->table_field_tag
WHERE field_id='".intval($row['id'])."'
ORDER BY id ASC";
$result = Database::query($sql);
while ($option = Database::fetch_array($result, 'ASSOC')) {
$row['options'][$option['id']] = $option;
}
return $row;
} else {
return false;
}
}
/**
* @param int $fieldId
*

@ -181,7 +181,8 @@ class LegalManager
$preview = '<div class="legal-terms">'.$term_preview['content'].'</div><br />';
}
$preview .= get_lang('ByClickingRegisterYouAgreeTermsAndConditions');
if (api_get_setting('load_term_conditions_section') === 'course') {
$courseInfo = api_get_course_info();
if (api_get_setting('load_term_conditions_section') === 'course' && empty($courseInfo)) {
$preview = '';
}
break;

@ -4304,7 +4304,9 @@ class Tracking
$html .= Display::page_subheader(
Display::return_icon('course.png', get_lang('MyCourses'), array(), ICON_SIZE_SMALL).' '.get_lang('MyCourses')
);
$html .= '<table class="data_table" width="100%">';
$html .= '<div class="table-responsive">';
$html .= '<table class="table table-striped table-hover">';
$html .= '<thead>';
$html .= '<tr>
'.Display::tag('th', get_lang('Course'), array('width'=>'300px')).'
'.Display::tag('th', get_lang('TimeSpentInTheCourse'), array('class'=>'head')).'
@ -4313,6 +4315,7 @@ class Tracking
'.Display::tag('th', get_lang('LastConnexion'), array('class'=>'head')).'
'.Display::tag('th', get_lang('Details'), array('class'=>'head')).'
</tr>';
$html .= '</thead><tbody>';
foreach ($courses as $course_code => $course_title) {
$courseInfo = api_get_course_info($course_code);
@ -4379,7 +4382,8 @@ class Tracking
$html .= '</a>';
$html .= '</td></tr>';
}
$html .= '</table>';
$html .= '</tbody></table>';
$html .= '</div>';
}
}
@ -4490,7 +4494,9 @@ class Tracking
Display::return_icon('session.png', get_lang('Sessions'), array(), ICON_SIZE_SMALL) . ' ' . get_lang('Sessions')
);
$html .= '<table class="data_table" width="100%">';
$html .= '<div class="table-responsive">';
$html .= '<table class="table table-striped table-hover">';
$html .= '<thead>';
$html .= '<tr>
'.Display::tag('th', get_lang('Session'), array('width'=>'300px')).'
'.Display::tag('th', get_lang('PublishedExercises'), array('width'=>'300px')).'
@ -4498,6 +4504,8 @@ class Tracking
'.Display::tag('th', get_lang('AverageExerciseResult'), array('class'=>'head')).'
'.Display::tag('th', get_lang('Details'), array('class'=>'head')).'
</tr>';
$html .= '</thead>';
$html .= '<tbody>';
foreach ($course_in_session as $my_session_id => $session_data) {
$course_list = $session_data['course_list'];
@ -4574,7 +4582,8 @@ class Tracking
$html .= Display::tag('td', $icon);
$html .= '</tr>';
}
$html .= '</table><br />';
$html .= '</tbody>';
$html .= '</table></div><br />';
$html .= Display::div($main_session_graph, array('id'=>'session_graph','class'=>'chart-session', 'style'=>'position:relative; text-align: center;') );
// Checking selected session.
@ -4586,9 +4595,11 @@ class Tracking
$html .= Display::tag('h3',$session_data['name'].' - '.get_lang('CourseList'));
$html .= '<table class="data_table" width="100%">';
$html .= '<div class="table-responsive">';
$html .= '<table class="table table-hover table-striped">';
//'.Display::tag('th', get_lang('DoneExercises'), array('class'=>'head')).'
$html .= '
<thead>
<tr>
<th width="300px">'.get_lang('Course').'</th>
'.Display::tag('th', get_lang('PublishedExercises'), array('class'=>'head')).'
@ -4600,7 +4611,10 @@ class Tracking
'.Display::tag('th', get_lang('Score').Display::return_icon('info3.gif', get_lang('ScormAndLPTestTotalAverage'), array ('align' => 'absmiddle', 'hspace' => '3px')), array('class'=>'head')).'
'.Display::tag('th', get_lang('LastConnexion'), array('class'=>'head')).'
'.Display::tag('th', get_lang('Details'), array('class'=>'head')).'
</tr>';
</tr>
</thead>
<tbody>
';
foreach ($course_list as $course_data) {
$course_code = $course_data['code'];
@ -4717,7 +4731,7 @@ class Tracking
$html .= Display::tag('td', $details, array('align'=>'center'));
$html .= '</tr>';
}
$html .= '</table>';
$html .= '</tbody></table></div>';
}
}
@ -4742,18 +4756,22 @@ class Tracking
$course_info = CourseManager::get_course_information($course);
$html .= Display::page_subheader($course_info['title']);
$html .= '<table class="data_table" width="100%">';
$html .= '<div class="table-responsive">';
$html .= '<table class="table table-striped table-hover">';
//Course details
$html .= '
<thead>
<tr>
<th class="head" style="color:#000">'.get_lang('Exercises').'</th>
<th class="head" style="color:#000">'.get_lang('Attempts').'</th>
<th class="head" style="color:#000">'.get_lang('BestAttempt').'</th>
<th class="head" style="color:#000">'.get_lang('Ranking').'</th>
<th class="head" style="color:#000">'.get_lang('BestResultInCourse').'</th>
<th class="head" style="color:#000">'.get_lang('Statistics').' '.Display :: return_icon('info3.gif', get_lang('OnlyBestResultsPerStudent'), array('align' => 'absmiddle', 'hspace' => '3px')).'</th>
</tr>';
<th>'.get_lang('Exercises').'</th>
<th>'.get_lang('Attempts').'</th>
<th>'.get_lang('BestAttempt').'</th>
<th>'.get_lang('Ranking').'</th>
<th>'.get_lang('BestResultInCourse').'</th>
<th>'.get_lang('Statistics').' '.Display :: return_icon('info3.gif', get_lang('OnlyBestResultsPerStudent'), array('align' => 'absmiddle', 'hspace' => '3px')).'</th>
</tr>
</thead>
<tbody>';
if (empty($session_id)) {
$user_list = CourseManager::get_user_list_from_course_code(
@ -4917,17 +4935,19 @@ class Tracking
} else {
$html .= '<tr><td colspan="5" align="center">'.get_lang('NoEx').'</td></tr>';
}
$html .= '</table>';
$html .= '</tbody></table></div>';
// LP table results
$html .='<table class="data_table">';
$html .= '<div class="table-responsive">';
$html .='<table class="table table-striped table-hover">';
$html .= '<thead><tr>';
$html .= Display::tag('th', get_lang('Learnpaths'), array('class'=>'head', 'style'=>'color:#000'));
$html .= Display::tag('th', get_lang('LatencyTimeSpent'), array('class'=>'head', 'style'=>'color:#000'));
$html .= Display::tag('th', get_lang('Progress'), array('class'=>'head', 'style'=>'color:#000'));
$html .= Display::tag('th', get_lang('Score'), array('class'=>'head', 'style'=>'color:#000'));
$html .= Display::tag('th', get_lang('LastConnexion'), array('class'=>'head', 'style'=>'color:#000'));
$html .= '</tr>';
$html .= '</tr></thead><tbody>';
$list = new LearnpathList(
api_get_user_id(),
@ -4985,7 +5005,9 @@ class Tracking
</td>
</tr>';
}
$html .='</table>';
$html .='</tbody></table></div>';
$html .= self::displayUserSkills($user_id, $course_info['id'], $session_id);
}
return $html;
@ -5809,6 +5831,91 @@ class Tracking
])
->getOneOrNullResult();
}
/**
* Get the HTML code for show a block with the achieved user skill on course/session
* @param int $userId
* @param int $courseId
* @param int $sessionId
* @return string
*/
public static function displayUserSkills($userId, $courseId = 0, $sessionId = 0)
{
$userId = intval($userId);
$courseId = intval($courseId);
$sessionId = intval($sessionId);
if (api_get_setting('allow_skills_tool') !== 'true') {
return '';
}
$filter = ['userId' => $userId];
if (!empty($courseId)) {
$filter['courseId'] = $courseId;
}
if (!empty($sessionId)) {
$filter['sessionId'] = $sessionId;
}
$em = Database::getManager();
$skillsRelUser = $em->getRepository('ChamiloCoreBundle:SkillRelUser')->findBy($filter);
$html = '
<div class="table-responsive">
<table class="table" id="skillList">
<thead>
<tr>
<th>' . get_lang('AchievedSkills') . '</th>
</tr>
</thead>
<tbody>
<tr>
<td>
';
if (count($skillsRelUser)) {
$html .= '
<div class="scrollbar-inner badges-sidebar">
<ul class="list-unstyled list-badges">
';
foreach ($skillsRelUser as $userSkill) {
$skill = $em->find('ChamiloCoreBundle:Skill', $userSkill->getSkillId());
$html .= '
<li class="thumbnail">
<a href="' . api_get_path(WEB_PATH) . 'badge/' . $skill->getId() . '/user/' . $userId . '" target="_blank">
<img class="img-responsive" title="' . $skill->getName() . '" src="' . $skill->getWebIconPath() . '" width="64" height="64">
<div class="caption">
<p class="text-center">' . $skill->getName() . '</p>
</div>
</a>
</li>
';
}
$html .= '
</ul>
</div>
';
} else {
$html .= get_lang('WithoutAchievedSkills');
}
$html .= '
</td>
</tr>
</tbody>
</table>
</div>
';
return $html;
}
}
/**

@ -2281,6 +2281,22 @@ class UserManager
return $extraField->get_handler_field_info_by_field_variable($variable);
}
/**
* Get the extra field information for user tag (the options as well)
* @param int $variable The name of the field we want to know everything about
* @return array Array containing all the information about the extra profile field
* (first level of array contains field details, then 'options' sub-array contains options details,
* as returned by the database)
* @author José Loguercio
* @since v1.11.0
*/
public static function get_extra_field_tags_information_by_name($variable)
{
$extraField = new ExtraField('user');
return $extraField->get_handler_field_info_by_tags($variable);
}
/**
* @param string $type
*
@ -2345,6 +2361,26 @@ class UserManager
return $result;
}
/**
* Get extra user data by tags value
*
* @param int $fieldId the ID of the field we want to know everything of
* @param string $tag the tag name for search
* @return array with extra data info of a user
* @author José Loguercio
* @since v1.11.0
*/
public static function get_extra_user_data_by_tags($fieldId, $tag)
{
$extraField = new ExtraField('user');
$result = $extraField->getAllUserPerTag($fieldId, $tag);
$array = [];
foreach ($result as $index => $user) {
$array[] = $user['user_id'];
}
return $array;
}
/**
* Get extra user data by field variable
* @param string field variable
@ -2368,6 +2404,20 @@ class UserManager
return $data;
}
/**
* Get extra user data tags by field variable
*
* @param string field variable
* @return array data
*/
public static function get_extra_user_data_for_tags($field_variable)
{
$extra_information_by_variable = self::get_extra_field_tags_information_by_name($field_variable);
return $extra_information_by_variable;
}
/**
* Gives a list of [session_category][session_id] for the current user.
* @param integer $user_id

@ -827,7 +827,7 @@ class IndexManager
{
$html = null;
if (!api_is_anonymous()) {
$userPicture = UserManager::getUserPicture(api_get_user_id());
$userPicture = UserManager::getUserPicture(api_get_user_id(), USER_IMAGE_SIZE_BIG);
$content = null;
if (api_get_setting('allow_social_tool') == 'true') {

@ -7804,4 +7804,11 @@ $SrcEmail = "Email";
$SrcPhone = "Phone";
$SrcPresential = "Presential";
$TicketXCreated = "Ticket %s created";
?>
$ShowLinkTicketNotificationTitle = "Show ticket creation link";
$ShowLinkTicketNotificationComment = "Show the ticket creation link to users on the right side of the portal";
$LastSentWorkDate = "Last sent work date";
$SSOSubclassTitle = "Single Sign On sub-class";
$SSOSubclassComment = "To enable a Single Sign On method, you will have to create your own sub-class in main/auth/sso/ based on the default class. Indicate here the name of the sub-class. For example, if the file is sso.Drupal.class.php, indicate 'Drupal' in this field.";
$CourseCreationSplashScreenTitle = "Course creation splash screen";
$CourseCreationSplashScreenComment = "The course splash screen show a series of suggested options to the teacher when creating a new course. Disable it to let your teachers land directly on the course homepage.";
?>

@ -2496,6 +2496,7 @@ $TitleManipulateStudentPublication = "Éditer ce document";
$EnterDataNewChapter = "Saisissez les informations de ce nouveau chapitre";
$EnterDataNewModule = "Saisissez les informations de ce nouveau chapitre";
$CreateNewStep = "Créer une nouvelle étape :";
$TicketUpdated = "Ticket mis à jour";
$UseAnExistingResource = "Ou utiliser une ressource existante :";
$Position = "Position";
$NewChapterCreated = "Le nouveau chapitre a bien été créé. Vous pouvez maintenant ajouter un nouveau chapitre ou une nouvelle étape dans celui-ci.";
@ -7697,6 +7698,7 @@ $Translation = "Traduction";
$IfThisTranslationExistsThisWillReplaceTheTerm = "Si ce terme a déjà été traduit, cette opération remplacera la traduction existante pour ce sous-langage.";
$LastConnection = "Dernière connexion";
$HisProfileIs = "Son profil est";
$UserXWithLangXRegisteredTheSite = "L'utilisateur %s de langue %s est enregistré sur le portail";
$YouCanAssignATutorInThisLinkX = "Vous pouvez assigner un tuteur à l'adresse suivante: %s";
$UpdateExistingGlossaryTerms = "Mettre à jour les termes existants";
$TermsUpdated = "Termes mis à jour";
@ -7707,4 +7709,53 @@ $LastWork = "Dernier travail";
$WaitingModeration = "En attente de modération";
$WorksInSessionReport = "Travaux dans le rapport de session";
$Files = "Fichiers";
$AssignedTo = "Assigné à";
$UpdatedByX = "Mis à jour par %s";
$AssignedChangeFromXToY = "L'utilisateur responsable a été changé de %s à %s";
$RequestConfirmation = "Demande de confirmation";
$ChangeAssign = "Changer l'assignation";
$ToBeAssigned = "À assigner";
$StatusNew = "Nouveau";
$StatusPending = "En attente";
$StatusUnconfirmed = "Non confirmé";
$StatusClose = "Fermé";
$StatusForwarded = "Transféré";
$MyTickets = "Mes tickets";
$PriorityNormal = "Normale";
$PriorityHigh = "Élevée";
$PriorityLow = "Basse";
$TicketDetail = "Détails du ticket";
$StatusAll = "Tous";
$StatusUnread = "Non lu";
$StatusRead = "Lu";
$Projects = "Projets";
$AssignUser = "Assigner utilisateur";
$TicketEnrollment = "Inscription";
$TicketGeneralInformation = "Information générale";
$TicketRequestAndPapework = "Requêtes et formalités";
$TicketAcademicIncidence = "Incidents académiques";
$TicketVirtualCampus = "Campus virtuel";
$TicketOnlineEvaluation = "Évaluation en ligne";
$TicketsAboutEnrollment = "Tickets de procédure d'inscription";
$TicketsAboutGeneralInformation = "Tickets au sujet de l'information générale";
$TicketsAboutRequestAndPapework = "Tickets au sujet des requêtes et formalités";
$TicketsAboutAcademicIncidence = "Tickets au sujet des incidents académiques comme les examens, travaux pratiques, devoirs, etc.";
$TicketsAboutVirtualCampus = "Tickets au sujet du campus virtuel";
$TicketsAboutOnlineEvaluation = "Tickets au sujet de l'évaluation en ligne";
$Assign = "Assigner";
$PersonalEmail = "E-mail personnel";
$Priority = "Priorité";
$Source = "Source";
$SrcPlatform = "Plate-forme";
$SrcEmail = "E-mail";
$SrcPhone = "Téléphone";
$SrcPresential = "Présentiel";
$TicketXCreated = "Ticket %s créé";
$ShowLinkTicketNotificationTitle = "Lien de création de tickets";
$ShowLinkTicketNotificationComment = "Afficher le lien de création de tickets sur le côté du portail.";
$LastSentWorkDate = "Date de dernier travail envoyé";
$SSOSubclassTitle = "Single Sign On: Sous-classe";
$SSOSubclassComment = "Pour activer une méthode de Single Sign On, vous devrez créer une sous-classe dans main/auth/sso/ basée sur la classe par défaut. Indiquez ici le nom de la sous-classe. Par exemple, si le fichier se nomme sso.Drupal.class.php, indiquez 'Drupal' dans ce champ.";
$CourseCreationSplashScreenTitle = "Écran d'accueil de création de cours";
$CourseCreationSplashScreenComment = "L'écran d'accueil de création de cours montre une série d'options suggérées à l'enseignant lorsqu'il vient de créer un nouveau cours. Désactivez cette option si vous souhaitez envoyer directement les enseignants sur la page principale du cours.";
?>

@ -2503,6 +2503,7 @@ $TitleManipulateStudentPublication = "Modificar la tarea actual";
$EnterDataNewChapter = "Introduzca los datos de la sección";
$EnterDataNewModule = "Introduzca los datos de la sección";
$CreateNewStep = "Crear un documento :";
$TicketUpdated = "Ticket actualizado";
$UseAnExistingResource = "O usar un recurso ya existente :";
$Position = "Posición";
$NewChapterCreated = "La sección ha sido creada. Ahora puede incorporarle objetos de aprendizaje o crear otra sección";
@ -3656,7 +3657,7 @@ $Photo = "Foto";
$MoveFile = "Mover el archivo";
$Filter = "Filtrar";
$Subject = "Asunto";
$Message = "mensaje";
$Message = "Mensaje";
$MoreInformation = "Mas información";
$MakeInvisible = "Ocultar";
$MakeVisible = "Hacer visible";
@ -7769,6 +7770,7 @@ $Translation = "Traducción";
$IfThisTranslationExistsThisWillReplaceTheTerm = "Si este término ha sido traducido anteriormente, esta operación remplazará su traducción para este sub-idioma.";
$LastConnection = "Última conexión";
$HisProfileIs = "Su perfil es";
$UserXWithLangXRegisteredTheSite = "El usuario %s con idioma %s está registrado en el portal";
$YouCanAssignATutorInThisLinkX = "Puede asignar un tutor siguiendo este enlace: %s";
$UpdateExistingGlossaryTerms = "Actualizar términos existentes";
$TermsUpdated = "Términos actualizados";
@ -7779,4 +7781,53 @@ $LastWork = "Última tarea";
$WaitingModeration = "Esperando moderación";
$WorksInSessionReport = "Tareas en reporte de sesión";
$Files = "Archivos";
$AssignedTo = "Asignado a";
$UpdatedByX = "Actualizado por %s";
$AssignedChangeFromXToY = "El usuario asignado cambió de %s a %s";
$RequestConfirmation = "Solicitud de confirmación";
$ChangeAssign = "Cambiar asignación";
$ToBeAssigned = "Para ser asignado";
$StatusNew = "Nuevo";
$StatusPending = "Pendiente";
$StatusUnconfirmed = "Sin confirmar";
$StatusClose = "Cerrado";
$StatusForwarded = "Reenviado";
$MyTickets = "Mis tickets";
$PriorityNormal = "Normal";
$PriorityHigh = "Alta";
$PriorityLow = "Baja";
$TicketDetail = "Detalles del ticket";
$StatusAll = "Todo";
$StatusUnread = "No leído";
$StatusRead = "Leído";
$Projects = "Proyectos";
$AssignUser = "Asignar usuario";
$TicketEnrollment = "Inscripción";
$TicketGeneralInformation = "Información general";
$TicketRequestAndPapework = "Solicitudes y trámites";
$TicketAcademicIncidence = "Incidentes académicos";
$TicketVirtualCampus = "Campus virtual";
$TicketOnlineEvaluation = "Evaluación en línea";
$TicketsAboutEnrollment = "Tickets sobre inscripciones";
$TicketsAboutGeneralInformation = "Tickets sobre información general";
$TicketsAboutRequestAndPapework = "Tickets sobre solicitudes y trámites";
$TicketsAboutAcademicIncidence = "Tickets sobre incidentes académicos, como exámenes, prácticas, tareas, etc.";
$TicketsAboutVirtualCampus = "Tickets sobre el campus virtual";
$TicketsAboutOnlineEvaluation = "Tickets sobre evaluaciones en línea";
$Assign = "Asignar";
$PersonalEmail = "Correo electrónico personal";
$Priority = "Prioridad";
$Source = "Fuente";
$SrcPlatform = "Plataforma";
$SrcEmail = "Correo electrónico";
$SrcPhone = "Teléfono";
$SrcPresential = "Presencial";
$TicketXCreated = "Ticket %s creado";
$ShowLinkTicketNotificationTitle = "Enlace de creación de ticket";
$ShowLinkTicketNotificationComment = "Mostrar el enlace de creación de ticket en la parte lateral del portal.";
$LastSentWorkDate = "Fecha de última tarea enviada";
$SSOSubclassTitle = "Single Sign On: sub-clase";
$SSOSubclassComment = "Para activar algun método de Single Sign On, es necesario definir su propia sub-clase en main/auth/sso/, basada en la clase por defecto. Indique aquí el nombre de la sub-clase. Por ejemplo, si el archivo se llama sso.Drupal.class.php, indique 'Drupal' en este campo.";
$CourseCreationSplashScreenTitle = "Pantalla de bienvenida de curso";
$CourseCreationSplashScreenComment = "La pantalla de bienvenida muestra una serie de sugerencias al profesor cuando acaba de crear un nuevo curso. Deactive esta opción para que el profesor llegue directamente a la pantalla principal del curso.";
?>

@ -69,19 +69,19 @@ $course_id = api_get_course_int_id();
$session_id = api_get_session_id();
$condition_session = api_get_session_condition($session_id, true, true);
if ($action == 'addlink') {
if ($action === 'addlink') {
$nameTools = '';
$interbreadcrumb[] = array('url' => 'link.php', 'name' => get_lang('Links'));
$interbreadcrumb[] = array('url' => '#', 'name' => get_lang('AddLink'));
}
if ($action == 'addcategory') {
if ($action === 'addcategory') {
$nameTools = '';
$interbreadcrumb[] = array('url' => 'link.php', 'name' => get_lang('Links'));
$interbreadcrumb[] = array('url' => '#', 'name' => get_lang('AddCategory'));
}
if ($action == 'editlink') {
if ($action === 'editlink') {
$nameTools = '';
$interbreadcrumb[] = array('url' => 'link.php', 'name' => get_lang('Links'));
$interbreadcrumb[] = array('url' => '#', 'name' => get_lang('EditLink'));

@ -62,6 +62,8 @@ if (isset ($_GET['from']) && $_GET['from'] == 'myspace') {
$nameTools = get_lang('StudentDetails');
$em = Database::getManager();
$em = Database::getManager();
if (isset($_GET['details'])) {
if ($origin === 'user_course') {
if (empty ($cidReq)) {
@ -356,6 +358,12 @@ if (!empty($student_id)) {
Display::return_icon('login_as.png', get_lang('LoginAs'), null, ICON_SIZE_MEDIUM).'</a>&nbsp;&nbsp;';
}
echo Display::url(
Display::return_icon('skill-badges.png', get_lang('AssignSkill'), null, ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH) . 'badge/assign.php?' . http_build_query(['user' => $student_id])
);
echo '</div>';
// is the user online ?
@ -540,7 +548,7 @@ if (!empty($student_id)) {
<td align="right"><?php echo get_lang('LatestLoginInPlatform') ?></td>
<td align="left"><?php echo $last_connection_date ?></td>
</tr>
<?php if (isset($_GET['details']) && $_GET['details'] == 'true') {?>
<?php if (isset($_GET['details']) && $_GET['details'] == 'true') { ?>
<tr>
<td align="right"><?php echo get_lang('TimeSpentInTheCourse') ?></td>
<td align="left"><?php echo $time_spent_on_the_course ?></td>
@ -793,23 +801,21 @@ if (!empty($student_id)) {
get_lang('LastConnexion')
);
if (empty($sessionId)) {
$query = $em->createQuery('
$query = $em
->createQuery('
SELECT lp FROM ChamiloCourseBundle:CLp lp
WHERE lp.sessionId = 0 AND lp.cId = :course
WHERE lp.sessionId = :session AND lp.cId = :course
ORDER BY lp.displayOrder ASC
');
if (empty($sessionId)) {
$query->setParameters([
'session' => 0,
'course' => $courseInfo['real_id']
]);
} else {
$query = $em->createQuery('
SELECT lp FROM ChamiloCourseBundle:CLp lp
WHERE lp.cId = :course
ORDER BY lp.displayOrder ASC
');
$query->setParameters([
'session' => $sessionId,
'course' => $courseInfo['real_id']
]);
}
@ -1024,12 +1030,13 @@ if (!empty($student_id)) {
$data_learnpath[$i][] = $lp_name;
$data_learnpath[$i][] = $progress . '%';
}
?>
</tbody>
</table>
</div>
<?php
}
?>
</tbody>
</table>
</div>
<?php } ?>
} ?>
<!-- line about exercises -->
<?php if ($user_info['status'] != INVITEE) { ?>
<div class="table-responsive">
@ -1297,6 +1304,8 @@ if (!empty($student_id)) {
</table>
</div>
<?php
echo Tracking::displayUserSkills($user_info['user_id'], $courseInfo['id'], $sessionId);
} //end details
}

@ -16,7 +16,7 @@
</div>
{% elseif show_user %}
<a href="{{ user_image.big }}" class="expand-image">
<img class="img-responsive img-circle" src="{{ user_image.normal }}">
<img class="img-responsive img-circle" src="{{ user_image.big }}">
</a>
{% endif %}
</div>

@ -41,7 +41,7 @@ class bbb
// Initialize video server settings from global settings
$plugin = BBBPlugin::create();
$bbbPlugin = $plugin->get('tool_enable');
$bbbPluginEnabled = $plugin->get('tool_enable');
$bbb_host = !empty($host) ? $host : $plugin->get('host');
$bbb_salt = !empty($salt) ? $salt : $plugin->get('salt');
@ -74,7 +74,7 @@ class bbb
}
}
if ($bbbPlugin == true) {
if ($bbbPluginEnabled === 'true') {
$userInfo = api_get_user_info();
$this->userCompleteName = $userInfo['complete_name'];
$this->salt = $bbb_salt;
@ -1041,6 +1041,10 @@ class bbb
*/
public function endUrl($meeting)
{
if (!isset($meeting['id'])) {
return '';
}
return api_get_path(WEB_PLUGIN_PATH).'bbb/listing.php?'.$this->getUrlParams().'&action=end&id='.$meeting['id'];
}
@ -1062,6 +1066,9 @@ class bbb
*/
public function publishUrl($meeting)
{
if (!isset($meeting['id'])) {
return '';
}
return api_get_path(WEB_PLUGIN_PATH).'bbb/listing.php?'.$this->getUrlParams().'&action=publish&id='.$meeting['id'];
}
@ -1071,6 +1078,9 @@ class bbb
*/
public function unPublishUrl($meeting)
{
if (!isset($meeting['id'])) {
return '';
}
return api_get_path(WEB_PLUGIN_PATH).'bbb/listing.php?'.$this->getUrlParams().'&action=unpublish&id='.$meeting['id'];
}
@ -1080,6 +1090,10 @@ class bbb
*/
public function deleteRecordUrl($meeting)
{
if (!isset($meeting['id'])) {
return '';
}
return api_get_path(WEB_PLUGIN_PATH).'bbb/listing.php?'.$this->getUrlParams().'&action=delete_record&id='.$meeting['id'];
}
@ -1089,6 +1103,10 @@ class bbb
*/
public function copyToRecordToLinkTool($meeting)
{
if (!isset($meeting['id'])) {
return '';
}
return api_get_path(WEB_PLUGIN_PATH).'bbb/listing.php?'.$this->getUrlParams().'&action=copy_record_to_link_tool&id='.$meeting['id'];
}
}

@ -140,7 +140,7 @@ if ($bbb->isGlobalConference() === false &&
$form = new FormValidator(api_get_self());
$groupId = api_get_group_id();
$groups = GroupManager::get_groups();
if ($groups && !empty($groupId)) {
if ($groups) {
$groupList[0] = get_lang('Select');
$groupList = array_merge($groupList, array_column($groups, 'name', 'iid'));
$form->addSelect('group_id', get_lang('Groups'), $groupList, ['id' => 'group_select']);

@ -72,7 +72,7 @@ class CCourseSetting
/**
* @var string
*
* @ORM\Column(name="value", type="string", length=255, nullable=true)
* @ORM\Column(name="value", type="text", nullable=true)
*/
private $value;

@ -172,4 +172,62 @@ class UserRepository extends EntityRepository
return $queryBuilder->getQuery()->getResult();
}
/**
* Get the sessions admins for a user
* @param \Chamilo\UserBundle\Entity\User $user The user
* @return array
*/
public function getSessionAdmins($user)
{
$queryBuilder = $this->createQueryBuilder('u');
$queryBuilder
->distinct()
->innerJoin(
'ChamiloCoreBundle:SessionRelUser',
'su',
Join::WITH,
$queryBuilder->expr()->eq('u', 'su.user')
)
->innerJoin(
'ChamiloCoreBundle:SessionRelCourseRelUser',
'scu',
Join::WITH,
$queryBuilder->expr()->eq('su.session', 'scu.session')
)
->where(
$queryBuilder->expr()->eq('scu.user', $user->getId())
)
->andWhere(
$queryBuilder->expr()->eq('su.relationType', SESSION_RELATION_TYPE_RRHH)
);
return $queryBuilder->getQuery()->getResult();
}
/**
* Get the student bosses for a user
* @param User $user The user
* @return array
*/
public function getStudentBosses($user)
{
$queryBuilder = $this->createQueryBuilder('u');
$queryBuilder
->distinct()
->innerJoin(
'ChamiloCoreBundle:UserRelUser',
'uu',
Join::WITH,
$queryBuilder->expr()->eq('u.id', 'uu.friendUserId')
)
->where(
$queryBuilder->expr()->eq('uu.relationType', USER_RELATION_TYPE_BOSS)
)
->andWhere(
$queryBuilder->expr()->eq('uu.userId', $user->getId())
);
return $queryBuilder->getQuery()->getResult();
}
}

Loading…
Cancel
Save