[svn r11820] improving xhtml compliance

skala
Patrick Cool 19 years ago
parent 34d48d13dc
commit a0a025f267
  1. 16
      main/css/academica/default.css
  2. 14
      main/css/baby/default.css
  3. 18
      main/css/corporativa/default.css
  4. 390
      main/css/default/default.css
  5. 6
      main/inc/introductionSection.inc.php
  6. 2
      main/inc/lib/add_course.lib.inc.php
  7. 141
      user_portal.php

@ -2,7 +2,7 @@
==============================================================================
ACADEMIC STYLESHEET
==============================================================================
*/
*/
/*
==============================================================================
GLOBAL STYLES - REDEFINED HTML TAGS
@ -82,17 +82,17 @@ ul {
==============================================================================
PAGE STRUCTURE
==============================================================================
*/
*/
/* user_portal course status icon */
#coursestatusicons {
.coursestatusicons {
float: left;
clear: left;
margin-right: .5em;
}
/* user_portal course list */
#courses {
.courses {
font-weight: bold;
list-style: none;
margin-bottom: .2em;
@ -514,7 +514,7 @@ td .menu {
==============================================================================
DOCUMENT MODULE AND DATA TABLES
==============================================================================
*/
*/
/* Data tables */
.data_table {
@ -649,7 +649,7 @@ div.row div.label {
margin: 0;
}
/* Solves the IE inherited margin bug */
/* Solves the IE inherited margin bug */
/* IE-7*/
*:first-child+html .row .formw input {
margin-left: -1em;
@ -1019,7 +1019,7 @@ span.agendaitem i {
/*
==============================================================================
DOKEOS CONFIG SETTINGS
DOKEOS CONFIG SETTINGS
==============================================================================
*/
@ -1274,7 +1274,7 @@ a.specialLink:hover,a.specialLink:focus {
==============================================================================
DISPLAY MESSAGES
==============================================================================
*/
*/
/* Common message styles */
.confirmation-message,.error-message,.normal-message,.warning-message {

@ -2,7 +2,7 @@
==============================================================================
BABY STYLESHEET
==============================================================================
*/
*/
/*
==============================================================================
GLOBAL STYLES - REDEFINED HTML TAGS
@ -83,17 +83,17 @@ ul {
==============================================================================
PAGE STRUCTURE
==============================================================================
*/
*/
/* user_portal course status icon */
#coursestatusicons {
.coursestatusicons {
float: left;
clear: left;
margin-right: .5em;
}
/* user_portal course list */
#courses {
.courses {
font-weight: bold;
list-style: none;
margin-bottom: .2em;
@ -502,7 +502,7 @@ td .menu {
==============================================================================
DOCUMENT MODULE AND DATA TABLES
==============================================================================
*/
*/
/* Data tables */
.data_table {
@ -975,7 +975,7 @@ span.agendaitem i {
/*
==============================================================================
DOKEOS CONFIG SETTINGS
DOKEOS CONFIG SETTINGS
==============================================================================
*/
@ -1218,7 +1218,7 @@ th span {
==============================================================================
DISPLAY MESSAGES
==============================================================================
*/
*/
/* Common message styles */
.normal-message,.warning-message,.confirmation-message,.error-message {

@ -2,7 +2,7 @@
==============================================================================
CORPORATIVE STYLESHEET
==============================================================================
*/
*/
/*
==============================================================================
GLOBAL STYLES - REDEFINED HTML TAGS
@ -82,16 +82,16 @@ ul {
==============================================================================
PAGE STRUCTURE
==============================================================================
*/
*/
/* user_portal course status icon */
#coursestatusicons {
.coursestatusicons {
float: left;
clear: left;
margin-right: .5em;
}
/* user_portal course list */
#courses {
.courses {
font-weight: bold;
list-style: none;
margin-bottom: .2em;
@ -303,7 +303,7 @@ ul {
padding: 0;
}
/* Solves the IE inherited margin bug */
/* Solves the IE inherited margin bug */
/* IE-7*/
*:first-child+html #header4 {
margin-top: 0;
@ -487,7 +487,7 @@ td .menu {
==============================================================================
DOCUMENT MODULE AND DATA TABLES
==============================================================================
*/
*/
/* Data tables */
.data_table {
@ -592,7 +592,7 @@ div.row div.label {
margin: 0;
}
/* Solves the IE inherited margin bug */
/* Solves the IE inherited margin bug */
/* IE-7*/
*:first-child+html .row .formw input {
margin-left: -1em;
@ -931,7 +931,7 @@ span.agendaitem i {
/*
==============================================================================
DOKEOS CONFIG SETTINGS
DOKEOS CONFIG SETTINGS
==============================================================================
*/
@ -1181,7 +1181,7 @@ a.specialLink:hover,a.specialLink:focus {
==============================================================================
DISPLAY MESSAGES
==============================================================================
*/
*/
/* Common message styles */
.confirmation-message,.error-message,.normal-message,.warning-message {

@ -96,7 +96,7 @@ input.link_alike:hover {
}
input.link_alike{
color: #4171b5;
color: #4171b5;
}
input.link_alike:hover {
@ -158,7 +158,7 @@ a.invisible:visited {
}
/* user_portal course status icon */
#coursestatusicons{
.coursestatusicons{
border: 0px solid #000;
float: left;
padding-right: 5px;
@ -166,7 +166,7 @@ a.invisible:visited {
}
/* user_portal course list */
#courses {
.courses {
list-style-type: none;
margin-bottom: 5px;
}
@ -306,7 +306,7 @@ a.invisible:visited {
}
#header3 li {
border-right: solid 1px #73A2B6;
border-right: solid 1px #73A2B6;
color: #73A2B6;
display: block;
float: left;
@ -341,7 +341,7 @@ a.invisible:visited {
#header3 input {
display: block;
padding-left: 2px;
padding-right: 2px;
padding-right: 2px;
}
#header3 input:hover {
@ -422,8 +422,8 @@ a.invisible:visited {
}
#myprofilefooter {
clear:both;
border-top:thin solid;
clear:both;
border-top:thin solid;
padding-top:2px;
}
@ -437,9 +437,9 @@ a.invisible:visited {
.menu {
background-color: #E5EDF9;
border: 1px solid #4171B5;
float: right;
float: right;
padding: 0 0 6px 0;
width: 20%;
width: 20%;
}
.menucaption {
@ -452,7 +452,7 @@ a.invisible:visited {
border: 1px solid #4171B5;
margin: 24px 6px 0 6px;
padding-left: 10px;
width: auto;
width: auto;
}
.menusectioncaption {
@ -481,18 +481,18 @@ a.invisible:visited {
*/
}
#center {
margin: 0 190px 0 0;
min-height: 300px;
#center {
margin: 0 190px 0 0;
min-height: 300px;
padding: 10px 0 40px 0;
}
#toolnav {
#toolnav {
float: right;
margin: 0;
margin-left: -5%; /* the difference to make the left colum appear flush left */
padding: 0;
width: 180px;
width: 180px;
}
#toolnav img {
@ -509,15 +509,15 @@ a.invisible:visited {
/*
this lets the navigation menu appear to the left:
#center {
#center {
margin: 0 0 0 180px;
min-height: 300px;
min-height: 300px;
padding: 10px 0 40px 0;
}
#toolnav {
float: left;
width: 180px;
#toolnav {
float: left;
width: 180px;
padding: 20px 0 0 0;
margin-left: -5%;
}
@ -534,7 +534,7 @@ this lets the navigation menu appear to the left:
border: 1px solid #4271b5;
float: left;
margin: 0 0 0 10px;
padding: 0;
padding: 0;
}
#toolnavbox dl {
@ -563,7 +563,7 @@ this lets the navigation menu appear to the left:
text-align: left;
}
#toolnavlist a,
#toolnavlist a,
#toolnavlist a:link {
background: #E5EDF9;
color: #4171b5;
@ -596,7 +596,7 @@ this lets the navigation menu appear to the left:
text-align: left;
}
#lang_form input,
#lang_form input,
#lang_form select{
font-size: 12px;
}
@ -638,7 +638,7 @@ input.liteoption {
/* various sections in course-home.php file */
#toolremove {
border: 2px solid #f00;
border: 2px solid #f00;
color: #f00;
font-weight: bold;
margin: 10px auto;
@ -646,48 +646,48 @@ input.liteoption {
width: 40%;
}
#courseintro {
#courseintro {
border-bottom: 1px solid #4171B5;
clear: both;
margin: 10px auto;
padding: 10px;
padding: 10px;
width: 80%;
}
#courseintro_icons {
clear: both;
#courseintro_icons {
clear: both;
margin: 10px auto;
width: 80%;
width: 80%;
}
.everybodyview {
margin: 10px auto;
.everybodyview {
margin: 10px auto;
padding: 10px;
position: relative; /* to avoid the IE peekabo bug ?*/
width: 80%;
width: 80%;
}
.Authoringview,
.courseadminview,
.courseadminview,
.platformadminview {
border: 1px solid #4171B5;
margin: 25px auto 10px;
padding: 10px;
position: relative;
margin: 25px auto 10px;
padding: 10px;
position: relative;
width: 80%;
}
.viewcaption {
background-color: #fff;
color: #4171B5;
background-color: #fff;
color: #4171B5;
font-size: 12px;
font-weight: bold;
font-weight: bold;
padding: 0 4px;
position: relative;
top: -20px;
position: relative;
top: -20px;
}
/*
==============================================================================
AGENDA
@ -701,7 +701,7 @@ input.liteoption {
border-collapse: collapse;
}
#agenda .title a {
#agenda .title a {
color: #fff;
}
@ -710,9 +710,9 @@ input.liteoption {
}
.agenda_month_divider {
background-color: #4171B5;
color: #fff;
font-size: 12px;
background-color: #4171B5;
color: #fff;
font-size: 12px;
font-weight: bold;
text-align: center;
}
@ -722,8 +722,8 @@ input.liteoption {
#agenda_select {
border: 0px solid green;
list-style: none;
margin: 30px 0 0 0;
list-style: none;
margin: 30px 0 0 0;
padding: 0 0 0 10px;
}
@ -737,24 +737,24 @@ input.liteoption {
#agenda_list {
border: 1px solid #fff;
border-collapse: collapse;
margin: 0 auto;
width: 100%;
margin: 0 auto;
width: 100%;
}
/*The caption of the calendar (displays the month and the << and >> links*/
#agenda_list .title{
background-color: #4171B5;
border: 1px solid #264269;
color: #fff;
font-size: 12px;
background-color: #4171B5;
border: 1px solid #264269;
color: #fff;
font-size: 12px;
font-weight: bold;
padding: 2px 10px;
text-align: center;
padding: 2px 10px;
text-align: center;
}
#agenda_list .title a{
color: #fff;
color: #fff;
}
@ -762,21 +762,21 @@ input.liteoption {
/* The cells with the name of the days of the weeks (mon->sun)*/
#agenda_list .weekdays {
background-color: #D3DFF1;
border: 1px solid #264269;
border-collapse: collapse;
font-weight: bold;
text-align: center;
border: 1px solid #264269;
border-collapse: collapse;
font-weight: bold;
text-align: center;
}
#agenda_list .days_week,
#agenda_list .days_weekend,
#agenda_list .days_today {
border: 1px solid #264269;
border-collapse: collapse;
height: 40px;
text-align: left;
border: 1px solid #264269;
border-collapse: collapse;
height: 40px;
text-align: left;
vertical-align: top;
width: 12%;
width: 12%;
}
/* The cells for the days (1->31) */
@ -785,13 +785,13 @@ input.liteoption {
}
#agenda_list .days_weekend {
background-color: #e6e6e6;
background-color: #e6e6e6;
}
#agenda_list .days_today {
background-color: #FFCA8D;
color: #CC3300;
font-weight: bold;
font-weight: bold;
}
#agenda_list .data,
@ -803,61 +803,61 @@ input.liteoption {
#agenda_list .datanow,
#agenda_list .datanotboldnow,
#agenda_list .textnow {
border: 0px solid #4171B5;
border: 0px solid #4171B5;
border-collapse: collapse;
padding: 2px 10px;
text-align: left;
text-align: left;
}
/* text in the cells: display of agenda items (visible)*/
#agenda_list .data {
background-color: #eee;
font-weight: bold;
background-color: #eee;
font-weight: bold;
}
#agenda_list .datanotbold {
background-color: #eee;
font-weight: normal;
background-color: #eee;
font-weight: normal;
}
#agenda_list .text {
background-color: #fff;
font-weight: normal;
background-color: #fff;
font-weight: normal;
}
/*text in the cells: display of agenda items (invisible)*/
#agenda_list .data_hidden {
background-color: #eee;
background-color: #eee;
color: #999999;
font-weight: bold;
font-weight: bold;
}
#agenda_list .datanotbold_hidden {
background-color: #eee;
background-color: #eee;
color: #999999;
font-weight: normal;
font-weight: normal;
}
#agenda_list .text_hidden {
background-color: #fff;
background-color: #fff;
color: #999999;
font-weight: normal;
font-weight: normal;
}
/*text in the cells: display of agenda items (highlighted)*/
#agenda_list .datanow {
background-color: #FFCC00;
font-weight: bold;
background-color: #FFCC00;
font-weight: bold;
}
#agenda_list .datanotboldnow {
background-color: #FFCC00;
font-weight: normal;
background-color: #FFCC00;
font-weight: normal;
}
#agenda_list .textnow {
background-color: #fff;
font-weight: normal;
background-color: #fff;
font-weight: normal;
}
/*
@ -868,54 +868,54 @@ input.liteoption {
#smallcalendar {
border: 1px solid #fff;
border-collapse: collapse;
margin: 0 auto;
width: 100%;
margin: 0 auto;
width: 100%;
}
#smallcalendar .title {
background-color: #4171B5;
color: #fff;
background-color: #4171B5;
color: #fff;
font-size: 11px;
font-weight: bold;
font-weight: bold;
padding: 2px;
text-align: center;
text-align: center;
}
#smallcalendar .title a {
#smallcalendar .title a {
color: #fff;
}
#smallcalendar .weekdays {
background-color: #D3DFF1;
border: 1px solid #fff;
border: 1px solid #fff;
border-collapse: collapse;
font-size: 11px;
font-weight: bold;
font-size: 11px;
font-weight: bold;
text-align: center;
}
#smallcalendar .days_week {
background-color: #f5f5f5;
background-color: #f5f5f5;
border-collapse: collapse;
font-size: 11px;
font-size: 11px;
text-align: center;
}
#smallcalendar .days_weekend {
background-color: #e6e6e6;
border: 1px solid #fff;
border-collapse: collapse;
font-size: 11px;
border: 1px solid #fff;
border-collapse: collapse;
font-size: 11px;
text-align: center;
}
#smallcalendar .days_today {
background-color: #FFCA8D;
border: 1px solid #FA8500;
border-collapse: collapse;
font-size: 11px;
border: 1px solid #FA8500;
border-collapse: collapse;
font-size: 11px;
text-align: center;
width: 12%;
width: 12%;
}
/*
@ -923,17 +923,17 @@ input.liteoption {
styles for the personal agenda
------------------------------------------------------------------------------
*/
.personal_agenda,
.personal_agenda,
.personal_agenda a:link,
.personal_agenda a:visited,
a.personal_agenda:link,
a.personal_agenda:visited{
color: #008000;
color: #008000;
}
.personal_agenda a:hover,
a.personal_agenda:hover {
color: #666666;
color: #666666;
}
@ -987,12 +987,12 @@ a.personal_agenda:hover {
}
#message {
margin: 0 auto;
margin: 0 auto;
text-align: center;
}
#message select {
margin: 10px 0;
margin: 10px 0;
width: 220px;
}
@ -1006,23 +1006,23 @@ a.personal_agenda:hover {
/*
==============================================================================
DOCUMENT MODULE
DOCUMENT MODULE
==============================================================================
*/
/* styles from the document.php file */
.comment {
margin-left: 30px;
.comment {
margin-left: 30px;
}
/* styles from the upload.php file */
dl.upload_option {
margin: 1em 0;
margin: 1em 0;
padding: 0;
}
.upload_option dt {
font-weight:bold;
font-weight:bold;
margin:0;
}
@ -1049,20 +1049,20 @@ dl.upload_option {
font-weight: bold
}
.dropbox_listTitle {
.dropbox_listTitle {
color: #000000;
}
.dropbox_feedback {
font-size: x-small;
height: 50px;
font-size: x-small;
height: 50px;
overflow: auto
width: 200px;
width: 200px;
}
.dropbox_feedbacks {
height: 250px;
width: 100%;
height: 250px;
width: 100%;
overflow: auto
}
@ -1074,49 +1074,49 @@ dl.upload_option {
/* styles for chat / conference tools */
#chat_entermessage {
background-color: #D6E5FA;
background-color: #D6E5FA;
border-top: 1px solid #4171B5;
padding: 5px; margin: 0;
}
/* the following for the greyed out elements */
a.nobold:link,
a.nobold:visited,
a.nobold:active {
font-weight: normal;
color: #999;
a.nobold:link,
a.nobold:visited,
a.nobold:active {
font-weight: normal;
color: #999;
margin: 0 0 0 25px;
}
a.nobold:hover {
font-weight: normal;
color: #999;
text-decoration: underline;
a.nobold:hover {
font-weight: normal;
color: #999;
text-decoration: underline;
margin: 0 0 0 25px;
}
.note {
.note {
background-color: #FFF089;
border: 1px solid #4171B5;
color: #4171B5;
font-size: 12px;
border: 1px solid #4171B5;
color: #4171B5;
font-size: 12px;
font-family: verdana, arial, helvetica, sans-serif;
line-height: 14px;
margin: 6px;
line-height: 14px;
margin: 6px;
padding: 4px;}
.alternativeBgLight {
.alternativeBgLight {
background-color: #f5f5f5;
border: 1px solid #4171B5;
border: 1px solid #4171B5;
border-collapse: collapse;
}
.alternativeBgDark {
.alternativeBgDark {
background-color: #ccf;
border: 1px solid #4171B5;
border: 1px solid #4171B5;
border-collapse: collapse;
}
.myagendatoday {
background-color: #FFCA8D;
border-collapse: collapse;
@ -1124,8 +1124,8 @@ a.nobold:hover {
font-family: verdana, arial, helvetica, sans-serif;
font-weight: bold;
}
/*
==============================================================================
FORM STYLES
@ -1213,7 +1213,7 @@ span.form_error {
font-weight:bold;
padding-left:5px;
text-align:left;
}
}
.data_table {
border-collapse: collapse;
@ -1232,7 +1232,7 @@ span.form_error {
.data_table tr.row_odd {
background-color: #fafafa;
}
.data_table tr.row_odd:hover,
.data_table tr.row_even:hover{
background-color: #f0f0f0;
@ -1310,12 +1310,12 @@ span.form_error {
==============================================================================
*/
.tool_list dt {
font-weight: bold;
.tool_list dt {
font-weight: bold;
}
.tool_list dd {
margin: 0;
.tool_list dd {
margin: 0;
padding: 4px 0 0 10px;
}
@ -1327,32 +1327,32 @@ span.form_error {
.home_cats {
background: #fff;
float: left;
margin: 0;
padding: 0px;
padding-top: 8px;
float: left;
margin: 0;
padding: 0px;
padding-top: 8px;
position: relative;
width: 45%;
}
.home_news {
background: #fff;
float: right;
margin: 0;
padding: 0px;
padding-top: 8px;
float: right;
margin: 0;
padding: 0px;
padding-top: 8px;
position: relative;
width: 45%;
width: 45%;
}
label.left {
float: left;
width: 15em;
margin: 0 0 0.5em 0;
label.left {
float: left;
width: 15em;
margin: 0 0 0.5em 0;
}
form br {
clear: both;
form br {
clear: both;
}
/* Fix for alignment problem in IE-Win browsers */
@ -1362,15 +1362,15 @@ form br {
/* End hide from IE5/mac */
.radio,
.checkbox {
.checkbox {
background-color: transparent;
border: none;
margin: 0;
padding: 0;
border: none;
margin: 0;
padding: 0;
}
.required {
color: #f00;
.required {
color: #f00;
font-weight: bold;
}
@ -1507,7 +1507,7 @@ tr.forum_category_header a {
/*
------------------------------------------------------------------------------
FORUM
FORUM
------------------------------------------------------------------------------
*/
.forum_header {
@ -1542,7 +1542,7 @@ tr.forum_threadheader td{
/*border-bottom: 1px solid #666666;*/
border-right: 1px solid #aaa;
vertical-align: top;
width: 150px;
width: 150px;
}
.forum_message_left_2_be_approved {
@ -1600,7 +1600,7 @@ a.forum_group_link {
/*
------------------------------------------------------------------------------
BLOG
BLOG
------------------------------------------------------------------------------
*/
span.blog_title {
@ -1740,17 +1740,17 @@ div.comments {
}
.link {
color : #1657A9;
color : #1657A9;
cursor: pointer
font-weight : bold;
text-decoration: none;
font-weight : bold;
text-decoration: none;
}
.link:hover {
color: #abd9f1;
color: #abd9f1;
cursor: pointer
font-weight: bold;
text-decoration: none;
font-weight: bold;
text-decoration: none;
}
@ -1879,13 +1879,13 @@ div.comments {
/*
input.forms {
letter-spacing: normal;
padding-top: 0px;
padding-right: 0px;
padding-bottom: 0px;
letter-spacing: normal;
padding-top: 0px;
padding-right: 0px;
padding-bottom: 0px;
padding-left: 0px;
text-align: justify;
text-indent: 3pt;
text-align: justify;
text-indent: 3pt;
word-spacing: normal;
}
*/
@ -1965,14 +1965,14 @@ input.forms {
#WCAG-editor {
border: 1px #4171B5 solid;
background-color: #E5EDF9;
width: 100%;
width: 100%;
}
#WCAG-editor .title {
padding: 2px;
background-color: #4171B5;
text-align: center;
color: #ffffff;
font-weight: bold;
@ -1988,7 +1988,7 @@ input.forms {
#WCAG-editor textarea {
width: 100%;
height: 180px;
border: 1px #7F9DB9 solid;
}

@ -160,15 +160,9 @@ if ($intro_dispDefault)
{
//$intro_content = make_clickable($intro_content); // make url in text clickable
$intro_content = text_filter($intro_content); // parse [tex] codes
//<img src='../../img/mr_dokeos.png'>
if (!empty($intro_content))
{
//$intro_content="<img src='../../main/img/mr_dokeos.png'>".$intro_content;
/*echo "<div id=\"courseintro\"><p>\n",
$intro_content,"\n",
"</p>\n</div>";*/
echo "<table align='center' style='width: 80%;'><tr><td>$intro_content</td></tr></table>";
}
}

@ -1763,7 +1763,7 @@ function fill_Db_course($courseDbName, $courseRepository, $language,$default_doc
Introduction text
-----------------------------------------------------------
*/
$intro_text='<table width="100%" border="0" callpadding="0" cellspacing="0"><tr><td width="110" valign="top" align="left"><img src="'.api_get_path(WEB_IMG_PATH).'mr_dokeos.png"></td><td valign="top" align="left">'.lang2db(get_lang('IntroductionText')).'</td></tr></table>';
$intro_text='<table width="100%" border="0" callpadding="0" cellspacing="0"><tr><td width="110" valign="top" align="left"><img src="'.api_get_path(WEB_IMG_PATH).'mr_dokeos.png" alt="mr. Dokeos" title="mr. Dokeos" /></td><td valign="top" align="left">'.lang2db(get_lang('IntroductionText')).'</td></tr></table>';
api_sql_query("INSERT INTO `".$TABLEINTROS . "` VALUES ('" . TOOL_COURSE_HOMEPAGE . "','".$intro_text. "')");
api_sql_query("INSERT INTO `".$TABLEINTROS . "` VALUES ('" . TOOL_STUDENTPUBLICATION . "','".lang2db(get_lang('IntroductionTwo')) . "')");

@ -43,12 +43,12 @@
*/
/**
* @todo shouldn't the SCRIPTVAL_ and CONFVAL_ constant be moved to the config page? Has anybody any idea what the are used for?
* @todo shouldn't the SCRIPTVAL_ and CONFVAL_ constant be moved to the config page? Has anybody any idea what the are used for?
* if these are really configuration settings then we can add those to the dokeos config settings
* @todo move get_personal_course_list and some other functions to a more appripriate place course.lib.php or user.lib.php
* @todo use api_get_path instead of $rootAdminWeb
* @todo check for duplication of functions with index.php (user_portal.php is orginally a copy of index.php)
* @todo display_digest, shouldn't this be removed and be made into an extension?
* @todo display_digest, shouldn't this be removed and be made into an extension?
*/
/*
@ -67,7 +67,7 @@ define('SCRIPTVAL_NoTimeLimit', 6);
// End 'don't change' section
// name of the language file that needs to be included
// name of the language file that needs to be included
$language_file = array ('courses', 'index');
$cidReset = true; /* Flag forcing the 'current course' reset,
@ -221,7 +221,7 @@ function get_personal_course_list($user_id)
{
// initialisation
$personal_course_list = array();
// table definitions
$main_user_table = Database :: get_main_table(TABLE_MAIN_USER);
$main_course_table = Database :: get_main_table(TABLE_MAIN_COURSE);
@ -229,10 +229,10 @@ function get_personal_course_list($user_id)
$tbl_session_course = Database :: get_main_table(TABLE_MAIN_SESSION_COURSE);
$tbl_session_course_user= Database :: get_main_table(TABLE_MAIN_SESSION_COURSE_USER);
$tbl_session = Database :: get_main_table(TABLE_MAIN_SESSION);
$personal_course_list = array ();
//Courses in which we suscribed out of any session
$personal_course_list_sql = "SELECT course.code k, course.directory d, course.visual_code c, course.db_name db, course.title i,
course.tutor_name t, course.course_language l, course_rel_user.status s, course_rel_user.sort sort,
@ -242,35 +242,35 @@ function get_personal_course_list($user_id)
AND course_rel_user.user_id = '".$user_id."'
ORDER BY course_rel_user.user_course_cat, course_rel_user.sort ASC,course.title,course.code";
$course_list_sql_result = api_sql_query($personal_course_list_sql, __FILE__, __LINE__);
while ($result_row = mysql_fetch_array($course_list_sql_result))
{
$personal_course_list[] = $result_row;
}
//$personal_course_list = array_merge($personal_course_list, $course_list_sql_result);
$personal_course_list_sql = "SELECT DISTINCT course.code k, course.directory d, course.visual_code c, course.db_name db, course.title i, course.tutor_name t, course.course_language l, 5 as s
FROM $main_course_table as course, $tbl_session_course_user as srcru
$personal_course_list_sql = "SELECT DISTINCT course.code k, course.directory d, course.visual_code c, course.db_name db, course.title i, course.tutor_name t, course.course_language l, 5 as s
FROM $main_course_table as course, $tbl_session_course_user as srcru
WHERE srcru.course_code=course.code AND srcru.id_user='$user_id'";
$course_list_sql_result = api_sql_query($personal_course_list_sql, __FILE__, __LINE__);
while ($result_row = mysql_fetch_array($course_list_sql_result))
{
$personal_course_list[] = $result_row;
}
//$personal_course_list = array_merge($personal_course_list, $course_list_sql_result);
$personal_course_list_sql = "SELECT DISTINCT course.code k, course.directory d, course.visual_code c, course.db_name db, course.title i, course.tutor_name t, course.course_language l, 2 as s
FROM $main_course_table as course, $tbl_session_course as src, $tbl_session as session
$personal_course_list_sql = "SELECT DISTINCT course.code k, course.directory d, course.visual_code c, course.db_name db, course.title i, course.tutor_name t, course.course_language l, 2 as s
FROM $main_course_table as course, $tbl_session_course as src, $tbl_session as session
WHERE session.id_coach='$user_id' AND session.id=src.id_session AND src.course_code=course.code";
$course_list_sql_result = api_sql_query($personal_course_list_sql, __FILE__, __LINE__);
//$personal_course_list = array_merge($personal_course_list, $course_list_sql_result);
while ($result_row = mysql_fetch_array($course_list_sql_result))
{
$personal_course_list[] = $result_row;
@ -284,7 +284,7 @@ function get_personal_course_list($user_id)
* @param unknown_type $user_id
* @param unknown_type $list_sessions
* @return unknown
*
*
*/
function get_personal_session_course_list($user_id, $list_sessions)
{
@ -300,7 +300,7 @@ function get_personal_session_course_list($user_id, $list_sessions)
// variable initialisation
$personal_course_list_sql = '';
$personal_course_list = array();
//Courses in which we suscribed out of any session
$personal_course_list_sql = "SELECT course.code k, course.directory d, course.visual_code c, course.db_name db, course.title i,
course.tutor_name t, course.course_language l, course_rel_user.status s, course_rel_user.sort sort,
@ -310,7 +310,7 @@ function get_personal_session_course_list($user_id, $list_sessions)
AND course_rel_user.user_id = '".$user_id."'
ORDER BY course_rel_user.user_course_cat, course_rel_user.sort ASC,course.title,course.code";
$course_list_sql_result = api_sql_query($personal_course_list_sql, __FILE__, __LINE__);
while ($result_row = mysql_fetch_array($course_list_sql_result))
{
$personal_course_list[] = $result_row;
@ -320,11 +320,11 @@ function get_personal_session_course_list($user_id, $list_sessions)
$result=api_sql_query("SELECT DISTINCT id, name, date_start, date_end
FROM session_rel_user, session
WHERE id_session=id AND id_user=$user_id ORDER BY date_start, date_end, name",__FILE__,__LINE__);
$Sessions=api_store_result($result);
$Sessions = array_merge($Sessions , api_store_result($result));
// get the list of sessions where the user is subscribed as coach in a course
$result=api_sql_query("SELECT DISTINCT id, name, date_start, date_end
FROM $tbl_session as session
@ -336,7 +336,7 @@ function get_personal_session_course_list($user_id, $list_sessions)
$sessionIsCoach = api_store_result($result);
$Sessions = array_merge($Sessions , $sessionIsCoach);
// get the list of sessions where the user is subscribed as coach
$result=api_sql_query("SELECT DISTINCT id, name, date_start, date_end
FROM $tbl_session as session
@ -362,7 +362,7 @@ function get_personal_session_course_list($user_id, $list_sessions)
WHERE session_course.id_session = $id_session
AND (session_course.id_coach=$user_id OR session.id_coach=$user_id)
ORDER BY i";
$course_list_sql_result = api_sql_query($personal_course_list_sql, __FILE__, __LINE__);
while ($result_row = mysql_fetch_array($course_list_sql_result))
@ -393,13 +393,13 @@ function get_personal_session_course_list($user_id, $list_sessions)
ORDER BY i";
$course_list_sql_result = api_sql_query($personal_course_list_sql, __FILE__, __LINE__);
while ($result_row = mysql_fetch_array($course_list_sql_result))
{
$key = $result_row['id_session'].' - '.$result_row['k'];
$result_row['s'] = $result_row['14'];
if(!isset($personal_course_list[$key]))
if(!isset($personal_course_list[$key]))
{
$personal_course_list[$key] = $result_row;
}
@ -552,27 +552,27 @@ function display_digest($toolsList, $digest, $orderKey, $courses)
* @todo refactor into different functions for database calls | logic | display
* @todo replace single-character $my_course['d'] indices
* @todo move code for what's new icons to a separate function to clear things up
* @todo add a parameter user_id so that it is possible to show the courselist of other users (=generalisation). This will prevent having to write a new function for this.
* @todo add a parameter user_id so that it is possible to show the courselist of other users (=generalisation). This will prevent having to write a new function for this.
*/
function get_logged_user_course_html($my_course)
{
global $nosession;
if(api_get_setting('use_session_mode')=='true' && !$nosession)
{
global $now, $date_start, $date_end;
}
//initialise
$result = '';
// Table definitions
//$statistic_database = Database::get_statistic_database();
$course_database = $my_course['db'];
$course_tool_table = Database :: get_course_table(TABLE_TOOL_LIST, $course_database);
$tool_edit_table = Database :: get_course_table(TABLE_ITEM_PROPERTY, $course_database);
$course_group_user_table = Database :: get_course_table(TOOL_USER, $course_database);
$course_group_user_table = Database :: get_course_table(TOOL_USER, $course_database);
$user_id = api_get_user_id();
$course_system_code = $my_course['k'];
$course_visual_code = $my_course['c'];
@ -615,19 +615,22 @@ function get_logged_user_course_html($my_course)
$s_htlm_status_icon="";
if($s_course_status==1){
$s_htlm_status_icon="<img src='main/img/teachers.gif'>";
if($s_course_status==1)
{
$s_htlm_status_icon=Display::return_icon('teachers.gif');
}
if($s_course_status==2){
$s_htlm_status_icon="<img src='main/img/coachs.gif'>";
if($s_course_status==2)
{
$s_htlm_status_icon=Display::return_icon('coachs.gif');
}
if($s_course_status==5){
$s_htlm_status_icon="<img src='main/img/students.gif'>";
if($s_course_status==5)
{
$s_htlm_status_icon=Display::return_icon('students.gif');
}
//display course entry
$result.="\n\t";
$result .= '<li id="courses"><div id="coursestatusicons">'.$s_htlm_status_icon.'</div>';
$result .= '<li class="courses"><div class="coursestatusicons">'.$s_htlm_status_icon.'</div>';
//show a hyperlink to the course, unless the course is closed and user is not course admin
if ($course_visibility != COURSE_VISIBILITY_CLOSED || $user_in_course_status == COURSEMANAGER)
{
@ -642,7 +645,7 @@ function get_logged_user_course_html($my_course)
$result .= '<a href="'.api_get_path(WEB_COURSE_PATH).$course_directory.'/?id_session='.$my_course['id_session'].'">'.$course_display_title.'</a>';
}
}
else
else
{
$result .= '<a href="'.api_get_path(WEB_COURSE_PATH).$course_directory.'/">'.$course_display_title.'</a>';
}
@ -731,7 +734,7 @@ function get_logged_user_course_html($my_course)
$session .= ' - '.get_lang('WithoutTimeLimits');
$active = true;
}
else
else
{
$session .= ' - '.get_lang('From').' '.$my_course['date_start'].' '.get_lang('To').' '.$my_course['date_end'];
$active = ($date_start <= $now && $date_end >= $now)?true:false;
@ -739,7 +742,7 @@ function get_logged_user_course_html($my_course)
}
$output = array ($my_course['user_course_cat'], $result, $my_course['id_session'], $session, 'active'=>$active);
}
else
else
{
$output = array ($my_course['user_course_cat'], $result);
}
@ -817,7 +820,7 @@ function show_notification($my_course)
function get_user_course_categories()
{
global $_user;
$table_category = Database::get_user_personal_table(TABLE_USER_COURSE_CATEGORY);
$sql = "SELECT * FROM ".$table_category." WHERE user_id='".$_user['user_id']."'";
$result = api_sql_query($sql,__FILE__,__LINE__);
@ -902,9 +905,9 @@ else
--------------------------------------*/
$list = '';
$personal_course_list = get_personal_session_course_list($_user['user_id']);
/*if(api_get_setting('use_session_mode')=='true' && !$nosession)
{
echo "bouh";
@ -914,7 +917,7 @@ else
{
$personal_course_list = get_personal_course_list($_user['user_id']);
}*/
foreach ($personal_course_list as $my_course)
{
$thisCourseDbName = $my_course['db'];
@ -1034,16 +1037,16 @@ else
if (is_array($list))
{
//print_r($list);
//Courses whithout sessions
$old_user_category = 0;
foreach($list as $key=>$value){
foreach($list as $key=>$value)
{
if($value[2]==0){
$userdefined_categories = get_user_course_categories();
echo "<ul>\n";
if ($old_user_category<>$value[0])
{
if ($key<>0 OR $value[0]<>0) // there are courses in the previous category
@ -1059,14 +1062,14 @@ if (is_array($list))
}
echo $value[1];
echo "</ul>\n";
}
}
$listActives = $listInactives = $listCourses = array();
foreach($list as $key=>$value){
if($value['active'])
@ -1076,7 +1079,7 @@ if (is_array($list))
}
$old_user_category = 0;
$userdefined_categories = get_user_course_categories();
if(count($listActives)>0 && $display_actives){
echo "<ul style=\"line-height: 20px; margin-top: 20px;\">\n";
@ -1124,8 +1127,8 @@ if (is_array($list))
echo "\n</ul><br /><br />\n";
}
/*if(api_get_setting('use_session_mode')=='true' && !$nosession)
{
$listActives = $listInactives = $listCourses = array();
@ -1137,11 +1140,11 @@ if (is_array($list))
}
$old_user_category = 0;
$userdefined_categories = get_user_course_categories();
//Courses which belong to no sessions
//echo "<ul style=\"line-height: 20px;\">\n\n\n\t<ul class=\"user_course_category\"><li>".get_lang("Courses_no_sessions")."</li></ul>\n</ul>";
if(count($listActives)>0 && $display_actives){
echo "<ul style=\"line-height: 20px;\">\n";
@ -1272,9 +1275,9 @@ if (is_array($_plugins['mycourses_menu'])){
echo '<div class="note" style="background: none">';
api_plugin('mycourses_menu');
echo "</div>";
}
echo "</div>"; // end of menu
/*

Loading…
Cancel
Save