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

1.9.x
Julio Montoya 11 years ago
commit 04e497bbff
  1. 35
      main/css/base.css
  2. 19
      main/css/chamilo/default.css
  3. 2
      main/inc/global_error_message.inc.php
  4. 61
      main/inc/lib/redirect.class.php
  5. 7
      main/newscorm/learnpath.class.php

@ -386,9 +386,12 @@ header {
.breadcrumb a, .breadcrumb li {
text-shadow:none;
font-size: 13px;
}
.breadcrumb a.btn-mini{
line-height: 22px;
text-transform: none;
margin-top: -5px;
}
.breadcrumb li img {
width: 0%;
}
@ -3242,9 +3245,7 @@ form .formw .freeze {
.data_table th, .data_table td {
border-top: 1px solid #DDDDDD;
line-height: 18px;
padding: 6px;
text-align: left;
vertical-align: top;
padding-top: 6px;
}
.data_table th {
@ -4575,9 +4576,27 @@ footer {
margin:0;
}
.progresstext {
text-align: center;
.progress .bar {
font-weight: bold;
text-shadow: 0px 1px 1px rgba(0,0,0,1);
}
.progress {
text-align:center;
position: relative;
background: #98bede; /* Old browsers */
background: -moz-linear-gradient(top, #98bede 1%, #deefff 98%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(1%,#98bede), color-stop(98%,#deefff)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #98bede 1%,#deefff 98%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #98bede 1%,#deefff 98%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #98bede 1%,#deefff 98%); /* IE10+ */
background: linear-gradient(to bottom, #98bede 1%,#deefff 98%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#98bede', endColorstr='#deefff',GradientType=0 ); /* IE6-9 */
}
.bar span {
position:absolute;
display: block;
width: 100%;
}
.ui-state-highlight_lp {

@ -125,10 +125,6 @@ a.thumbnail:hover{
text-shadow: none;
}
.breadcrumb a.btn-mini{
line-height: 22px;
text-transform: none;
}
.breadcrumb a.btn-mini > .btn-success{
color: #FFFFFF;
}
@ -424,20 +420,7 @@ a.thumbnail:hover{
#settings .span6 .well_border {
min-height: 300px;
}
.breadcrumb {
margin-bottom: 0;
background: rgb(255,255,255); /* Old browsers */
background: -moz-linear-gradient(top, rgba(255,255,255,1) 0%, rgba(192,219,234,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,1)), color-stop(100%,rgba(192,219,234,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(192,219,234,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(192,219,234,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(192,219,234,1) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(255,255,255,1) 0%,rgba(192,219,234,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#c0dbea',GradientType=0 ); /* IE6-9 */
margin-top: 5px;
border: 1px solid #d4e6f0;
box-shadow: none;
}
.breadcrumb a{
padding-top: 0;
text-transform: none;

@ -165,7 +165,7 @@ if (is_int($global_error_code) && $global_error_code > 0) {
$global_error_message['encoding'] = 'UTF-8';
$global_error_message['css'] = $css_def;
$global_error_message['chamilo_logo'] = $root_rel.$css_path.$theme.'images/header-logo.png';
$global_error_message['chamilo_logo'] = $root_rel.$css_path.$theme.'/images/header-logo.png';
// {ORGANISATION} moved from the header

@ -1,18 +1,27 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Send a redirect to the user agent and exist
*
* @license see /license.txt
* @author Laurent Opprecht <laurent@opprecht.info> for the Univesity of Geneva
*/
class Redirect {
static function www() {
class Redirect
{
/**
* Returns the result of api_get_path() (a web path to the root of Chamilo)
* @return string
*/
public static function www()
{
return Uri::www();
}
static function go($url = '') {
/**
* Checks whether the given URL contains "http". If not, prepend the web
* root of Chamilo and send the browser there (HTTP redirect)
* @param string $url
*/
public static function go($url = '')
{
if (empty($url)) {
Redirect::session_request_uri();
$www = self::www();
@ -29,10 +38,14 @@ class Redirect {
}
/**
* Redirect to the session "request uri" if it exists.
* Redirect to the current session's "request uri" if it is defined, or
* check sso_referer, user's role and page_after_login settings to send
* the user to some predefined URL
* @param bool Whether the user just logged in (in this case, use page_after_login rules)
* @param int The user_id, if defined. Otherwise just send to where the page_after_login setting says
*/
static function session_request_uri($logging_in = false, $user_id = null) {
public static function session_request_uri($logging_in = false, $user_id = null)
{
$no_redirection = isset($_SESSION['noredirection']) ? $_SESSION['noredirection'] : false;
if ($no_redirection) {
@ -78,6 +91,20 @@ class Redirect {
break;
}
}
// If the user is a platform admin, redirect to the main admin page
if (api_is_multiple_url_enabled()) {
// if multiple URLs are enabled, make sure he's admin of the
// current URL before redirecting
$url = api_get_current_access_url_id();
if (api_is_platform_admin_by_id($user_id, $url)) {
self::navigate(api_get_path(WEB_CODE_PATH).'admin/index.php');
}
} else {
// if no multiple URL, then it's enough to be platform admin
if (api_is_platform_admin_by_id($user_id)) {
self::navigate(api_get_path(WEB_CODE_PATH).'admin/index.php');
}
}
$page_after_login = api_get_setting('page_after_login');
if (!empty($page_after_login)) {
self::navigate(api_get_path(WEB_PATH) . $page_after_login);
@ -85,16 +112,28 @@ class Redirect {
}
}
static function home() {
/**
* Sends the user to the web root of Chamilo (e.g. http://my.chamiloportal.com/ )
*/
public static function home()
{
$www = self::www();
self::navigate($www);
}
static function user_home() {
/**
* Sends the user to the user_portal.php page
*/
public static function user_home()
{
$www = self::www();
self::navigate("$www/user_portal.php");
}
/**
* Redirects the user to a given URL through the header('location: ...') function
* @param $url
*/
protected static function navigate($url)
{
$url = Security::remove_XSS($url);

@ -2429,10 +2429,9 @@ class learnpath
public static function get_progress_bar($percentage = -1, $text_add = '')
{
$text = $percentage . $text_add;
$output = '<div class="progress progress-striped">
<div id="progress_bar_value" class="bar" style="width: '.$text.';"></div>
</div>
<div class="progresstext" id="progress_text">' . $text . '</div>';
$output = '<div class="progress">
<div id="progress_bar_value" class="bar" style="width: '.$text.';"><span>'. $text .'</span></div>
</div>';
return $output;
}

Loading…
Cancel
Save