Merge branch '1.10.x' of ssh://github.com/chamilo/chamilo-lms into 1.10.x

1.10.x
Julio Montoya 10 years ago
commit 9108411e46
  1. 15
      .travis.yml
  2. 44
      app/Resources/public/css/base.css
  3. 1
      index.php
  4. 2
      main/exercice/exercise_submit.php
  5. BIN
      main/img/icons/22/graduation.png
  6. BIN
      main/img/icons/22/search_graduation.png
  7. 94
      main/inc/lib/userportal.lib.php
  8. 5
      main/install/install.lib.php
  9. 2
      user_portal.php

@ -11,9 +11,14 @@ before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq mysql-server
- sudo apt-get install -qq apache2 libapache2-mod-fastcgi
# Install additional PHP packages (check http://docs.travis-ci.com/user/ci-environment/#CI-environment-OS for pre-installed packages)
# Install additional PHP packages (check http://docs.travis-ci.com/user/ci-environment/#CI-environment-OS
# for pre-installed packages)
#- sudo apt-get install -qq php5-imagick
- sudo apt-get install -qq php5-cli
# Following http://docs.travis-ci.com/user/languages/php/#PHP-installation,
# php is compiled with --enable-fpm, so no install of FPM is needed.
# However, not installing it generates errors with service php5-fpm restart
# further down (need to use php-fpm without 5)
- sudo apt-get install -qq php5-cli php5-fpm
before_script:
- php5 -v
@ -24,7 +29,7 @@ before_script:
- composer -v update
- phpenv config-add tests/travis-php-config.ini
# enable php-fpm
- sudo service php5-fpm stop
- sudo service php-fpm stop
- sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
- sudo a2enmod rewrite actions fastcgi alias
- echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
@ -33,6 +38,8 @@ before_script:
- sudo cp -f tests/travis-apache /etc/apache2/sites-available/default
- sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/default
- sudo service apache2 restart
- sudo service php-fpm restart
- php5 -v
# install Chash, a database, and then install Chamilo
- git clone https://github.com/chamilo/chash
- cd chash
@ -51,7 +58,7 @@ before_script:
#- cd ../..
# install Chamilo with Chash - see reference https://github.com/sonnym/travis-ci-drupal-module-example/blob/master/.travis.yml
- cd /home/travis/build/chamilo/chamilo-lms
- sudo chash chash:chamilo_install --no-interaction --sitename="Chamilo" --site_url="http://localhost/" --institution="Chamilo" --institution_url="https://chamilo.org" --encrypt_method="sha1" --firstname="John" --lastname="Doe" --language="english" --driver="pdo_mysql" --host="localhost" --port="3306" --dbname="chamilo" --dbuser="root" --permissions_for_new_directories="0777" --permissions_for_new_files="0666" --linux-user="www-data" --linux-group="www-data" --username="admin" --password="admin" --email="admin@example.com" --phone="555-5555" 1.10.x
- sudo chash chash:chamilo_install --no-interaction --sitename="Chamilo" --site_url="http://localhost/" --institution="Chamilo" --institution_url="https://chamilo.org" --encrypt_method="sha1" --firstname="John" --lastname="Doe" --language="english" --driver="mysqlnd" --host="localhost" --port="3306" --dbname="chamilo" --dbuser="root" --permissions_for_new_directories="0777" --permissions_for_new_files="0666" --linux-user="www-data" --linux-group="www-data" --username="admin" --password="admin" --email="admin@example.com" --phone="555-5555" 1.10.x
script:
# - phpunit -c tests/phpunit

