Allow show full skill name on skill wheel - refs BT#10175

1.10.x
Angel Fernando Quiroz Campos 10 years ago
parent 1c6156f185
commit fcb12ae943
  1. 67
      app/Migrations/Schema/V110/Version20150825141100.php
  2. 5
      main/inc/lib/skill.lib.php
  3. 9
      main/install/data.sql

@ -0,0 +1,67 @@
<?php
/* For licensing terms, see /license.txt */
namespace Application\Migrations\Schema\V110;
use Application\Migrations\AbstractMigrationChamilo;
use Doctrine\DBAL\Schema\Schema;
/**
* Calendar color
*/
class Version20150825141100 extends AbstractMigrationChamilo
{
/**
* @param Schema $schema
*/
public function up(Schema $schema)
{
$this->addSettingCurrent(
'show_full_skill_name_on_skill_wheel',
null,
'radio',
'Platform',
'false',
'ShowFullSkillNameOnSkillWheelTitle',
'ShowFullSkillNameOnSkillWheelComment',
null,
null,
1,
false,
true,
[
['value' => 'true', 'text' => 'Yes'],
['value' => 'false', 'text' => 'No']
]
);
}
/**
* @param Schema $schema
*/
public function down(Schema $schema)
{
$entityManage = $this->getEntityManager();
$deleteOptions = $entityManage->createQueryBuilder();
$deleteSettings = $entityManage->createQueryBuilder();
$deleteOptions->delete('ChamiloCoreBundle:SettingsOptions', 'o')
->andWhere(
$deleteOptions->expr()->in(
'o.variable',
['show_full_skill_name_on_skill_wheel']
)
);
$deleteOptions->getQuery()->execute();
$deleteSettings->delete('ChamiloCoreBundle:SettingsCurrent', 's')
->andWhere(
$deleteSettings->expr()->in(
's.variable',
['show_full_skill_name_on_skill_wheel']
)
);
$deleteSettings->getQuery()->execute();
}
}

@ -980,7 +980,10 @@ class Skill extends Model
// If a short code was defined, send the short code to replace
// skill name (to shorten the text in the wheel)
if (!empty($skill['short_code'])) {
if (
!empty($skill['short_code']) &&
api_get_setting('show_full_skill_name_on_skill_wheel') === 'false'
) {
$skill['data']['name'] = $skill['short_code'];
}

@ -309,7 +309,8 @@ VALUES
('cron_remind_course_finished_activate', NULL, 'radio', 'Crons', 'false', 'CronRemindCourseFinishedActivateTitle', 'CronRemindCourseFinishedActivateComment', NULL, NULL, 1),
('cron_remind_course_expiration_frequency', NULL, 'textfield', 'Crons', '2', 'CronRemindCourseExpirationFrequencyTitle', 'CronRemindCourseExpirationFrequencyComment', NULL, NULL, 1),
('cron_remind_course_expiration_activate', NULL, 'radio', 'Crons', 'false', 'CronRemindCourseExpirationActivateTitle', 'CronRemindCourseExpirationActivateComment', NULL, NULL, 1),
('allow_coach_feedback_exercises',NULL,'radio','Session','true','AllowCoachFeedbackExercisesTitle','AllowCoachFeedbackExercisesComment',NULL,NULL, 0);
('allow_coach_feedback_exercises',NULL,'radio','Session','true','AllowCoachFeedbackExercisesTitle','AllowCoachFeedbackExercisesComment',NULL,NULL, 0),
('show_full_skill_name_on_skill_wheel', NULL, 'radio', 'Platform', 'false', 'ShowFullSkillNameOnSkillWheelTitle', 'ShowFullSkillNameOnSkillWheelComment', NULL, NULL, 1);
INSERT INTO settings_options (variable, value, display_text)
VALUES
@ -631,7 +632,9 @@ VALUES
('cron_remind_course_expiration_activate', 'false', 'No'),
('cron_remind_course_expiration_activate', 'true', 'Yes'),
('allow_coach_feedback_exercises','true','Yes'),
('allow_coach_feedback_exercises','false','No');
('allow_coach_feedback_exercises','false','No'),
('show_full_skill_name_on_skill_wheel', 'true', 'Yes'),
('show_full_skill_name_on_skill_wheel', 'false', 'No');
INSERT INTO language (original_name, english_name, isocode, dokeos_folder, available) VALUES
('&#1575;&#1604;&#1593;&#1585;&#1576;&#1610;&#1577;','arabic','ar','arabic',0),
@ -1803,4 +1806,4 @@ VALUES
('my_courses_view_by_session', 'true', 'Yes'),
('my_courses_view_by_session', 'false', 'No');
UPDATE settings_current SET selected_value = '1.10.0.50' WHERE variable = 'chamilo_database_version';
UPDATE settings_current SET selected_value = '1.10.0.51' WHERE variable = 'chamilo_database_version';

Loading…
Cancel
Save