Adding welcome to course block see #3898

skala
Julio Montoya 13 years ago
parent 8f79e78717
commit 9b35d61430
  1. 18
      main/inc/lib/userportal.lib.php
  2. 3
      main/lang/english/index.inc.php
  3. 17
      main/lang/english/trad4all.inc.php
  4. 7
      main/template/default/layout/layout_2_col.tpl
  5. 10
      main/template/default/layout/welcome_to_course.tpl
  6. 5
      user_portal.php

@ -1055,9 +1055,25 @@ class IndexManager {
}
}
}
return $sessions_with_category.$sessions_with_no_category.$courses_html.$special_courses;
}
/**
* Shows a welcome message when the user doesn't have any content in the course list
*/
function return_welcome_to_course_block() {
$tpl = $this->tpl->get_template('layout/welcome_to_course.tpl');
$course_catalog_url = api_get_path(WEB_CODE_PATH).'auth/courses.php';
$course_list_url = api_get_path(WEB_PATH).'user_portal.php';
$this->tpl->assign('course_catalog_url', $course_catalog_url);
$this->tpl->assign('course_list_url', $course_list_url);
$this->tpl->assign('course_catalog_link', Display::url(get_lang('here'), $course_catalog_url));
$this->tpl->assign('course_list_link', Display::url(get_lang('here'), $course_list_url));
return $this->tpl->fetch($tpl);
}
function return_hot_courses() {
return CourseManager::return_hot_courses();

@ -75,4 +75,7 @@ $YouDoNotHaveAnySessionInItsHistory = "You have no session in your sessions hist
$PortalHomepageDefaultIntroduction = "<h2>Congratulations! You have successfully installed your e-learning portal!</h2> <p>You can now complete the installation by following three easy steps:<br /> <ol> <li>Configure you portal by going to the administration section, and select the Portal -> <a href=\"main/admin/settings.php\">Configuration settings</a> entry.</li> <li>Add some life to your portal by creating users and/or training. You can do that by inviting new people to create their accounts or creating them yourself through the <a href=\"main/admin/\">administration</a>'s Users and Training sections.</li> <li>Edit this page through the <a href=\"main/admin/configure_homepage.php\">Edit portal homepage</a> entry in the administration section.</li> </ol> <p>You can always find more information about this software on our website: <a href=\"http://www.chamilo.org\">http://www.chamilo.org</a>.</p> <p>Have fun, and don't hesitate to join the community and give us feedback through <a href=\"http://www.chamilo.org/forum\">our forum</a>.</p>";
$Username = "User name";
$Profile = "Profile";
$HelloXAsYouCanSeeYourCourseListIsEmpty = "<p>Hello <strong>%s</strong> and welcome,</p>
<p>As you can see, your courses list is still empty. That's because you are not registered to any course yet! </p>";
$GoAheadAndBrowseOurCourseCatalogXOnceRegisteredYouWillSeeTheCourseHereX = "<p>Go ahead and browse our course catalog %s to register to any course you like. Once registered, you will see the course appear right %s, instead of this message.</p>";
?>

@ -958,13 +958,13 @@ $SendInformation = "Send information";
$YouMustAcceptLicence = "You must accept the licence";
$SelectOne = "Select one";
$ContactInformationHasBeenSent = "Contact information has been sent";
$ContactInformationDescription = "Dear user,<br />
<br />You are about to start using one of the best open-source e-learning platform on the market. Like many other open-source project, this project is backed up by a large community of students, teachers, developers and content creators who would like to promote the project better.<br />
<br />
By knowing a little bit more about you, one of our most important users, who will manage this e-learning system, we will be able to let people know that our software is used and let you know when we organize events that might be relevant to you.<br />
<br />
By filling this form, you accept that the Chamilo association or its members might send you information by e-mail about important events or updates in the Chamilo software or community. This will help the community grow as an organized entity where information flow, with a permanent respect of your time and your privacy.<br />
<br />
$ContactInformationDescription = "Dear user,<br />
<br />You are about to start using one of the best open-source e-learning platform on the market. Like many other open-source project, this project is backed up by a large community of students, teachers, developers and content creators who would like to promote the project better.<br />
<br />
By knowing a little bit more about you, one of our most important users, who will manage this e-learning system, we will be able to let people know that our software is used and let you know when we organize events that might be relevant to you.<br />
<br />
By filling this form, you accept that the Chamilo association or its members might send you information by e-mail about important events or updates in the Chamilo software or community. This will help the community grow as an organized entity where information flow, with a permanent respect of your time and your privacy.<br />
<br />
Please note that you are <b>not required</b> to fill this form. If you want to remain anonymous, we will loose the opportunity to offer you all the privileges of being a registered portal administrator, but we will respect your decision. Simply leave this form empty and click \"Next\".<br /><br />";
$CompanyActivity = "Your company's activity";
$DateUnLock = "Unlock date";
@ -1170,7 +1170,7 @@ $SaveForNow = "Save and continue later";
$NoQuicktime = "Your browser does not have the QuickTime plugin installed. You can still use the platform, but to run a larger number of media file types, we suggest you might want to install it.";
$NoJavaSun = "Your browser doesn't seem to have the Sun Java plugin installed. You can still use the platform, but you will lose a few of its capabilities.";
$NoJava = "Your browser does not support Java";
$JavaSun24 = "Your browser has a Java version not supported by this tool.
$JavaSun24 = "Your browser has a Java version not supported by this tool.
To use it you have to install a Java Sun version higher than 24";
$NoMessageAnywere = "If you do not want to see this message again during this session, click here";
$Attempts = "Attempts";
@ -1334,4 +1334,5 @@ $DataTableSearch = "Search";
$HideColumn = "Hide column";
$DisplayColumn = "Show column";
$LegalAgreementAccepted = "Legal agreement accepted";
$here = "here";
?>

@ -28,6 +28,13 @@
{% include "default/layout/page_body.tpl" %}
{# Welcome to course block #}
{% if welcome_to_course_block %}
<section id="welcome_to_course">
{{ welcome_to_course_block }}
</section>
{% endif %}
{% if content is not null %}
<section id="main_content">
{{ content }}

@ -0,0 +1,10 @@
{{ "HelloXAsYouCanSeeYourCourseListIsEmpty" | get_lang | format(_u.complete_name) }}
{% if "allow_students_to_browse_courses" | get_setting == 'true' %}
{{ "GoAheadAndBrowseOurCourseCatalogXOnceRegisteredYouWillSeeTheCourseHereX" | get_lang | format(course_catalog_link, course_list_link) }}
<a class="btn btn-primary btn-large" href="{{ course_catalog_url }}">
{{ "CourseCatalog" | get_lang }}
</a>
{% endif %}

@ -155,6 +155,11 @@ $user_id = api_get_user_id();
// Main courses and session list
$courses_and_sessions = $controller->return_courses_and_sessions($user_id);
//Show the chamilo mascot
if (empty($courses_and_sessions)) {
$controller->tpl->assign('welcome_to_course_block', $controller->return_welcome_to_course_block());
}
$controller->tpl->assign('content', $courses_and_sessions);
if (api_get_setting('allow_browser_sniffer') == 'true') {

Loading…
Cancel
Save