@ -1931,8 +1931,6 @@ div.image-social-content center.friend {
background-color:#ECECEB;
padding:12px;
}
/* GROUP TOOL */
#group_description {
@ -2476,7 +2474,34 @@ div.admin_section h4 {
height:75px;
z-index:1;
}
/* MAIN QUESTION */
.main-question {
padding: 10px 20px;
box-sizing: border-box;
border: 1px solid #dddddd;
border-radius: 4px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
box-shadow: 0px 1px 1px rgba(0,0,0,0.05);
margin-bottom: 35px;
}
.main-question .question_title{
font-size: 20px;
font-weight: bold;
margin: 15px 0px;
color:#666666 ;
}
.main-question .question_description{
color: #666666;
}
.main-question .form-actions{
clear: both;
width: 100%;
display: block;
border-top:1px solid #dddddd;
padding-top: 10px;
}
#questions {
width:40%;
height:50px;
@ -2567,10 +2592,13 @@ div.admin_section h4 {
display:block;
}
.question_options .radio, .question_options .checkbox {
.question_options .radio{
min-height: 18px;
padding-left: 25px;
}
.question_options .checkbox{
margin-left: 35px;
}
.question_options .radio input[type="radio"], .question_options .checkbox input[type="checkbox"] {
float: left;
margin-left: -25px;
@ -2585,10 +2613,6 @@ div.admin_section h4 {
margin:2px 2px 2px 0px;
}
.question_description {
padding: 0px;
}
.exercise_description {
padding:0px 0px 10px 0px;
border-bottom: 1px solid #CCCCCC;
@ -2599,12 +2623,6 @@ div.admin_section h4 {
padding:10px 0px 10px 0px;
}
.question_title {
font-size: 1.2em;
font-weight: bold;
margin: 15px 0px;
}
.question_no_answer {
background-color: #FFF7C0;
/* padding: 5px 0px 5px 0px; */

@ -165,7 +165,6 @@ $controller->tpl->assign('navigation_course_links', $controller->return_navigati
$controller->tpl->assign('notice_block', $controller->return_notice());
$controller->tpl->assign('main_navigation_block', $controller->return_navigation_links());
$controller->tpl->assign('help_block', $controller->return_help());
$controller->tpl->assign('certificates_search_block', $controller->returnCertificatesSearchBlock());
if (api_is_platform_admin() || api_is_drh()) {
$controller->tpl->assign('skills_block', $controller->return_skills_links());

@ -1085,7 +1085,7 @@ if (!empty($error)) {
// Showing the question
echo '<div id="question_div_'.$questionId.'" class="main_question '.$remind_highlight.'" >';
echo '<div id="question_div_'.$questionId.'" class="main-question '.$remind_highlight.'" >';
// Shows the question and its answers
ExerciseLib::showQuestion($questionId, false, $origin, $i, true, false, $user_choice, false);

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

@ -323,19 +323,56 @@ class IndexManager
function return_skills_links() {
$html = '';
$content = '';
$content .= '<ul class="nav nav-pills nav-stacked">';
/**
* Generate the block for show a panel with links to My Certificates and Certificates Search pages
* @return string The HTML code for the panel
*/
$certificatesItem = null;
if (!api_is_anonymous()) {
$certificatesItem = Display::tag(
'li',
Display::url(Display::return_icon('graduation.png',get_lang('MyCertificates'),null,ICON_SIZE_SMALL).
get_lang('MyCertificates'),
api_get_path(WEB_CODE_PATH) . "gradebook/my_certificates.php"
)
);
}
$searchItem = null;
if (api_get_setting('allow_public_certificates') == 'true') {
$searchItem = Display::tag(
'li',
Display::url(Display::return_icon('search_graduation.png',get_lang('Search'),null,ICON_SIZE_SMALL).
get_lang('Search'),
api_get_path(WEB_CODE_PATH) . "gradebook/search.php"
)
);
}
if (empty($certificatesItem) && empty($searchItem)) {
return null;
}else{
$content.= $certificatesItem;
$content.= $searchItem;
}
if (api_get_setting('allow_skills_tool') == 'true') {
$content = '<ul class="nav nav-pills nav-stacked">';
$content .= Display::tag('li', Display::url(Display::return_icon('skill-badges.png',get_lang('MySkills'),null,ICON_SIZE_SMALL).get_lang('MySkills'), api_get_path(WEB_CODE_PATH).'social/my_skills_report.php'));
$allowSkillsManagement = api_get_setting('allow_hr_skills_management') == 'true';
if (($allowSkillsManagement && api_is_drh()) || api_is_platform_admin()) {
$content .= Display::tag('li', Display::url(Display::return_icon('edit-skill.png',get_lang('MySkills'),null,ICON_SIZE_SMALL).get_lang('ManageSkills'), api_get_path(WEB_CODE_PATH).'admin/skills_wheel.php'));
$content .= Display::tag('li',
Display::url(Display::return_icon('edit-skill.png', get_lang('MySkills'), null,
ICON_SIZE_SMALL) . get_lang('ManageSkills'),
api_get_path(WEB_CODE_PATH) . 'admin/skills_wheel.php'));
}
$content .= '</ul>';
$html = self::show_right_block(get_lang("Skills"), $content, 'skill_block');
}
$content .= '</ul>';
$html = self::show_right_block(get_lang("Skills"), $content, 'skill_block');
return $html;
}
@ -1423,49 +1460,4 @@ class IndexManager
return CourseManager::return_hot_courses();
}
/**
* Generate the block for show a panel with links to My Certificates and Certificates Search pages
* @return string The HTML code for the panel
*/
public function returnCertificatesSearchBlock()
{
$certificatesItem = null;
if (!api_is_anonymous()) {
$certificatesItem = Display::tag(
'li',
Display::url(
get_lang('MyCertificates'),
api_get_path(WEB_CODE_PATH) . "gradebook/my_certificates.php"
)
);
}
$searchItem = null;
if (api_get_setting('allow_public_certificates') == 'true') {
$searchItem = Display::tag(
'li',
Display::url(
get_lang('Search'),
api_get_path(WEB_CODE_PATH) . "gradebook/search.php"
)
);
}
if (empty($certificatesItem) && empty($searchItem)) {
return null;
}
return Display::panel(
Display::tag(
'ul',
implode(' ', [$certificatesItem, $searchItem]),
['class' => 'nav nav-pills nav-stacked']
),
get_lang('Certificates')
);
}
}

@ -1855,7 +1855,8 @@ function installSettings(
$allowRegistration = $allowRegistration ? 'true' : 'false';
$allowTeacherSelfRegistration = $allowTeacherSelfRegistration ? 'true' : 'false';
$settings = [
// Use PHP 5.3 to avoid issue with weird peripherical auto-installers like travis-ci
$settings = array(
'Institution' => $organizationName,
'InstitutionUrl' => $organizationUrl,
'siteName' => $siteName,
@ -1865,7 +1866,7 @@ function installSettings(
'platformLanguage' => $language,
'allow_registration' => $allowRegistration,
'allow_registration_as_teacher' => $allowTeacherSelfRegistration,
];
);
foreach ($settings as $variable => $value) {
$sql = "UPDATE settings_current

@ -183,8 +183,6 @@ $controller->tpl->assign('course_block', $controller->return_course_block());
$controller->tpl->assign('navigation_course_links', $controller->return_navigation_links());
$controller->tpl->assign('search_block', $controller->return_search_block());
$controller->tpl->assign('classes_block', $controller->return_classes_block());
$controller->tpl->assign('certificates_search_block', $controller->returnCertificatesSearchBlock());
//if (api_is_platform_admin() || api_is_drh()) {
$controller->tpl->assign('skills_block', $controller->return_skills_links());
//}

Loading…
Cancel
Save