skala
Juan Carlos Raña 14 years ago
commit 5e7d38153b
  1. 156
      documentation/default.css
  2. 2
      main/admin/course_add.php
  3. 37
      main/admin/session_add.php
  4. 2
      main/create_course/add_course.php
  5. 18
      main/css/academica/default.css
  6. 2
      main/css/academica/print.css
  7. 18
      main/css/baby_orange/default.css
  8. 2
      main/css/baby_orange/print.css
  9. 69
      main/css/base.css
  10. 24
      main/css/base_chamilo.css
  11. 22
      main/css/blue_lagoon/default.css
  12. 2
      main/css/blue_lagoon/print.css
  13. 4
      main/css/chamilo/default.css
  14. 32
      main/css/chamilo/frames.css
  15. 2
      main/css/chamilo/print.css
  16. 4
      main/css/chamilo_electric_blue/default.css
  17. 2
      main/css/chamilo_electric_blue/print.css
  18. 4
      main/css/chamilo_green/default.css
  19. 33
      main/css/chamilo_green/frames.css
  20. 2
      main/css/chamilo_green/print.css
  21. 10
      main/css/chamilo_orange/default.css
  22. 2
      main/css/chamilo_orange/print.css
  23. 4
      main/css/chamilo_red/default.css
  24. 2
      main/css/chamilo_red/print.css
  25. 16
      main/css/chamilo_sport_red/default.css
  26. 2
      main/css/chamilo_sport_red/print.css
  27. 28
      main/css/cool_blue/default.css
  28. 2
      main/css/cool_blue/print.css
  29. 22
      main/css/corporate/default.css
  30. 2
      main/css/corporate/print.css
  31. 18
      main/css/cosmic_campus/default.css
  32. 2
      main/css/cosmic_campus/print.css
  33. 28
      main/css/delicious_bordeaux/default.css
  34. 2
      main/css/delicious_bordeaux/print.css
  35. 22
      main/css/dokeos_blue/default.css
  36. 2
      main/css/dokeos_blue/print.css
  37. 28
      main/css/dokeos_classic/default.css
  38. 2
      main/css/dokeos_classic/print.css
  39. 28
      main/css/dokeos_classic_2D/default.css
  40. 2
      main/css/dokeos_classic_2D/print.css
  41. 28
      main/css/empire_green/default.css
  42. 2
      main/css/empire_green/print.css
  43. 28
      main/css/fruity_orange/default.css
  44. 2
      main/css/fruity_orange/print.css
  45. 4
      main/css/kiddy/default.css
  46. 28
      main/css/medical/default.css
  47. 28
      main/css/medical/images/default.css
  48. 2
      main/css/print.css
  49. 28
      main/css/public_admin/default.css
  50. 2
      main/css/public_admin/print.css
  51. 10
      main/css/responsive.css
  52. 22
      main/css/royal_purple/default.css
  53. 2
      main/css/royal_purple/print.css
  54. 16
      main/css/silver_line/default.css
  55. 2
      main/css/silver_line/print.css
  56. 28
      main/css/sober_brown/default.css
  57. 2
      main/css/sober_brown/print.css
  58. 22
      main/css/steel_grey/default.css
  59. 2
      main/css/steel_grey/print.css
  60. 43
      main/css/tasty_olive/default.css
  61. 2
      main/css/tasty_olive/print.css
  62. 32
      main/forum/viewforum.php
  63. 2
      main/gradebook/gradebook_add_link.php
  64. 2
      main/gradebook/index.php
  65. 6
      main/gradebook/lib/be/forumthreadlink.class.php
  66. 20
      main/gradebook/lib/fe/gradebooktable.class.php
  67. 2
      main/gradebook/lib/gradebook_functions.inc.php
  68. 860
      main/img/icons/22/profile.php.orig
  69. 5
      main/inc/global_error_message.inc.php
  70. 6
      main/inc/lib/banner.lib.php
  71. 44
      main/inc/lib/course.lib.php
  72. 1
      main/inc/lib/database.lib.php
  73. 1
      main/inc/lib/database.mysqli.lib.php
  74. 2
      main/inc/lib/formvalidator/FormValidator.class.php
  75. 6
      main/inc/lib/plugin.lib.php
  76. 41
      main/inc/lib/social.lib.php
  77. 27
      main/inc/lib/userportal.lib.php
  78. 2
      main/social/home.php
  79. 2
      main/social/invitations.php
  80. 405
      main/social/profile.php
  81. 11
      main/template/default/layout/layout_2_col.tpl
  82. 12
      main/template/default/layout/login_form.tpl
  83. 4
      main/template/default/layout/main_header.tpl
  84. 2
      main/template/default/layout/social_layout.tpl
  85. 6
      main/work/download.php
  86. 36
      main/work/work.lib.php
  87. 661
      main/work/work.php
  88. 2
      plugin/bbb/uninstall.php

@ -3,7 +3,7 @@
(info@ws-webservice.de / webmaster@bibelcenter.de)
updated on 2005-02-25 by Olivier Brouckaert
(oli.brouckaert@dokeos.com)
update on 2005-03-01 by Wolfgang Schneider
update on 2005-03-01 by Wolfgang Schneider
update on 2005-05-27 by Patrick Cool
*/
@ -15,13 +15,13 @@ body {
padding: 0;
background-color: #fff;
}
img {
border: none;
img {
border: none;
}
#outerframe {
position: relative; /* do not remove, fixes a bug in IE */
border: 1px solid #fff;
border: 1px solid #fff;
background-color: #fff;
}
@ -29,7 +29,7 @@ img {
* html #outerframe {height: 1%;}
/* End hide from IE5-mac */
/*****************************************************
/*****************************************************
* HEADER STYLES *
*****************************************************/
#header {
@ -54,57 +54,57 @@ img {
#header1 a:hover{
text-decoration: underline;
}
#sitename {
margin: 0;
#sitename {
margin: 0;
font-weight: bold;
}
#institution {
float: left;
float: left;
font-weight: bold;
}
#my_courses {
float: right;
float: right;
font-weight: bold;
}
/* Header 2: Containing My Courses, My Profile,... */
#header2 {
font-size: 12px;
padding: 4px;
background-color: #4271B5;
color: #fff;
background-color: #4271B5;
color: #fff;
border-bottom: 1px solid white;
}
#header2 .banner_links {
margin: 0;
margin: 0;
}
#header2 a {
#header2 a {
text-decoration: none;
color: #fff;
color: #fff;
background: transparent;
font-weight:normal;
font-size: 12px;
}
#header2 input.logout {
/* makes an input appear like a link in this header */
margin: 0;
padding: 0;
background-color: transparent;
#header2 input.logout {
/* makes an input appear like a link in this header */
margin: 0;
padding: 0;
background-color: transparent;
border: none;
color: #fff;
color: #fff;
font-size: 12px;
font-weight:normal;
font-family: verdana, arial, helvetica, sans-serif;
font-family: verdana, arial, helvetica, sans-serif;
}
#header2 a:hover, #header2 input.logout:hover {
border-bottom: 1px solid #fff;
}
#logout {
float: right;
width:20%;
float: right;
width:20%;
text-align:right;
}
/* Header 3: Containing breadcrumbs, online users, student/teacher view, help */
#header3 {
.subnav {
position: relative; /* to avoid the IE peekabo bug*/
font-size: 12px;
font-weight: normal;
@ -113,16 +113,16 @@ img {
color: #fff;
border-bottom: 1px solid white;
}
#header3 a {
.subnav a {
color: #ffffff;
text-decoration: none;
font-weight:normal;
}
#header3 a:hover{
.subnav a:hover{
text-decoration: underline;
}
/* Header3Right: online users, student/teacher view, help */
#Header3Right ul{
.subnavRight ul{
position: relative; /* to avoid the IE peekabo bug*/
float: right;
width: 50%;
@ -131,12 +131,12 @@ img {
list-style-type: none;
text-align: right;
}
#Header3Right ul li {
display: inline;
.subnavRight ul li {
display: inline;
}
#Header3Right ul li a {
padding: 4px 6px 4px 4px;
color:#fff;
.subnavRight ul li a {
padding: 4px 6px 4px 4px;
color:#fff;
}
/* Header 4: not used */
#header4 {
@ -157,7 +157,7 @@ img {
text-align: right;
}
/*****************************************************
/*****************************************************
* FOOTER STYLES *
*****************************************************/
#footer {
@ -170,7 +170,7 @@ img {
float: right;
}
/*****************************************************
/*****************************************************
* MAIN STYLES *
*****************************************************/
#main {
@ -209,7 +209,7 @@ img {
background-color: #fff; font-size: 12px; color: #f00;}
/*** layout divs for course and tool pages (being tested in some pages) ****/
/*** layout divs for course and tool pages (being tested in some pages) ****/
#contentfloatholder {/* also makes the right "sliding" tab */
/*background: url(../pics/sidebar-r.gif) repeat-y 100% 0;
background: url(../pics/bg_fountain.jpg) no-repeat 100% 0; */
@ -220,26 +220,26 @@ position: relative;
#contentfloatholder:after {
/* this is for NN6 to clear floats */
content: ".";
display: block;
content: ".";
display: block;
height: 0px;
clear: both;
clear: both;
visibility: hidden;
}
#centerwrap {
float: left;
width: 100%;
margin-right: -95%;
/* this needs to be less than 100% for Moz/Mac which thinks
it's empty otherwise. The difference is made up by putting a
width: 100%;
margin-right: -95%;
/* this needs to be less than 100% for Moz/Mac which thinks
it's empty otherwise. The difference is made up by putting a
negative left margin on the left float:
Note IE/Mac doesn't like this method ~ it wants the 100% so it can
be fed in using IE only CSS below becasue IE/Win also works with the 100% method.
Note IE/Mac doesn't like this method ~ it wants the 100% so it can
be fed in using IE only CSS below becasue IE/Win also works with the 100% method.
*/
}
#center { margin: 0 0 0 180px; padding: 10px 0 40px 0;
#center { margin: 0 0 0 180px; padding: 10px 0 40px 0;
min-height: 300px; }
#left { float: left; width: 180px; padding: 20px 0 0 0;
@ -249,8 +249,8 @@ visibility: hidden;
#leftnavbox { margin: 0; padding: 0; float:left;}
#leftnavbox dl { width: 160px; margin: 12px auto 4px auto; padding: 0 0 10px 0;
background: transparent; font-size: 12px; text-align: center; }
#leftnavbox dt { margin: 0; padding: 1px 2px; font-weight: bold; font-size: 12px;
text-align: center; color: #000;
#leftnavbox dt { margin: 0; padding: 1px 2px; font-weight: bold; font-size: 12px;
text-align: center; color: #000;
border-bottom: 1px solid #fff; background: transparent; }
#leftnavbox dd { margin: 0; padding: 0; color: #009; text-align: left;
border-bottom:1px solid #fff; background: #ccf; }
@ -260,10 +260,10 @@ border-bottom:1px solid #fff; background: #ccf; }
#leftnavlist a:visited {color:#eee; text-decoration: none; display: block; padding: 2px 5px 2px 10px;
background: #4171B5; color: #eee; width:140px; }
#leftnavlist a:hover { background: #fff; color:#4171B5; display: block;}
/* --- end of left side definition list menu section --- */
/* --- end of left side definition list menu section --- */
/* various sections in course-home.php file */
#toolremove {width: 40%; color: #f00; font-weight: bold;
margin: 10px auto; padding: 10px; border: 2px solid #f00;}
@ -311,20 +311,20 @@ border-bottom:1px solid #fff; background: #ccf; }
-----------------------------------------------------*/
#agenda_list {width: 100%; margin: 0 auto; border: 1px solid #fff;
border-collapse: collapse;}
/*The caption of the calendar (displays the month and the << and >> links*/
/*The caption of the calendar (displays the month and the << and >> links*/
#agenda_list #title {background-color: #4171B5; font-weight: bold;
font-size: 12px; color: #fff; text-align: left; padding: 2px 10px; text-align: center; border: 1px solid #264269;}
#agenda_list #title a:link, #agenda_list #title a:visited {background-color: #4171B5; font-weight: bold;
font-size: 12px; color: #fff; text-align: left; padding: 2px 10px;text-align: center;}
#agenda_list #title a:hover {background-color: #4171B5; font-weight: bold;
font-size: 12px; color: #ff0000; text-align: left; padding: 2px 10px;text-align: center;}
/* The cells with the name of the days of the weeks (mon->sun)*/
#agenda_list .weekdays {background-color: #D3DFF1; text-align: center;
font-weight: bold; border: 1px solid #264269; border-collapse: collapse;}
/* The cells for the days (1->31) */
/* The cells for the days (1->31) */
#agenda_list .days_week {height: 40px; width: 12%; text-align: left; vertical-align: top;
border: 1px solid #264269; border-collapse: collapse; background-color: #f5f5f5;}
#agenda_list .days_weekend {height: 40px; width: 12%; text-align: left; vertical-align: top;
@ -336,29 +336,29 @@ border-bottom:1px solid #fff; background: #ccf; }
#agenda_list .data {background-color: #eee; text-align: left; padding: 2px 10px;
font-weight: bold; border: 0px solid #4171B5; border-collapse: collapse;}
#agenda_list .datanotbold {background-color: #eee; text-align: left; padding: 2px 10px;
font-weight: normal; border: 0px solid #4171B5; border-collapse: collapse;}
font-weight: normal; border: 0px solid #4171B5; border-collapse: collapse;}
#agenda_list .text {background-color: #fff; text-align: left; padding: 2px 10px;
font-weight: normal; border: 0px solid #4171B5; border-collapse: collapse;}
/*text in the cells: display of agenda items (invisible)*/
/*text in the cells: display of agenda items (invisible)*/
#agenda_list .data_hidden {background-color: #eee; text-align: left; padding: 2px 10px;
font-weight: bold; border: 0px solid #4171B5; border-collapse: collapse; color: #999999;}
#agenda_list .datanotbold_hidden {background-color: #eee; text-align: left; padding: 2px 10px;
font-weight: normal; border: 0px solid #4171B5; border-collapse: collapse; color: #999999;}
font-weight: normal; border: 0px solid #4171B5; border-collapse: collapse; color: #999999;}
#agenda_list .text_hidden {background-color: #fff; text-align: left; padding: 2px 10px;
font-weight: normal; border: 0px solid #4171B5; border-collapse: collapse; color: #999999;}
/*text in the cells: display of agenda items (highlighted)*/
/*text in the cells: display of agenda items (highlighted)*/
#agenda_list .datanow {background-color: #FFCC00; text-align: left; padding: 2px 10px;
font-weight: bold; border: 0px solid #4171B5; border-collapse: collapse;}
#agenda_list .datanotboldnow {background-color: #FFCC00; text-align: left; padding: 2px 10px;
font-weight: normal; border: 0px solid #4171B5; border-collapse: collapse;}
font-weight: normal; border: 0px solid #4171B5; border-collapse: collapse;}
#agenda_list .textnow {background-color: #fff; text-align: left; padding: 2px 10px;
font-weight: normal; border: 0px solid #4171B5; border-collapse: collapse;}
font-weight: normal; border: 0px solid #4171B5; border-collapse: collapse;}
/* ---------------------------------------------------
styles for the mini agenda
-----------------------------------------------------*/
-----------------------------------------------------*/
#smallcalendar {width: 100%; margin: 0 auto; border: 1px solid #fff;
border-collapse: collapse;}
#smallcalendar .weekdays {background-color: #D3DFF1; text-align: center;
@ -368,15 +368,15 @@ border-bottom:1px solid #fff; background: #ccf; }
#smallcalendar .days_weekend {background-color: #e6e6e6; text-align: center;
font-size: 11px; border: 1px solid #fff; border-collapse: collapse;}
#smallcalendar .days_today {width: 12%; text-align: center;
font-size: 11px; border: 1px solid #FA8500; border-collapse: collapse; background-color: #FFCA8D;}
font-size: 11px; border: 1px solid #FA8500; border-collapse: collapse; background-color: #FFCA8D;}
/* ---------------------------------------------------
styles for the personal agenda
-----------------------------------------------------*/
.personal_agenda {color: #008000; }
.personal_agenda a:link, .personal_agenda a:visited {color: #008000; }
.personal_agenda a:link, .personal_agenda a:visited {color: #008000; }
a.personal_agenda:link, a.personal_agenda:visited {color: #008000; }
.personal_agenda a:hover, .personal_agenda a:hover {color: #666666; }
.personal_agenda a:hover, .personal_agenda a:hover {color: #666666; }
a.personal_agenda:hover, a.personal_agenda:hover {color: #666666; }
@ -394,12 +394,12 @@ a.personal_agenda:hover, a.personal_agenda:hover {color: #666666; }
}
.normal-message {
border: 1px solid #FF8001;
color: #000;
color: #000;
background-color: #FDC77E;
}
.error-message {
border: 1px solid #3F70AC;
color: #000;
color: #000;
background-color: #FDC273;
}
@ -485,7 +485,7 @@ input.liteoption {font-weight : normal;} /* None-bold submit button */
select,
input[type=checkbox],
input[type=radio],
input[type=button],
input[type=button],
input[type=submit] {cursor: pointer; font-size: 12px;}
input[text] {font-size: 12px; }
@ -514,14 +514,14 @@ padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;}
.xxsmall { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px}
/*****************************************************
/*****************************************************
* DATA TABLE STYLES *
*****************************************************/
.cell_header {background-color: #EEEEFF;font-weight:bold;text-align:left;padding-left:5px;} /* header cell in data table in tools */
.data_table{
border-collapse: collapse;
width: 100%;
width: 100%;
padding: 5px;
}
.data_table th{
@ -542,7 +542,7 @@ padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;}
padding: 5px;
vertical-align: top;
border-bottom: 1px solid #b0b0b0;
border-right: 1px dotted #e1e1e1;
border-right: 1px dotted #e1e1e1;
border-left: 1px dotted #e1e1e1;
}
@ -551,12 +551,12 @@ padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;}
.tool_list dd { margin: 0; padding: 4px 0 0 10px;}
/* divs for category list / platform news on home page */
.home_cats {width: 45%; float: left;
.home_cats {width: 45%; float: left;
margin: 0; padding: 8px; background: #fff;}
.home_news {width: 45%; float: right;
.home_news {width: 45%; float: right;
margin: 0; padding: 8px; background: #fff;}
label.left { float: left; width: 15em; margin: 0 0 0.5em 0; }
form br { clear: both; }
@ -578,7 +578,7 @@ div.admin_section {
padding: 5px;
margin: 10px 20px;
}
div.admin_section h4 {
div.admin_section h4 {
margin: 0;
border-bottom: 1px solid gray;
width: 100%;
@ -617,7 +617,7 @@ div.admin_section h4 {
/* New Announcements Tool */
.announcements_datum
{
{
font-size: 12px;
font-style: italic;
color: #666666;

@ -55,7 +55,7 @@ $form = new FormValidator('update_course');
$form->addElement('header', '', $tool_name);
// Title
$form->add_textfield('title', get_lang('Title'), true, array ('size' => '60'));
$form->add_textfield('title', get_lang('Title'), true, array ('class' => 'span6'));
$form->applyFilter('title', 'html_filter');
$form->applyFilter('title', 'trim');

@ -140,39 +140,34 @@ $thisYear=date('Y');
$thisMonth=date('m');
$thisDay=date('d');
$tool_name = get_lang('AddSession');
//display the header
Display::display_header($tool_name);
if (!empty($return)) {
Display::display_error_message($return,false);
}
?>
<form method="post" name="form" action="<?php echo api_get_self(); ?>" style="margin:0px;">
<input type="hidden" name="formSent" value="1">
<?php
echo '<div class="actions">';
echo '<a href="../admin/index.php">'.Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('PlatformAdmin'),'',ICON_SIZE_MEDIUM).'</a>';
echo '</div>';
?>
<div class="row">
<div class="label">
?>
<form class="form-horizontal" method="post" name="form" action="<?php echo api_get_self(); ?>" style="margin:0px;">
<input type="hidden" name="formSent" value="1">
<div class="control-group">
<label class="control-label">
<?php echo get_lang('SessionName') ?>
</div>
<div class="formw">
</label>
<div class="controls">
<input type="text" name="name" size="50" maxlength="50" value="<?php if($formSent) echo api_htmlentities($name,ENT_QUOTES,$charset); ?>">
</div>
</div>
<div class="row">
<div class="label">
<div class="control-group">
<label class="control-label">
<?php echo get_lang('CoachName') ?>
</div>
<div class="formw">
</label>
<div class="controls">
<?php
@ -213,18 +208,16 @@ if (intval($count_users)<50) {
}
$Categories = SessionManager::get_all_session_category();
?>
</div>
</div>
<div class="row">
<div class="label">
<div class="control-group">
<label class="control-label">
<?php echo get_lang('SessionCategory') ?>
</div>
<div class="formw">
</label>
<div class="controls">
<select id="session_category" class="chzn-select" name="session_category" style="width:350px;" title="<?php echo get_lang('Select'); ?>">
<option value="0"><?php get_lang('None'); ?></option>
<?php

@ -90,7 +90,7 @@ $form = new FormValidator('add_course');
$form->addElement('header', '', $tool_name);
// Title
$form->addElement('text', 'title', array(get_lang('CourseName'), get_lang('Ex')), array('size' => '60', 'id' => 'title'));
$form->addElement('text', 'title', array(get_lang('CourseName'), get_lang('Ex')), array('class' => 'span6', 'id' => 'title'));
$form->applyFilter('title', 'html_filter');
$form->addRule('title', get_lang('ThisFieldIsRequired'), 'required');

@ -49,7 +49,7 @@ a:active {
font-weight: bold;
}
/* header 3 styles */
#header3 {
.subnav {
border-bottom: 1px solid #aeaeae;
font-weight: bold;
margin: 0;
@ -57,7 +57,7 @@ a:active {
width:100%;
}
#header3 UL {
.subnav UL {
PADDING-RIGHT: 2px;
PADDING-LEFT: 10px;
PADDING-BOTTOM: 0px;
@ -65,7 +65,7 @@ a:active {
LIST-STYLE-TYPE: none;
display: inline;
}
#header3 LI {
.subnav LI {
PADDING-RIGHT: 0px;
PADDING-LEFT: 9px;
FLOAT: left;
@ -74,34 +74,34 @@ a:active {
PADDING-TOP: 0px;/*border-bottom: 1px solid #dcdcdc;*/
cursor: pointer;
}
#header3 a {
.subnav a {
float:left;
text-decoration:none;
cursor: pointer;
padding-right: 1px;
height:25px;
}
#header3 li a:hover {
.subnav li a:hover {
float:left;
text-decoration:none;
cursor: pointer;
}
#header3 li a span {
.subnav li a span {
float:left;
cursor: pointer;
padding-right: 10px;
padding-top: 5px;
height:20px;
}
#header3 li a:hover span {
.subnav li a:hover span {
float:left;
cursor: pointer;
}
#header3 #current a {
.subnav #current a {
float:left;
text-decoration:none;
}
#header3 #current a span {
.subnav #current a span {
float:left;
}

@ -51,7 +51,7 @@ img {
#header2 {
display: none;
}
#header3 {
.subnav {
display: none;
}
/* show the way to the printed document (breadcrumbs)*/

@ -52,14 +52,14 @@ a:active {
}
/* header 3 styles */
#header3 {
.subnav {
border-bottom: 1px solid #aeaeae;
font-weight: bold;
margin: 0;
padding: 0;
width:100%;
}
#header3 UL {
.subnav UL {
PADDING-RIGHT: 2px;
PADDING-LEFT: 10px;
PADDING-BOTTOM: 0px;
@ -67,7 +67,7 @@ a:active {
LIST-STYLE-TYPE: none;
display: inline;
}
#header3 LI {
.subnav LI {
PADDING-RIGHT: 0px;
PADDING-LEFT: 9px;
FLOAT: left;
@ -76,34 +76,34 @@ a:active {
PADDING-TOP: 0px;/*border-bottom: 1px solid #dcdcdc;*/
cursor: pointer;
}
#header3 a {
.subnav a {
float:left;
text-decoration:none;
cursor: pointer;
padding-right: 1px;
height:25px;
}
#header3 li a:hover {
.subnav li a:hover {
float:left;
text-decoration:none;
cursor: pointer;
}
#header3 li a span {
.subnav li a span {
float:left;
cursor: pointer;
padding-right: 10px;
padding-top: 5px;
height:20px;
}
#header3 li a:hover span {
.subnav li a:hover span {
float:left;
cursor: pointer;
}
#header3 #current a {
.subnav #current a {
float:left;
text-decoration:none;
}
#header3 #current a span {
.subnav #current a span {
float:left;
}

@ -51,7 +51,7 @@ img {
#header2 {
display: none;
}
#header3 {
.subnav {
display: none;
}
/* show the way to the printed document (breadcrumbs)*/

@ -46,23 +46,19 @@ legend {
padding:40px 0px 0px 0px;
}
#header2 .nav{
margin-bottom:0px;
}
/* menu dropdown fixes */
#header3 .nav .open > .dropdown-toggle, #header3 .nav .active > .dropdown-toggle, #header3 .nav .open.active > .dropdown-toggle {
.subnav .nav .open > .dropdown-toggle, .subnav .nav .active > .dropdown-toggle, .subnav .nav .open.active > .dropdown-toggle {
background-color: transparent;
}
#header3 .dropdown-menu li a {
.subnav .dropdown-menu li a {
color:#333;
}
#header3 .dropdown-toggle {
.subnav .dropdown-toggle {
height: 15px;
}
#header3 li a {
.subnav li a {
margin:0px;
}
@ -246,10 +242,6 @@ a.tag {
margin-bottom:10px;
}
.course_item {
padding-bottom: 40px;
}
/* user_portal course status icon */
.coursestatusicons {
border: 0px solid #000;
@ -1663,20 +1655,6 @@ div.image-social-content center.friend {
.social-profile-info {
width:100%;
}
.social-profile-info dt {
text-align:left;
clear:left;
float:left;
width:120px;
}
.social-profile-info dd {
padding:1px 0px 3px 0px;
float:left;
margin:0;
display : block;
padding-left:5px;
width:150px;
}
/* general layout of the profile page */
@ -1809,11 +1787,6 @@ div.image-social-content center.friend {
margin-bottom:10px;
}
.social_user_information {
width:300px;
float:left;
}
.social-friend-container {
width:100%;
overflow:hidden;
@ -1839,40 +1812,6 @@ div.image-social-content center.friend {
width:76px;
}
/* styles from the my.profile.php file */
#social_widget {
margin: 0 20px;
}
#social_widget_image {
float:left;
margin-bottom:10px;
padding:2px;
}
/* SOCIAL BOX */
.social-box-main1 {
width:100%;
height:auto;
overflow:hidden;
}
.social-box-left {
width:340px;
float:left;
height:auto;
margin:0px;
}
.social-box-right {
width:280px;
float:left;
height:auto;
margin-left:18px;
overflow:hidden;
}
.box_shared_profile_group_title {
border-bottom:1pt dotted #000;
padding:5px;

@ -303,16 +303,6 @@ input.link_alike:hover {
height:16px;
padding-right:4%;
}
/********************************************************
* HEADER 2: Users online, help, student/teacher view *
********************************************************/
#header2 a {
}
#header2 a:hover {
text-decoration: underline;
}
#current {
color:#FFFFFF;
cursor:pointer;
@ -1832,9 +1822,7 @@ div#friend-header {
div#friend-header a {
padding-right:6px;
}
div#friend-container {
float:left;
}
div.image_friend_network {
float:left;
/* border:1px solid #CCCCCC; */
@ -1857,8 +1845,7 @@ div.image_friend_network center.friend {
overflow:hidden;
height:30px;
}
.friend_invitations {
float:left;
.friend_invitations {
margin: 0 0 4px 12px;
}
/* button >> */
@ -2148,7 +2135,7 @@ span.form_required {
padding:20px;
}
#header3 {
.subnav {
font-size: 11px;
font-weight: bold;
}
@ -2191,6 +2178,11 @@ span.form_required {
/* end default subnav background colors */
}
/* fixing gray border next the logout button */
.subnav .nav-tabs .open .dropdown-toggle, .subnav .nav-pills .open .dropdown-toggle, .nav > .open.active > a:hover {
border-color: transparent;
}
.subnav .nav {
margin-bottom: 0;
}

@ -403,7 +403,7 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
/*****************************************************
* HEADER 3: TABS OF THE HEADER *
*****************************************************/
#header3 {
.subnav {
background-image: url(images/tab-repeat.png);
background-position: 0px 0px;
background-repeat: repeat-x;/*border: 1px solid green;*/
@ -412,7 +412,7 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
padding-right:0px;
width: 100%;
}
#header3 a {
.subnav a {
DISPLAY: block;
PADDING-RIGHT: 15px;
PADDING-LEFT: 6px;
@ -420,17 +420,17 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
PADDING-TOP: 10px;
float: left;
}
#header3 a:hover {
.subnav a:hover {
color: #a8a7a7;
background: none;
}
#header3 ul {
.subnav ul {
PADDING-BOTTOM: 0px;
MARGIN: 0px;
LIST-STYLE-TYPE: none;
display: inline;
}
#header3 li {
.subnav li {
PADDING-RIGHT: 0px;
PADDING-LEFT: 9px;
FLOAT: left;
@ -439,29 +439,29 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
padding-top: 10px;
height: 31px;
}
#header3 li#current {
.subnav li#current {
background: url(images/tab-left.png) no-repeat top left;
padding-top: 0px;
height: 41px;
float: left;
}
#header3 #current a {
.subnav #current a {
background: url(images/tab-right.png) no-repeat top right;
height: 31px;
}
#header3 .banner_links {
.subnav .banner_links {
margin: 0;
}
#header3 input {
.subnav input {
padding-right: 15px;
display: block;
padding-left: 6px;
}
#header3 #logout {
.subnav #logout {
margin-top: 0px;
}
#header3 input.logout:hover {
.subnav input.logout:hover {
}
#logout {
display: inline;

@ -51,7 +51,7 @@ img {
#header2 {
display: none;
}
#header3 {
.subnav {
display: none;
}
/* show the way to the printed document (breadcrumbs)*/

@ -66,12 +66,12 @@ a:active {
border-right-color: #028DC2;
}
#header3 li a {
.subnav li a {
color:#fff;
}
/* Green hover */
#header3 li a:hover {
.subnav li a:hover {
background: none repeat scroll 0 0 #8ECB50;
color: #fff;
}

@ -55,38 +55,6 @@ img {
float: right;
font-weight: bold;
}
/* Header 2: Containing My Courses, My Profile,... */
#header2 {
font-size: 12px;
padding: 4px;
background-color: #4271B5;
color: #fff;
border-bottom: 1px solid white;
}
#header2 .banner_links {
margin: 0;
}
#header2 a {
text-decoration: none;
color: #fff;
background: transparent;
font-weight:normal;
font-size: 12px;
}
#header2 input.logout {
/* makes an input appear like a link in this header */
margin: 0;
padding: 0;
background-color: transparent;
border: none;
color: #fff;
font-size: 12px;
font-weight:normal;
font-family: verdana, arial, helvetica, sans-serif;
}
#header2 a:hover, #header2 input.logout:hover {
border-bottom: 1px solid #fff;
}
#logout {
float: right;
width:20%;

@ -51,7 +51,7 @@ img {
#header2 {
display: none;
}
#header3 {
.subnav {
display: none;
}
/* show the way to the printed document (breadcrumbs)*/

@ -66,12 +66,12 @@ a:active {
border-right-color: #0015E2;
}
#header3 li a {
.subnav li a {
color:#fff;
}
/* Green hover */
#header3 li a:hover {
.subnav li a:hover {
background: none repeat scroll 0 0 #0015E2;
color: #fff;
}

@ -51,7 +51,7 @@ img {
#header2 {
display: none;
}
#header3 {
.subnav {
display: none;
}
/* show the way to the printed document (breadcrumbs)*/

@ -62,12 +62,12 @@ a:active {
border-right-color: #9BD10A;
}
#header3 li a {
.subnav li a {
color:#fff;
}
/* Green hover */
#header3 li a:hover {
.subnav li a:hover {
background: none repeat scroll 0 0 #9BD10A;
color: #fff;
}

@ -55,38 +55,7 @@ img {
float: right;
font-weight: bold;
}
/* Header 2: Containing My Courses, My Profile,... */
#header2 {
font-size: 12px;
padding: 4px;
background-color: #4271B5;
color: #fff;
border-bottom: 1px solid white;
}
#header2 .banner_links {
margin: 0;
}
#header2 a {
text-decoration: none;
color: #fff;
background: transparent;
font-weight:normal;
font-size: 12px;
}
#header2 input.logout {
/* makes an input appear like a link in this header */
margin: 0;
padding: 0;
background-color: transparent;
border: none;
color: #fff;
font-size: 12px;
font-weight:normal;
font-family: verdana, arial, helvetica, sans-serif;
}
#header2 a:hover, #header2 input.logout:hover {
border-bottom: 1px solid #fff;
}
#logout {
float: right;
width:20%;

@ -51,7 +51,7 @@ img {
#header2 {
display: none;
}
#header3 {
.subnav {
display: none;
}
/* show the way to the printed document (breadcrumbs)*/

@ -65,28 +65,28 @@ a:active {
border-right-color: #F88017;
}
#header3 li a {
.subnav li a {
color:#fff;
}
/* Green hover */
#header3 li a:hover {
.subnav li a:hover {
background: none repeat scroll 0 0 #FFAE67;
color: #fff;
}
/*
#header3 li a {
.subnav li a {
background-color: #F88017;
color:#fff;
}
#header3 li a:hover {
.subnav li a:hover {
background: none repeat scroll 0 0 #FFAE67;
color: #FFFFFF;
}
#header3 #current a {
.subnav #current a {
background: none repeat scroll 0 0 #DF7619;
}
*/

@ -51,7 +51,7 @@ img {
#header2 {
display: none;
}
#header3 {
.subnav {
display: none;
}
/* show the way to the printed document (breadcrumbs)*/

@ -65,12 +65,12 @@ a:active {
border-right-color: #D60B19;
}
#header3 li a {
.subnav li a {
color:#fff;
}
/* Green hover */
#header3 li a:hover {
.subnav li a:hover {
background: none repeat scroll 0 0 #E8222F;
color: #fff;
}

@ -51,7 +51,7 @@ img {
#header2 {
display: none;
}
#header3 {
.subnav {
display: none;
}
/* show the way to the printed document (breadcrumbs)*/

@ -7,13 +7,13 @@
/**********************/
/*** ADICIONAL CODE ***/
/**********************/
div#header3 ul li a span {
div.subnav ul li a span {
font-size:13px;
}
div#header3 ul#logout {
div.subnav ul#logout {
margin-right: -2px;
}
#header3 {
.subnav {
border-bottom: 0px;
}
.subnav {
@ -102,31 +102,31 @@ a:active {
/* height: 47px; */
margin-bottom: 43px;
}
#header3 {
.subnav {
background-image:url(images/bg-header4.png);
}
#header4 {
/*background-image:url(images/bg-header4.png);*/
}
#header3 li {
.subnav li {
background:transparent url(images/tab_left.png) no-repeat scroll left top;
border:none;
margin-right: 2px;
}
#header3 li a {
.subnav li a {
background:transparent url(images/tab_right.png) no-repeat scroll right top;
margin-left: 5px;
border:none;
color:#ffffff;
}
#header3 li#current {
.subnav li#current {
background:transparent url(images/tab_left-active.png) no-repeat scroll left top;
height: 30px;
}
#header3 #current a {
.subnav #current a {
background:transparent url(images/tab_right-active.png) no-repeat scroll right top;
}
.maincontent {

@ -51,7 +51,7 @@ img {
#header2 {
display: none;
}
#header3 {
.subnav {
display: none;
}
/* show the way to the printed document (breadcrumbs)*/

@ -374,14 +374,14 @@ a:active {
/*****************************************************
* HEADER 3: TABS OF THE HEADER *
*****************************************************/
#header3 {
.subnav {
background-image: url(images/tab-repeat.png);
background-position: 0px 0px;
background-repeat: repeat-x;/*border: 1px solid green;*/
height:41px;
width:100%;
}
#header3 a {
.subnav a {
DISPLAY: block;
PADDING-RIGHT: 15px;
PADDING-LEFT: 6px;
@ -389,16 +389,16 @@ a:active {
float:left;
PADDING-TOP: 10px;
}
#header3 a:hover {
.subnav a:hover {
color: #a8a7a7;
}
#header3 ul {
.subnav ul {
PADDING-BOTTOM: 0px;
MARGIN: 0px;
LIST-STYLE-TYPE: none;
display: inline;
}
#header3 li {
.subnav li {
PADDING-RIGHT: 0px;
PADDING-LEFT: 9px;
FLOAT: left;
@ -407,20 +407,20 @@ a:active {
padding-top: 10px;
height: 31px;
}
#header3 li#current {
.subnav li#current {
background: url(images/tab-left.png) no-repeat top left;
padding-top: 0px;
height: 41px;
float: left;
}
#header3 #current a {
.subnav #current a {
background: url(images/tab-right.png) no-repeat top right;
height: 31px;
}
#header3 .banner_links {
.subnav .banner_links {
margin: 0;
}
#header3 input.logout {
.subnav input.logout {
/* makes an input appear like a link in this header */
margin: 0 0 0 0;
padding: 0;
@ -433,19 +433,19 @@ a:active {
PADDING-RIGHT: 10px;
PADDING-TOP: 3px;
}
#header3 input:hover {
.subnav input:hover {
color: #333;
background: url(../../img/tab_right_hover.gif) no-repeat right top;
}
#header3 input {
.subnav input {
padding-right: 15px;
display: block;
padding-left: 6px;
}
#header3 #logout {
.subnav #logout {
margin-top: 0px;
}
#header3 input.logout:hover {
.subnav input.logout:hover {
}
#logout {
display: inline;
@ -453,7 +453,7 @@ a:active {
width: auto;
text-align: right;
}
#header3 .clear {
.subnav .clear {
display: none;
}
/*****************************************************

@ -51,7 +51,7 @@ img {
#header2 {
display: none;
}
#header3 {
.subnav {
display: none;
}
/* show the way to the printed document (breadcrumbs)*/

@ -105,7 +105,7 @@ input[type=button], input[type=submit] {
color:#333;
}
/* header 3 styles */
#header3 {
.subnav {
background: #fff;
border-bottom: 1px solid #aeaeae;
color: #333;
@ -114,7 +114,7 @@ input[type=button], input[type=submit] {
width:100%;
}
#header3 UL {
.subnav UL {
PADDING-RIGHT: 2px;
PADDING-LEFT: 10px;
PADDING-BOTTOM: 0px;
@ -122,7 +122,7 @@ input[type=button], input[type=submit] {
list-style:none;
display: inline;
}
#header3 LI {
.subnav LI {
PADDING-RIGHT: 0px;
PADDING-LEFT: 2px;
FLOAT: left;
@ -133,7 +133,7 @@ input[type=button], input[type=submit] {
}
#header3 a {
.subnav a {
float:left;
background:url(images/tab_left.gif) no-repeat left top;
text-decoration:none;
@ -142,13 +142,13 @@ input[type=button], input[type=submit] {
padding: 0px 9px 0px 9px;
height:25px;
}
#header3 li a:hover {
.subnav li a:hover {
float:left;
background:url(images/tab_left_hover.gif) no-repeat left top;
text-decoration:none;
cursor: pointer;
}
#header3 li a span {
.subnav li a span {
float:left;
display:block;
background:url(images/tab_right.gif) no-repeat right top;
@ -158,28 +158,28 @@ input[type=button], input[type=submit] {
padding-top: 5px;
height:20px;
}
#header3 li a:hover span {
.subnav li a:hover span {
float:left;
display:block;
background:url(images/tab_right_hover.gif) no-repeat right top;
color:#333;
cursor: pointer;
}
#header3 #current a {
.subnav #current a {
float:left;
background:url(images/tab_left_active.gif) no-repeat left top;
text-decoration:none;
}
#header3 #current a span {
.subnav #current a span {
float:left;
display:block;
background:url(images/tab_right_active.gif) no-repeat right top;
}
#header3 #logout {
.subnav #logout {
margin-top: 0px;
}
#header3 input.logout:hover {
.subnav input.logout:hover {
}
#logout {
display: inline;

@ -51,7 +51,7 @@ img {
#header2 {
display: none;
}
#header3 {
.subnav {
display: none;
}
/* show the way to the printed document (breadcrumbs)*/

@ -121,7 +121,7 @@ input[type=button], input[type=submit] {
color:#f1d40d;
}
/* header 3 styles */
#header3 {
.subnav {
padding: 0.8em 0.5em 0.4em 0.5em;
background: #fff;
color: #006;
@ -131,7 +131,7 @@ input[type=button], input[type=submit] {
background-image: url(images/fondoHeader3.jpg);
width:100%;
}
#header3 a {
.subnav a {
padding: 10px 0px 20px 0px;
display: block;
width:150px;
@ -140,11 +140,11 @@ input[type=button], input[type=submit] {
color: #fff;
text-align:center;
}
#header3 a:hover {
.subnav a:hover {
color: #fff;
background: url(images/tabHover.png) no-repeat;
}
#header3 ul {
.subnav ul {
padding-right: 75px;
padding-left: 10px;
padding-bottom: 0px;
@ -154,7 +154,7 @@ input[type=button], input[type=submit] {
width:50px;
height:50px;
}
#header3 li {
.subnav li {
padding-right: 0px;
padding-left: 9px;
float: left;
@ -162,20 +162,20 @@ input[type=button], input[type=submit] {
padding-top: 0px;
margin: 0px;/*border-bottom: 1px solid #dcdcdc;*/
}
#header3 li:hover {
.subnav li:hover {
padding-right: 0px;
padding-left: 9px;
padding-bottom: 0px;
MARGIN: 0px;
padding-top: 0px
}
#header3 #current {
.subnav #current {
}
#header3 #current a {
.subnav #current a {
color: #666;
background:url(images/tabCurrent.png) no-repeat;
}
#header3 #logout {
.subnav #logout {
margin-top: 0px;
display: inline;
float: right;

@ -51,7 +51,7 @@ img {
#header2 {
display: none;
}
#header3 {
.subnav {
display: none;
}
/* show the way to the printed document (breadcrumbs)*/

@ -402,14 +402,14 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
/*****************************************************
* HEADER 3: TABS OF THE HEADER *
*****************************************************/
#header3 {
.subnav {
background-image: url(images/tab-repeat.png);
background-position: 0px 0px;
background-repeat: repeat-x;/*border: 1px solid green;*/
height:41px;
width:100%;
}
#header3 a {
.subnav a {
DISPLAY: block;
PADDING-RIGHT: 15px;
PADDING-LEFT: 6px;
@ -417,17 +417,17 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
float:left;
PADDING-TOP: 10px;
}
#header3 a:hover {
.subnav a:hover {
color: #a8a7a7;
background: none;
}
#header3 ul {
.subnav ul {
PADDING-BOTTOM: 0px;
MARGIN: 0px;
LIST-STYLE-TYPE: none;
display: inline;
}
#header3 li {
.subnav li {
PADDING-RIGHT: 0px;
PADDING-LEFT: 9px;
FLOAT: left;
@ -436,20 +436,20 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
padding-top: 10px;
height: 31px;
}
#header3 li#current {
.subnav li#current {
background: url(images/tab-left.png) no-repeat top left;
padding-top: 0px;
height: 41px;
float: left;
}
#header3 #current a {
.subnav #current a {
background: url(images/tab-right.png) no-repeat top right;
height: 31px;
}
#header3 .banner_links {
.subnav .banner_links {
margin: 0;
}
#header3 input.logout {
.subnav input.logout {
/* makes an input appear like a link in this header */
margin: 0px;
padding: 0px;
@ -462,19 +462,19 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
PADDING-RIGHT: 10px;
PADDING-TOP: 3px;
}
#header3 input:hover {
.subnav input:hover {
color: #333;
background: url(../../img/tab_right_hover.gif) no-repeat right top;
}
#header3 input {
.subnav input {
padding-right: 15px;
display: block;
padding-left: 6px;
}
#header3 #logout {
.subnav #logout {
margin-top: 0px;
}
#header3 input.logout:hover {
.subnav input.logout:hover {
}
#logout {
display: inline;
@ -482,7 +482,7 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
width: auto;
text-align: right;
}
#header3 .clear {
.subnav .clear {
display: none;
}
/*****************************************************

@ -51,7 +51,7 @@ img {
#header2 {
display: none;
}
#header3 {
.subnav {
display: none;
}
/* show the way to the printed document (breadcrumbs)*/

@ -403,14 +403,14 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
/*****************************************************
* HEADER 3: TABS OF THE HEADER *
*****************************************************/
#header3 {
.subnav {
background-image: url(images/tab-repeat.png);
background-position: 0px 0px;
background-repeat: repeat-x;/*border: 1px solid green;*/
height:41px;
width: 100%;
}
#header3 a {
.subnav a {
DISPLAY: block;
PADDING-RIGHT: 15px;
PADDING-LEFT: 6px;
@ -418,17 +418,17 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
float:left;
PADDING-TOP: 10px;
}
#header3 a:hover {
.subnav a:hover {
color: #a8a7a7;
background: none;
}
#header3 ul {
.subnav ul {
PADDING-BOTTOM: 0px;
MARGIN: 0px;
LIST-STYLE-TYPE: none;
display: inline;
}
#header3 li {
.subnav li {
PADDING-RIGHT: 0px;
PADDING-LEFT: 9px;
FLOAT: left;
@ -437,28 +437,28 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
padding-top: 10px;
height: 31px;
}
#header3 li#current {
.subnav li#current {
background: url(images/tab-left.png) no-repeat top left;
padding-top: 0px;
height: 41px;
float: left;
}
#header3 #current a {
.subnav #current a {
background: url(images/tab-right.png) no-repeat top right;
height: 31px;
}
#header3 .banner_links {
.subnav .banner_links {
margin: 0;
}
#header3 input {
.subnav input {
padding-right: 15px;
display: block;
padding-left: 6px;
}
#header3 #logout {
.subnav #logout {
margin-top: 0px;
}
#header3 input.logout:hover {
.subnav input.logout:hover {
}
#logout {
display: inline;

@ -51,7 +51,7 @@ img {
#header2 {
display: none;
}
#header3 {
.subnav {
display: none;
}
/* show the way to the printed document (breadcrumbs)*/

@ -438,7 +438,7 @@ input[text] {
/*****************************************************
* HEADER 3: TABS OF THE HEADER *
*****************************************************/
#header3 {
.subnav {
font-size: 1.0em;
padding: 0.8em 0.5em 0em 0.5em;
background: #E5EDF9;
@ -448,7 +448,7 @@ input[text] {
margin-bottom: 1px;
width:99%;
}
#header3 a {
.subnav a {
PADDING-RIGHT: 15px;
DISPLAY: block;
PADDING-LEFT: 6px;
@ -460,12 +460,12 @@ input[text] {
TEXT-DECORATION: none;
border: 0;
}
#header3 a:hover {
.subnav a:hover {
COLOR: #333;
BACKGROUND: url(../../img/tab_right_hover.gif) no-repeat right top;
border: 0;
}
#header3 ul {
.subnav ul {
PADDING-RIGHT: 10px;
PADDING-LEFT: 10px;
PADDING-BOTTOM: 0px;
@ -473,7 +473,7 @@ input[text] {
LIST-STYLE-TYPE: none;
display: inline;
}
#header3 li {
.subnav li {
PADDING-RIGHT: 0px;
PADDING-LEFT: 9px;
BACKGROUND: url(../../img/tab_left.gif) no-repeat left top;
@ -483,7 +483,7 @@ input[text] {
PADDING-TOP: 0px;
border: 0;/*border-bottom: 1px solid #4171b5;*/
}
#header3 li:hover {
.subnav li:hover {
PADDING-RIGHT: 0px;
PADDING-LEFT: 9px;
BACKGROUND: url(../../img/tab_left_hover.gif) no-repeat left top;
@ -492,20 +492,20 @@ input[text] {
PADDING-TOP: 0px;
border: 0;
}
#header3 #current {
.subnav #current {
BACKGROUND-IMAGE: url(../../img/tab_left_active.gif);
border-bottom: 1px solid #fff;
background-color: transparent;
}
#header3 #current a {
.subnav #current a {
BACKGROUND-IMAGE: url(../../img/tab_right_active.gif);
COLOR: #333;
background-color: transparent;
}
#header3 .banner_links {
.subnav .banner_links {
margin: 0;
}
#header3 input.logout {
.subnav input.logout {
/* makes an input appear like a link in this header */
margin: 0 0 0 0;
padding: 0;
@ -520,19 +520,19 @@ input[text] {
PADDING-RIGHT: 10px;
PADDING-TOP: 3px;
}
#header3 input:hover {
.subnav input:hover {
COLOR: #333;
BACKGROUND: url(../../img/tab_right_hover.gif) no-repeat right top;
}
#header3 input {
.subnav input {
PADDING-RIGHT: 15px;
DISPLAY: block;
PADDING-LEFT: 6px;
}
#header3 #logout {
.subnav #logout {
margin-top: 0px;
}
#header3 input.logout:hover {
.subnav input.logout:hover {
}
#logout {
display: inline;

@ -51,7 +51,7 @@ img {
#header2 {
display: none;
}
#header3 {
.subnav {
display: none;
}
/* show the way to the printed document (breadcrumbs)*/

@ -423,7 +423,7 @@ ul#navigation .student-connect a {
------------------------------------------------------------------------------
*/
#header3 {
.subnav {
background: #E5EDF9;
height:auto;
border-bottom: 1px solid #4171b5;
@ -434,23 +434,23 @@ ul#navigation .student-connect a {
padding: 0em 0em 0.4em 0em;
width:100%;
}
#header3 a {
.subnav a {
color: #2754AF;
display: block;
font-weight: bold;
padding: 3px 3px 2px 3px;
text-decoration: none;
}
#header3 a:hover {
.subnav a:hover {
color: #333;
}
#header3 ul {
.subnav ul {
display: inline;
list-style-type: none;
margin: 0px;
padding: 0px 20px 0px 0px;
}
#header3 li {
.subnav li {
border-right: solid 1px #73A2B6;
color: #73A2B6;
display: block;
@ -459,33 +459,33 @@ ul#navigation .student-connect a {
margin: 0px;
padding: 0px;
}
#header3 li:hover {
.subnav li:hover {
margin: 0px;
padding: 0px;
}
#header3 #current {
.subnav #current {
background-color: #fff;
border-bottom: 1px solid #fff;
}
#header3 #current a {
.subnav #current a {
border-bottom: 0px solid #4171b5;
color: #2754AF;
}
#header3 #current a:hover {
.subnav #current a:hover {
color: #333;
}
#header3 .banner_links {
.subnav .banner_links {
margin: 0;
}
#header3 input {
.subnav input {
display: block;
padding-left: 2px;
padding-right: 2px;
}
#header3 input:hover {
.subnav input:hover {
color: #333;
}
#header3 input.logout { /* makes an input appear like a link in this header */
.subnav input.logout { /* makes an input appear like a link in this header */
background-color: transparent;
border: none;
color: #2754AF;
@ -497,7 +497,7 @@ ul#navigation .student-connect a {
padding-right: 2px;
padding-top: 3px;
}
#header3 #logout {
.subnav #logout {
margin-top: 0px;
}
#logout {

@ -51,7 +51,7 @@ img {
#header2 {
display: none;
}
#header3 {
.subnav {
display: none;
}
/* show the way to the printed document (breadcrumbs)*/

@ -401,14 +401,14 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
/*****************************************************
* HEADER 3: TABS OF THE HEADER *
*****************************************************/
#header3 {
.subnav {
background-image: url(images/tab-repeat.png);
background-position: 0px 0px;
background-repeat: repeat-x;/*border: 1px solid green;*/
height:41px;
width:100%;
}
#header3 a {
.subnav a {
DISPLAY: block;
PADDING-RIGHT: 15px;
PADDING-LEFT: 6px;
@ -416,17 +416,17 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
float:left;
PADDING-TOP: 10px;
}
#header3 a:hover {
.subnav a:hover {
color: #a8a7a7;
background: none;
}
#header3 ul {
.subnav ul {
PADDING-BOTTOM: 0px;
MARGIN: 0px;
LIST-STYLE-TYPE: none;
display: inline;
}
#header3 li {
.subnav li {
PADDING-RIGHT: 0px;
PADDING-LEFT: 9px;
FLOAT: left;
@ -435,20 +435,20 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
padding-top: 10px;
height: 31px;
}
#header3 li#current {
.subnav li#current {
background: url(images/tab-left.png) no-repeat top left;
padding-top: 0px;
height: 41px;
float: left;
}
#header3 #current a {
.subnav #current a {
background: url(images/tab-right.png) no-repeat top right;
height: 31px;
}
#header3 .banner_links {
.subnav .banner_links {
margin: 0;
}
#header3 input.logout {
.subnav input.logout {
/* makes an input appear like a link in this header */
margin: 0 0 0 0;
padding: 0;
@ -461,19 +461,19 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
PADDING-RIGHT: 10px;
PADDING-TOP: 3px;
}
#header3 input:hover {
.subnav input:hover {
color: #333;
background: url(../../img/tab_right_hover.gif) no-repeat right top;
}
#header3 input {
.subnav input {
padding-right: 15px;
display: block;
padding-left: 6px;
}
#header3 #logout {
.subnav #logout {
margin-top: 0px;
}
#header3 input.logout:hover {
.subnav input.logout:hover {
}
#logout {
display: inline;
@ -481,7 +481,7 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
width: auto;
text-align: right;
}
#header3 .clear {
.subnav .clear {
display: none;
}
/*****************************************************

@ -51,7 +51,7 @@ img {
#header2 {
display: none;
}
#header3 {
.subnav {
display: none;
}
/* show the way to the printed document (breadcrumbs)*/

@ -402,14 +402,14 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
/*****************************************************
* HEADER 3: TABS OF THE HEADER *
*****************************************************/
#header3 {
.subnav {
background-image: url(images/tab-repeat.png);
background-position: 0px 0px;
background-repeat: repeat-x;/*border: 1px solid green;*/
height:41px;
width:100%;
}
#header3 a {
.subnav a {
DISPLAY: block;
PADDING-RIGHT: 15px;
PADDING-LEFT: 6px;
@ -417,17 +417,17 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
float:left;
PADDING-TOP: 10px;
}
#header3 a:hover {
.subnav a:hover {
color: #a8a7a7;
background: none;
}
#header3 ul {
.subnav ul {
PADDING-BOTTOM: 0px;
MARGIN: 0px;
LIST-STYLE-TYPE: none;
display: inline;
}
#header3 li {
.subnav li {
PADDING-RIGHT: 0px;
PADDING-LEFT: 9px;
FLOAT: left;
@ -436,20 +436,20 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
padding-top: 10px;
height: 31px;
}
#header3 li#current {
.subnav li#current {
background: url(images/tab-left.png) no-repeat top left;
padding-top: 0px;
height: 41px;
float: left;
}
#header3 #current a {
.subnav #current a {
background: url(images/tab-right.png) no-repeat top right;
height: 31px;
}
#header3 .banner_links {
.subnav .banner_links {
margin: 0;
}
#header3 input.logout {
.subnav input.logout {
/* makes an input appear like a link in this header */
margin: 0 0 0 0;
padding: 0;
@ -462,19 +462,19 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
PADDING-RIGHT: 10px;
PADDING-TOP: 3px;
}
#header3 input:hover {
.subnav input:hover {
color: #333;
background: url(../../img/tab_right_hover.gif) no-repeat right top;
}
#header3 input {
.subnav input {
padding-right: 15px;
display: block;
padding-left: 6px;
}
#header3 #logout {
.subnav #logout {
margin-top: 0px;
}
#header3 input.logout:hover {
.subnav input.logout:hover {
}
#logout {
display: inline;
@ -482,7 +482,7 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
width: auto;
text-align: right;
}
#header3 .clear {
.subnav .clear {
display: none;
}
/*****************************************************

@ -51,7 +51,7 @@ img {
#header2 {
display: none;
}
#header3 {
.subnav {
display: none;
}
/* show the way to the printed document (breadcrumbs)*/

@ -36,7 +36,7 @@
font-size:100%;
}
#header3 input.logout {
.subnav input.logout {
padding: 2px 10px 0;
font-size: 120%;
font-family: 'Chelsea Market', Tahoma, Geneva, sans-serif;
@ -213,6 +213,6 @@ input.arrowl {
.decrease_font {
font-size: 70%;
}
#header3 {
.subnav {
font-size: 120%;
}

@ -427,7 +427,7 @@ a:active {
/*****************************************************
* HEADER 3: TABS OF THE HEADER *
*****************************************************/
#header3 {
.subnav {
font-size: 1.0em;
padding: 0.8em 0.5em 0.4em 0.5em;
background: #fff;
@ -436,7 +436,7 @@ a:active {
margin-bottom: 1px;
background-image: url(images/fondoHeader3.jpg);
}
#header3 A {
.subnav A {
PADDING-RIGHT: 15px;
DISPLAY: block;
PADDING-LEFT: 6px;
@ -446,10 +446,10 @@ a:active {
PADDING-TOP: 5px;
TEXT-DECORATION: none;
}
#header3 A:hover {
.subnav A:hover {
COLOR: #83676f;
}
#header3 UL {
.subnav UL {
PADDING-RIGHT: 10px;
PADDING-LEFT: 10px;
PADDING-BOTTOM: 0px;
@ -457,7 +457,7 @@ a:active {
LIST-STYLE-TYPE: none;
display: inline;
}
#header3 LI {
.subnav LI {
PADDING-RIGHT: 0px;
PADDING-LEFT: 9px;
FLOAT: left;
@ -465,22 +465,22 @@ a:active {
MARGIN: 0px;
PADDING-TOP: 0px;/*border-bottom: 1px solid #dcdcdc;*/
}
#header3 LI:hover {
.subnav LI:hover {
PADDING-RIGHT: 0px;
PADDING-LEFT: 9px;
PADDING-BOTTOM: 0px;
MARGIN: 0px;
PADDING-TOP: 0px
}
#header3 #current {
.subnav #current {
}
#header3 #current A {
.subnav #current A {
COLOR: #333
}
#header3 .banner_links {
.subnav .banner_links {
margin: 0;
}
#header3 input.logout {
.subnav input.logout {
/* makes an input appear like a link in this header */
margin: 0 0 0 0;
padding: 0 30px 0 0;
@ -495,19 +495,19 @@ a:active {
PADDING-RIGHT: 10px;
PADDING-TOP: 3px;
}
#header3 input:hover {
.subnav input:hover {
COLOR: #999;
BACKGROUND: url(images/salir.gif) no-repeat right top;
}
#header3 input {
.subnav input {
PADDING-RIGHT: 15px;
DISPLAY: block;
PADDING-LEFT: 6px;
}
#header3 #logout {
.subnav #logout {
margin-top: 0px;
}
#header3 input.logout:hover {
.subnav input.logout:hover {
}
#logout {
display: inline;

@ -276,7 +276,7 @@ input[text] {font-size: 12px; }
/*****************************************************
* HEADER 3: TABS OF THE HEADER *
*****************************************************/
#header3 {
.subnav {
font-size: 1.0em;
padding: 0.8em 0.5em 0.4em 0.5em;
background: #fff;
@ -286,7 +286,7 @@ input[text] {font-size: 12px; }
background-image: url(Images/fondoHeader3.jpg);
width:100%;
}
#header3 A {
.subnav A {
PADDING-RIGHT: 15px;
DISPLAY: block;
PADDING-LEFT: 6px;
@ -297,11 +297,11 @@ input[text] {font-size: 12px; }
PADDING-TOP: 5px;
TEXT-DECORATION: none;
}
#header3 A:hover {
.subnav A:hover {
COLOR: #9ba408;
}
#header3 UL {
.subnav UL {
PADDING-RIGHT: 10px;
PADDING-LEFT: 10px;
PADDING-BOTTOM: 0px;
@ -309,7 +309,7 @@ input[text] {font-size: 12px; }
LIST-STYLE-TYPE: none;
display: inline;
}
#header3 LI {
.subnav LI {
PADDING-RIGHT: 0px;
PADDING-LEFT: 9px;
FLOAT: left;
@ -318,25 +318,25 @@ input[text] {font-size: 12px; }
PADDING-TOP: 0px;
/*border-bottom: 1px solid #dcdcdc;*/
}
#header3 LI:hover {
.subnav LI:hover {
PADDING-RIGHT: 0px;
PADDING-LEFT: 9px;
PADDING-BOTTOM: 0px;
MARGIN: 0px;
PADDING-TOP: 0px
}
#header3 #current {
.subnav #current {
}
#header3 #current A {
.subnav #current A {
COLOR: #999
}
#header3 .banner_links {
.subnav .banner_links {
margin: 0;
}
#header3 input.logout {
.subnav input.logout {
/* makes an input appear like a link in this header */
margin: 0 0 0 0;
padding: 0 30px 0 0;
@ -351,20 +351,20 @@ input[text] {font-size: 12px; }
PADDING-RIGHT: 10px;
PADDING-TOP: 3px;
}
#header3 input:hover {
.subnav input:hover {
COLOR: #999;
BACKGROUND: url(Images/salir.gif) no-repeat right top;
}
#header3 input {
.subnav input {
PADDING-RIGHT: 15px;
DISPLAY: block;
PADDING-LEFT: 6px;
}
#header3 #logout {
.subnav #logout {
margin-top: 0px;
}
#header3 input.logout:hover {
.subnav input.logout:hover {
}
#logout{

@ -40,7 +40,7 @@ img {
#header2 {
display: none;
}
#header3 {
.subnav {
display: none;
}
/* show the way to the printed document (breadcrumbs)*/

@ -407,7 +407,7 @@ a:active {
/*****************************************************
* HEADER 3: TABS OF THE HEADER *
*****************************************************/
#header3 {
.subnav {
font-size: 1.0em;
padding: 4px 0px 4px 0px;
background: #fff;
@ -418,7 +418,7 @@ a:active {
background-image: url(images/fondoHeader3.jpg);
width:100%;
}
#header3 A {
.subnav A {
PADDING-RIGHT: 15px;
DISPLAY: block;
PADDING-LEFT: 6px;
@ -428,17 +428,17 @@ a:active {
PADDING-TOP: 5px;
TEXT-DECORATION: none;
}
#header3 A:hover {
.subnav A:hover {
COLOR: #9ba408;
background: none;
}
#header3 UL {
.subnav UL {
PADDING-BOTTOM: 0px;
MARGIN: 0px;
LIST-STYLE-TYPE: none;
display: inline;
}
#header3 LI {
.subnav LI {
PADDING-RIGHT: 0px;
PADDING-LEFT: 9px;
FLOAT: left;
@ -446,22 +446,22 @@ a:active {
MARGIN: 0px;
PADDING-TOP: 0px;/*border-bottom: 1px solid #dcdcdc;*/
}
#header3 LI:hover {
.subnav LI:hover {
PADDING-RIGHT: 0px;
PADDING-LEFT: 9px;
PADDING-BOTTOM: 0px;
MARGIN: 0px;
PADDING-TOP: 0px
}
#header3 #current {
.subnav #current {
}
#header3 #current A {
.subnav #current A {
COLOR: #999
}
#header3 .banner_links {
.subnav .banner_links {
margin: 0;
}
#header3 input.logout {
.subnav input.logout {
/* makes an input appear like a link in this header */
margin: 0 0 0 0;
padding: 0 30px 0 0;
@ -475,18 +475,18 @@ a:active {
PADDING-RIGHT: 0px;
PADDING-TOP: 3px;
}
#header3 input:hover {
.subnav input:hover {
COLOR: #999;
}
#header3 input {
.subnav input {
PADDING-RIGHT: 15px;
DISPLAY: block;
PADDING-LEFT: 6px;
}
#header3 #logout {
.subnav #logout {
margin-top: 0px;
}
#header3 input.logout:hover {
.subnav input.logout:hover {
}
#logout {
display: inline;

@ -51,7 +51,7 @@ img {
#header2 {
display: none;
}
#header3 {
.subnav {
display: none;
}
/* show the way to the printed document (breadcrumbs)*/

@ -27,11 +27,7 @@
.notification-panel {
display:none;
}
#header2 .nav-pills {
display:none;
}
}
}
@media (max-width: 767px) {
@ -107,7 +103,7 @@
@media (min-width: 768px) and (max-width: 979px) {
/* fixes tabs */
#header3 .nav-tabs > li > a, #header3 .nav-pills > li > a {
.subnav .nav-tabs > li > a, .subnav .nav-pills > li > a {
padding-left: 6px;
padding-right: 6px;
}
@ -128,7 +124,7 @@
@media (min-width: 980px) and (max-width: 1024px) {
/* fixes tabs */
#header3 .nav-tabs > li > a, #header3 .nav-pills > li > a {
.subnav .nav-tabs > li > a, .subnav .nav-pills > li > a {
padding-left: 6px;
padding-right: 6px;
}

@ -375,14 +375,14 @@ a:active {
/*****************************************************
* HEADER 3: TABS OF THE HEADER *
*****************************************************/
#header3 {
.subnav {
background-image: url(images/tab-repeat.png);
background-position: 0px 0px;
background-repeat: repeat-x;/*border: 1px solid green;*/
height:41px;
width:100%;
}
#header3 a {
.subnav a {
DISPLAY: block;
PADDING-RIGHT: 15px;
PADDING-LEFT: 6px;
@ -390,17 +390,17 @@ a:active {
float:left;
PADDING-TOP: 10px;
}
#header3 a:hover {
.subnav a:hover {
color: #a8a7a7;
background: none;
}
#header3 ul {
.subnav ul {
PADDING-BOTTOM: 0px;
MARGIN: 0px;
LIST-STYLE-TYPE: none;
display: inline;
}
#header3 li {
.subnav li {
PADDING-RIGHT: 0px;
PADDING-LEFT: 9px;
FLOAT: left;
@ -409,29 +409,29 @@ a:active {
padding-top: 10px;
height: 31px;
}
#header3 li#current {
.subnav li#current {
background: url(images/tab-left.png) no-repeat top left;
padding-top: 0px;
height: 41px;
float: left;
}
#header3 #current a {
.subnav #current a {
background: url(images/tab-right.png) no-repeat top right;
height: 31px;
}
#header3 .banner_links {
.subnav .banner_links {
margin: 0;
}
#header3 input {
.subnav input {
padding-right: 15px;
display: block;
padding-left: 6px;
}
#header3 #logout {
.subnav #logout {
margin-top: 0px;
}
#header3 input.logout:hover {
.subnav input.logout:hover {
}
#logout {
display: inline;

@ -51,7 +51,7 @@ img {
#header2 {
display: none;
}
#header3 {
.subnav {
display: none;
}
/* show the way to the printed document (breadcrumbs)*/

@ -426,12 +426,12 @@ ul#navigation .student-connect a {
------------------------------------------------------------------------------
*/
#header3 {
.subnav {
width: 100%;
padding: 0;
}
#header3 input.logout {
.subnav input.logout {
/* makes an input appear like a link in this header */
background-color: transparent;
border: none;
@ -443,11 +443,11 @@ ul#navigation .student-connect a {
margin: -.3em 0 0 2em;
padding: 0;
}
#header3 form {
.subnav form {
margin: 0;
padding: 0;
}
#header3 #logout {
.subnav #logout {
display: inline;
float: right;
clear: right;
@ -455,7 +455,7 @@ ul#navigation .student-connect a {
padding: 0;
width: 10%;
}
#header3 #logout li {
.subnav #logout li {
display: block;
margin: 0;
padding: 0;
@ -463,7 +463,7 @@ ul#navigation .student-connect a {
clear: right;
}
#header3 ul {
.subnav ul {
PADDING-RIGHT: 10px;
PADDING-LEFT: 10px;
PADDING-BOTTOM: 0px;
@ -471,7 +471,7 @@ ul#navigation .student-connect a {
LIST-STYLE-TYPE: none;
display: inline;
}
#header3 ul li {
.subnav ul li {
float: left;
display: inline;
list-style: none;
@ -479,7 +479,7 @@ ul#navigation .student-connect a {
padding: 0;
width: auto;
}
#header3 ul li a {
.subnav ul li a {
display: inline;
}
/*

@ -51,7 +51,7 @@ img {
#header2 {
display: none;
}
#header3 {
.subnav {
display: none;
}
/* show the way to the printed document (breadcrumbs)*/

@ -389,7 +389,7 @@ a:active {
/*****************************************************
* HEADER 3: TABS OF THE HEADER *
*****************************************************/
#header3 {
.subnav {
font-size: 1.0em;
padding: 4px 0px 4px 0px;
background: #fff;
@ -399,7 +399,7 @@ a:active {
margin-bottom: 1px;
width:100%;
}
#header3 A {
.subnav A {
PADDING-RIGHT: 15px;
DISPLAY: block;
PADDING-LEFT: 6px;
@ -409,10 +409,10 @@ a:active {
PADDING-TOP: 5px;
TEXT-DECORATION: none;
}
#header3 A:hover {
.subnav A:hover {
COLOR: #999;
}
#header3 UL {
.subnav UL {
PADDING-RIGHT: 10px;
PADDING-LEFT: 10px;
PADDING-BOTTOM: 0px;
@ -420,7 +420,7 @@ a:active {
LIST-STYLE-TYPE: none;
display: inline;
}
#header3 LI {
.subnav LI {
PADDING-RIGHT: 0px;
PADDING-LEFT: 9px;
FLOAT: left;
@ -428,22 +428,22 @@ a:active {
MARGIN: 0px;
PADDING-TOP: 0px;/*border-bottom: 1px solid #dcdcdc;*/
}
#header3 LI:hover {
.subnav LI:hover {
PADDING-RIGHT: 0px;
PADDING-LEFT: 9px;
PADDING-BOTTOM: 0px;
MARGIN: 0px;
PADDING-TOP: 0px
}
#header3 #current {
.subnav #current {
}
#header3 #current A {
.subnav #current A {
COLOR: #999
}
#header3 .banner_links {
.subnav .banner_links {
margin: 0;
}
#header3 input.logout {
.subnav input.logout {
/* makes an input appear like a link in this header */
margin: 0 0 0 0;
padding: 0 30px 0 0;
@ -457,18 +457,18 @@ a:active {
padding-right: 0px;
padding-top: 3px;
}
#header3 input:hover {
.subnav input:hover {
COLOR: #999;
}
#header3 input {
.subnav input {
PADDING-RIGHT: 15px;
DISPLAY: block;
PADDING-LEFT: 6px;
}
#header3 #logout {
.subnav #logout {
margin-top: 0px;
}
#header3 input.logout:hover {
.subnav input.logout:hover {
}
#logout {
display: inline;

@ -51,7 +51,7 @@ img {
#header2 {
display: none;
}
#header3 {
.subnav {
display: none;
}
/* show the way to the printed document (breadcrumbs)*/

@ -403,14 +403,14 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
/*****************************************************
* HEADER 3: TABS OF THE HEADER *
*****************************************************/
#header3 {
.subnav {
background-image: url(images/tab-repeat.png);
background-position: 0px 0px;
background-repeat: repeat-x;/*border: 1px solid green;*/
height:41px;
width: 100%;
}
#header3 a {
.subnav a {
DISPLAY: block;
PADDING-RIGHT: 15px;
PADDING-LEFT: 6px;
@ -418,17 +418,17 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
float:left;
PADDING-TOP: 10px;
}
#header3 a:hover {
.subnav a:hover {
color: #a8a7a7;
background: none;
}
#header3 ul {
.subnav ul {
PADDING-BOTTOM: 0px;
MARGIN: 0px;
LIST-STYLE-TYPE: none;
display: inline;
}
#header3 li {
.subnav li {
PADDING-RIGHT: 0px;
PADDING-LEFT: 9px;
FLOAT: left;
@ -437,28 +437,28 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
padding-top: 10px;
height: 31px;
}
#header3 li#current {
.subnav li#current {
background: url(images/tab-left.png) no-repeat top left;
padding-top: 0px;
height: 41px;
float: left;
}
#header3 #current a {
.subnav #current a {
background: url(images/tab-right.png) no-repeat top right;
height: 31px;
}
#header3 .banner_links {
.subnav .banner_links {
margin: 0;
}
#header3 input {
.subnav input {
padding-right: 15px;
display: block;
padding-left: 6px;
}
#header3 #logout {
.subnav #logout {
margin-top: 0px;
}
#header3 input.logout:hover {
.subnav input.logout:hover {
}
#logout {
display: inline;

@ -51,7 +51,7 @@ img {
#header2 {
display: none;
}
#header3 {
.subnav {
display: none;
}
/* show the way to the printed document (breadcrumbs)*/

@ -356,31 +356,18 @@ a:active {
#my_courses {
float: right;
}
/********************************************************
* HEADER 2: Users online, help, student/teacher view *
********************************************************/
#header2 {
color: #636363;/*border: 1px solid red;*/
}
#header2 a {
color: #636363;
text-decoration: none;
font-weight:normal;
}
#header2 a:hover {
text-decoration: underline;
}
/*****************************************************
* HEADER 3: TABS OF THE HEADER *
*****************************************************/
#header3 {
.subnav {
background-image: url(images/tab-repeat.png);
background-position: 0px 0px;
background-repeat: repeat-x;/*border: 1px solid green;*/
height:41px;
width:100%;
}
#header3 a {
.subnav a {
DISPLAY: block;
PADDING-RIGHT: 15px;
PADDING-LEFT: 6px;
@ -388,17 +375,17 @@ a:active {
float:left;
PADDING-TOP: 10px;
}
#header3 a:hover {
.subnav a:hover {
color: #a8a7a7;
background: none;
}
#header3 ul {
.subnav ul {
PADDING-BOTTOM: 0px;
MARGIN: 0px;
LIST-STYLE-TYPE: none;
display: inline;
}
#header3 li {
.subnav li {
PADDING-RIGHT: 0px;
PADDING-LEFT: 9px;
FLOAT: left;
@ -407,20 +394,20 @@ a:active {
padding-top: 10px;
height: 31px;
}
#header3 li#current {
.subnav li#current {
background: url(images/tab-left.png) no-repeat top left;
padding-top: 0px;
height: 41px;
float: left;
}
#header3 #current a {
.subnav #current a {
background: url(images/tab-right.png) no-repeat top right;
height: 31px;
}
#header3 .banner_links {
.subnav .banner_links {
margin: 0;
}
#header3 input.logout {
.subnav input.logout {
/* makes an input appear like a link in this header */
margin: 0px;
padding: 0px;
@ -433,19 +420,19 @@ a:active {
PADDING-RIGHT: 10px;
PADDING-TOP: 3px;
}
#header3 input:hover {
.subnav input:hover {
color: #333;
background: url(../../img/tab_right_hover.gif) no-repeat right top;
}
#header3 input {
.subnav input {
padding-right: 15px;
display: block;
padding-left: 6px;
}
#header3 #logout {
.subnav #logout {
margin-top: 0px;
}
#header3 input.logout:hover {
.subnav input.logout:hover {
}
#logout {
display: inline;
@ -453,7 +440,7 @@ a:active {
width: auto;
text-align: right;
}
#header3 .clear {
.subnav .clear {
display: none;
}
/*****************************************************

@ -51,7 +51,7 @@ img {
#header2 {
display: none;
}
#header3 {
.subnav {
display: none;
}
/* show the way to the printed document (breadcrumbs)*/

@ -52,21 +52,11 @@ require 'forumconfig.inc.php';
require_once 'forumfunction.inc.php';
$userid = api_get_user_id();
$userinf = api_get_user_info($userid);
/* MAIN DISPLAY SECTION */
/* Retrieving forum and forum category information */
// We are getting all the information about the current forum and forum category.
// Note pcool: I tried to use only one sql statement (and function) for this,
// but the problem is that the visibility of the forum AND forum cateogory are stored in the item_property table.
//$my_forum_group = isset($_GET['gidReq']) ? $_GET['gidReq'] : '';
$group_id = api_get_group_id();
$my_forum = isset($_GET['forum']) ? $_GET['forum'] : '';
$current_forum = get_forum_information($my_forum); // Note: This has to be validated that it is an existing forum.
@ -81,20 +71,10 @@ $current_forum_category = get_forumcategory_information($current_forum['forum_ca
if (!empty($group_id)) {
//Group info & group category info
$group_properties = GroupManager::get_group_properties($group_id);
//$group_cat_info = GroupManager::get_category(GroupManager::get_category_from_group($group_id));
//User has access in the group?
$user_has_access_in_group = GroupManager::user_has_access($userid, $group_id, GROUP_TOOL_FORUM);
//User is a tutor in the group? the function GroupManager::user_has_access already contains the is_tutor_of_group()
//$is_tutor_group = GroupManager::is_tutor_of_group($userid, $group_id);
//
// the function GroupManager::user_has_access already contains the is_tutor_of_group()
//$is_my_forum = GroupManager::is_user_in_group($userid, $group_id);
//$group_cat_forum_visibility = $group_cat_info['forum_state'];
//$group_forum_visibility = $group_properties['forum_state'];
//Course
if (!api_is_allowed_to_edit(false, true) AND //is a student
(($current_forum_category && $current_forum_category['visibility'] == 0) OR $current_forum['visibility'] == 0 OR !$user_has_access_in_group)
@ -131,8 +111,7 @@ if (!empty($_GET['gidReq'])) {
api_session_register('toolgroup');
}
if ($origin == 'group') {
$_clean['toolgroup'] = (int)$_SESSION['toolgroup'];
if ($origin == 'group') {
$interbreadcrumb[] = array('url' => '../group/group.php', 'name' => get_lang('Groups'));
$interbreadcrumb[] = array('url'=>'../group/group_space.php?gidReq='.$_SESSION['toolgroup'], 'name'=> get_lang('GroupSpace').' '.$group_properties['name']);
@ -151,8 +130,6 @@ if ($origin == 'learnpath') {
}
/* Actions */
$table_link = Database :: get_main_table(TABLE_MAIN_GRADEBOOK_LINK);
// Change visibility of a forum or a forum category.
if (($my_action == 'invisible' OR $my_action=='visible') AND isset($_GET['content']) AND isset($_GET['id']) AND api_is_allowed_to_edit(false, true) && api_is_allowed_to_session_edit(false, true)) {
$message = change_visibility($_GET['content'], $_GET['id'], $_GET['action']); // Note: This has to be cleaned first.
@ -164,10 +141,7 @@ if (($my_action == 'lock' OR $my_action == 'unlock') AND isset($_GET['content'])
// Deleting.
if ($my_action == 'delete' AND isset($_GET['content']) AND isset($_GET['id']) AND api_is_allowed_to_edit(false, true) && api_is_allowed_to_session_edit(false, true)) {
$message = delete_forum_forumcategory_thread($_GET['content'], $_GET['id']); // Note: This has to be cleaned first.
// Delete link
/*$sql_link = 'DELETE FROM '.$table_link.' WHERE ref_id='.intval($_GET['id']).' and type=5 and course_code="'.api_get_course_id().'";';
Database::query($sql_link);*/
// Delete link
require_once api_get_path(SYS_CODE_PATH).'gradebook/lib/gradebook_functions.inc.php';
$link_id = is_resource_in_course_gradebook(api_get_course_id(), 5 , intval($_GET['id']), api_get_session_id());
if ($link_id !== false) {

@ -77,7 +77,7 @@ if (isset($_GET['typeselected']) && $_GET['typeselected'] != '0') {
//update view_properties
if (isset($_GET['typeselected']) && 5 == $_GET['typeselected'] && (isset($addvalues['select_link']) && $addvalues['select_link']<>"")) {
echo $sql1 = 'SELECT thread_title from '.$tbl_forum_thread.'
$sql1 = 'SELECT thread_title from '.$tbl_forum_thread.'
WHERE c_id = '.$course_info['real_id'].' AND thread_id='.$addvalues['select_link'];
$res1 = Database::query($sql1);
$rowtit = Database::fetch_row($res1);

@ -873,5 +873,5 @@ if (isset($first_time) && $first_time==1 && api_is_allowed_to_edit(null,true)) {
}
}
}
echo '<div id="chart3"></div>';
//echo '<div id="chart3"></div>';
Display :: display_footer();

@ -195,7 +195,7 @@ class ForumThreadLink extends AbstractLink
}
public function get_name() {
$this->get_exercise_data();
$this->get_exercise_data();
$thread_title=isset($this->exercise_data['thread_title']) ? $this->exercise_data['thread_title'] : '';
$thread_title_qualify=isset($this->exercise_data['thread_title_qualify']) ? $this->exercise_data['thread_title_qualify'] : '';
if ( isset($thread_title_qualify) && $thread_title_qualify!="") {
@ -237,8 +237,8 @@ class ForumThreadLink extends AbstractLink
}
private function get_exercise_data() {
if (!isset($this->exercise_data)) {
$sql = 'SELECT * FROM '.$this->get_forum_thread_table()."
WHERE c_id = '.$this->course_id.' AND thread_id = '".$this->get_ref_id()."' AND session_id=".api_get_session_id()."";
$sql = 'SELECT * FROM '.$this->get_forum_thread_table().'
WHERE c_id = '.$this->course_id.' AND thread_id = '.$this->get_ref_id().' AND session_id = '.api_get_session_id();
$query = Database::query($sql);
$this->exercise_data = Database::fetch_array($query);
}

@ -429,12 +429,9 @@ class GradebookTable extends SortableTable {
. ($item->is_course() ? ' &nbsp;[' . $item->get_course_code() . ']'.$show_message : '');
// evaluation
case 'E' :
$cat=new Category();
//$dblib=new Database();
$category_id=Security::remove_XSS($_GET['selectcat']);
$course_id=Database::get_course_by_category($category_id);
$show_message=$cat->show_message_resource_delete($course_id);
$cat = new Category();
$course_id = Database::get_course_by_category($_GET['selectcat']);
$show_message = $cat->show_message_resource_delete($course_id);
// course/platform admin can go to the view_results page
@ -468,16 +465,13 @@ class GradebookTable extends SortableTable {
}
// link
case 'L' :
$cat = new Category();
$category_id = intval($_GET['selectcat']);
$course_id = Database::get_course_by_category($category_id);
$show_message = $cat->show_message_resource_delete($course_id);
$cat = new Category();
$course_id = Database::get_course_by_category($_GET['selectcat']);
$show_message = $cat->show_message_resource_delete($course_id);
$url = $item->get_link();
if (isset($url) && $show_message===false) {
if (isset($url) && $show_message===false) {
$text = '&nbsp;<a href="' . $item->get_link() . '">'
. $item->get_name()
. '</a>';

@ -268,7 +268,7 @@ function build_edit_icons_link($link, $selectcat) {
if ($message_link===false) {
$visibility_icon= ($link->is_visible() == 0) ? 'invisible' : 'visible';
$visibility_command= ($link->is_visible() == 0) ? 'set_visible' : 'set_invisible';
$modify_icons= '<a href="gradebook_edit_link.php?editlink=' . $link->get_id() . ' &amp;cidReq='.$link->get_course_code().'">'.Display::return_icon('edit.png', get_lang('Modify'),'',ICON_SIZE_SMALL).'</a>';
$modify_icons= '<a href="gradebook_edit_link.php?editlink='.$link->get_id().'&amp;cidReq='.$link->get_course_code().'">'.Display::return_icon('edit.png', get_lang('Modify'),'',ICON_SIZE_SMALL).'</a>';
//$modify_icons .= '&nbsp;<a href="' . api_get_self() . '?movelink=' . $link->get_id() . '&selectcat=' . $selectcat . '"><img src="../img/deplacer_fichier.gif" border="0" title="' . get_lang('Move') . '" alt="" /></a>';
$modify_icons .= '&nbsp;<a href="' . api_get_self() . '?visiblelink=' . $link->get_id() . '&amp;' . $visibility_command . '=&amp;selectcat=' . $selectcat . ' ">'.Display::return_icon($visibility_icon.'.png', get_lang('Visible'),'',ICON_SIZE_SMALL).'</a>';

@ -0,0 +1,860 @@
<?php
/* For licensing terms, see /license.txt */
/**
* This file displays the user's profile,
* optionally it allows users to modify their profile as well.
*
* See inc/conf/profile.conf.php to modify settings
*
* @package chamilo.auth
*/
/**
* Code
*/
/* Init section */
// Language files that should be included.
$language_file = array('registration', 'messages', 'userInfo');
$cidReset = true;
require_once '../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php';
if (api_get_setting('allow_social_tool') == 'true') {
$this_section = SECTION_SOCIAL;
} else {
$this_section = SECTION_MYPROFILE;
}
$_SESSION['this_section'] = $this_section;
if (!(isset($_user['user_id']) && $_user['user_id']) || api_is_anonymous($_user['user_id'], true)) {
api_not_allowed(true);
}
//jquery thickbox already called from main/inc/header.inc.php
$htmlHeadXtra[] = '<script src="../inc/lib/javascript/tag/jquery.fcbkcomplete.js" type="text/javascript" language="javascript"></script>';
$htmlHeadXtra[] = '<link href="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/style.css" rel="stylesheet" type="text/css" />';
$htmlHeadXtra[] = '<script type="text/javascript">
function confirmation(name) {
if (confirm("'.get_lang('AreYouSureToDelete', '').' " + name + " ?")) {
document.forms["profile"].submit();
} else {
return false;
}
}
function show_image(image,width,height) {
width = parseInt(width) + 20;
height = parseInt(height) + 20;
window_x = window.open(image,\'windowX\',\'width=\'+ width + \', height=\'+ height + \'\');
}
function generate_open_id_form() {
$.ajax({
contentType: "application/x-www-form-urlencoded",
beforeSend: function(objeto) {
/*$("#div_api_key").html("Loading...");*/ },
type: "POST",
url: "'.api_get_path(WEB_AJAX_PATH).'user_manager.ajax.php?a=generate_api_key",
data: "num_key_id="+"",
success: function(datos) {
$("#div_api_key").html(datos);
}
});
}
function hide_icon_edit(element_html) {
ident="#edit_image";
$(ident).hide();
}
function show_icon_edit(element_html) {
ident="#edit_image";
$(ident).show();
}
</script>';
//$interbreadcrumb[] = array('url' => '../auth/profile.php', 'name' => get_lang('ModifyProfile'));
if (!empty ($_GET['coursePath'])) {
$course_url = api_get_path(WEB_COURSE_PATH).htmlentities(strip_tags($_GET['coursePath'])).'/index.php';
$interbreadcrumb[] = array('url' => $course_url, 'name' => Security::remove_XSS($_GET['courseCode']));
}
$warning_msg = '';
if (!empty($_GET['fe'])) {
$warning_msg .= get_lang('UplUnableToSaveFileFilteredExtension');
$_GET['fe'] = null;
}
$jquery_ready_content = '';
if (api_get_setting('allow_message_tool') == 'true') {
$jquery_ready_content = <<<EOF
$(".message-content .message-delete").click(function(){
$(this).parents(".message-content").animate({ opacity: "hide" }, "slow");
$(".message-view").animate({ opacity: "show" }, "slow");
});
EOF;
}
// Configuration file
require_once api_get_path(CONFIGURATION_PATH).'profile.conf.php';
// Libraries
require_once api_get_path(LIBRARY_PATH).'fileManage.lib.php';
require_once api_get_path(LIBRARY_PATH).'fileUpload.lib.php';
$tool_name = is_profile_editable() ? get_lang('ModifProfile') : get_lang('ViewProfile');
$table_user = Database :: get_main_table(TABLE_MAIN_USER);
/* Form */
/*
* Get initial values for all fields.
*/
$user_data = UserManager::get_user_info_by_id(api_get_user_id());
$array_list_key = UserManager::get_api_keys(api_get_user_id());
$id_temp_key = UserManager::get_api_key_id(api_get_user_id(), 'dokeos');
$value_array = $array_list_key[$id_temp_key];
$user_data['api_key_generate'] = $value_array;
if ($user_data !== false) {
if (is_null($user_data['language'])) {
$user_data['language'] = api_get_setting('platformLanguage');
}
}
/*
* Initialize the form.
*/
$form = new FormValidator('profile', 'post', api_get_self()."?".str_replace('&fe=1', '', $_SERVER['QUERY_STRING']), null, array('style' => 'width: 70%; float: '.($text_dir == 'rtl' ? 'right;' : 'left;')));
/* Make sure this is the first submit on the form, even though it is hidden!
* Otherwise, if a user has productions and presses ENTER to submit, he will
* attempt to delete the first production in the list. */
//if (is_profile_editable()) {
// $form->addElement('style_submit_button', null, get_lang('SaveSettings'), 'class="save"', array('style' => 'visibility:hidden;'));
//}
// SUBMIT (visible)
/*if (is_profile_editable()) {
$form->addElement('style_submit_button', 'apply_change', get_lang('SaveSettings'), 'class="save"');
} else {
$form->freeze();
}*/
//THEME
if (is_profile_editable() && api_get_setting('user_selected_theme') == 'true') {
$form->addElement('select_theme', 'theme', get_lang('Theme'));
if (api_get_setting('profile', 'theme') !== 'true')
$form->freeze('theme');
$form->applyFilter('theme', 'trim');
}
if (api_is_western_name_order()) {
// FIRST NAME and LAST NAME
$form->addElement('text', 'firstname', get_lang('FirstName'), array('size' => 40));
$form->addElement('text', 'lastname', get_lang('LastName'), array('size' => 40));
} else {
// LAST NAME and FIRST NAME
$form->addElement('text', 'lastname', get_lang('LastName'), array('size' => 40));
$form->addElement('text', 'firstname', get_lang('FirstName'), array('size' => 40));
}
if (api_get_setting('profile', 'name') !== 'true') {
$form->freeze(array('lastname', 'firstname'));
}
$form->applyFilter(array('lastname', 'firstname'), 'stripslashes');
$form->applyFilter(array('lastname', 'firstname'), 'trim');
$form->addRule('lastname' , get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('firstname', get_lang('ThisFieldIsRequired'), 'required');
// USERNAME
$form->addElement('text', 'username', get_lang('UserName'), array('maxlength' => USERNAME_MAX_LENGTH, 'size' => 40));
if (api_get_setting('profile', 'login') !== 'true') {
$form->freeze('username');
}
$form->applyFilter('username', 'stripslashes');
$form->applyFilter('username', 'trim');
$form->addRule('username', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('username', get_lang('UsernameWrong'), 'username');
$form->addRule('username', get_lang('UserTaken'), 'username_available', $user_data['username']);
// OFFICIAL CODE
if (CONFVAL_ASK_FOR_OFFICIAL_CODE) {
$form->addElement('text', 'official_code', get_lang('OfficialCode'), array('size' => 40));
if (api_get_setting('profile', 'officialcode') !== 'true') {
$form->freeze('official_code');
}
$form->applyFilter('official_code', 'stripslashes');
$form->applyFilter('official_code', 'trim');
if (api_get_setting('registration', 'officialcode') == 'true' && api_get_setting('profile', 'officialcode') == 'true') {
$form->addRule('official_code', get_lang('ThisFieldIsRequired'), 'required');
}
}
// EMAIL
$form->addElement('text', 'email', get_lang('Email'), array('size' => 40));
if (api_get_setting('profile', 'email') !== 'true') {
$form->freeze('email');
}
$form->applyFilter('email', 'stripslashes');
$form->applyFilter('email', 'trim');
if (api_get_setting('registration', 'email') == 'true') {
$form->addRule('email', get_lang('ThisFieldIsRequired'), 'required');
}
$form->addRule('email', get_lang('EmailWrong'), 'email');
// OPENID URL
if (is_profile_editable() && api_get_setting('openid_authentication') == 'true') {
$form->addElement('text', 'openid', get_lang('OpenIDURL'), array('size' => 40));
if (api_get_setting('profile', 'openid') !== 'true') {
$form->freeze('openid');
}
$form->applyFilter('openid', 'trim');
//if (api_get_setting('registration', 'openid') == 'true') {
// $form->addRule('openid', get_lang('ThisFieldIsRequired'), 'required');
//}
}
// PHONE
$form->addElement('text', 'phone', get_lang('phone'), array('size' => 20));
if (api_get_setting('profile', 'phone') !== 'true') {
$form->freeze('phone');
}
$form->applyFilter('phone', 'stripslashes');
$form->applyFilter('phone', 'trim');
/*if (api_get_setting('registration', 'phone') == 'true') {
$form->addRule('phone', get_lang('ThisFieldIsRequired'), 'required');
}
$form->addRule('phone', get_lang('EmailWrong'), 'email');*/
// PICTURE
if (is_profile_editable() && api_get_setting('profile', 'picture') == 'true') {
$form->addElement('file', 'picture', ($user_data['picture_uri'] != '' ? get_lang('UpdateImage') : get_lang('AddImage')));
$form->add_progress_bar();
if (!empty($user_data['picture_uri'])) {
$form->addElement('checkbox', 'remove_picture', null, get_lang('DelImage'));
}
$allowed_picture_types = array ('jpg', 'jpeg', 'png', 'gif');
$form->addRule('picture', get_lang('OnlyImagesAllowed').' ('.implode(',', $allowed_picture_types).')', 'filetype', $allowed_picture_types);
}
// LANGUAGE
$form->addElement('select_language', 'language', get_lang('Language'));
if (api_get_setting('profile', 'language') !== 'true') {
$form->freeze('language');
}
// EXTENDED PROFILE this make the page very slow!
if (api_get_setting('extended_profile') == 'true') {
if (!isset($_GET['type']) || (isset($_GET['type']) && $_GET['type'] == 'extended')) {
//$form->addElement('html', '<a href="javascript: void(0);" onclick="javascript: show_extend();"> show_extend_profile</a>');
$form->addElement('static', null, '<em>'.get_lang('OptionalTextFields').'</em>');
// MY COMPETENCES
$form->add_html_editor('competences', get_lang('MyCompetences'), false, false, array('ToolbarSet' => 'Profile', 'Width' => '580', 'Height' => '130'));
// MY DIPLOMAS
$form->add_html_editor('diplomas', get_lang('MyDiplomas'), false, false, array('ToolbarSet' => 'Profile', 'Width' => '580', 'Height' => '130'));
// WHAT I AM ABLE TO TEACH
$form->add_html_editor('teach', get_lang('MyTeach'), false, false, array('ToolbarSet' => 'Profile', 'Width' => '580', 'Height' => '130'));
// MY PRODUCTIONS
$form->addElement('file', 'production', get_lang('MyProductions'));
if ($production_list = UserManager::build_production_list(api_get_user_id(), '', true)) {
$form->addElement('static', 'productions_list', null, $production_list);
}
// MY PERSONAL OPEN AREA
$form->add_html_editor('openarea', get_lang('MyPersonalOpenArea'), false, false, array('ToolbarSet' => 'Profile', 'Width' => '580', 'Height' => '350'));
$form->applyFilter(array('competences', 'diplomas', 'teach', 'openarea'), 'stripslashes');
$form->applyFilter(array('competences', 'diplomas', 'teach'), 'trim'); // openarea is untrimmed for maximum openness
}
}
// PASSWORD
if (is_profile_editable() && api_get_setting('profile', 'password') == 'true') {
$form->addElement('password', 'password0', get_lang('Pass'), array('size' => 40));
$form->addElement('static', null, null, '<em>'.get_lang('Enter2passToChange').'</em>');
$form->addElement('password', 'password1', get_lang('NewPass'), array('size' => 40));
$form->addElement('password', 'password2', get_lang('Confirmation'), array('size' => 40));
// user must enter identical password twice so we can prevent some user errors
$form->addRule(array('password1', 'password2'), get_lang('PassTwo'), 'compare');
if (CHECK_PASS_EASY_TO_FIND) {
$form->addRule('password1', get_lang('PassTooEasy').': '.api_generate_password(), 'callback', 'api_check_password');
}
}
// EXTRA FIELDS
$extra = UserManager::get_extra_fields(0, 50, 5, 'ASC');
$extra_data = UserManager::get_extra_user_data(api_get_user_id(), true);
foreach ($extra as $id => $field_details) {
if ($field_details[6] == 0) {
continue;
}
switch ($field_details[2]) {
case USER_FIELD_TYPE_TEXT:
$form->addElement('text', 'extra_'.$field_details[1], $field_details[3], array('size' => 40));
$form->applyFilter('extra_'.$field_details[1], 'stripslashes');
$form->applyFilter('extra_'.$field_details[1], 'trim');
if ($field_details[7] == 0) $form->freeze('extra_'.$field_details[1]);
break;
case USER_FIELD_TYPE_TEXTAREA:
$form->add_html_editor('extra_'.$field_details[1], $field_details[3], false);
//$form->addElement('textarea', 'extra_'.$field_details[1], $field_details[3], array('size' => 80));
$form->applyFilter('extra_'.$field_details[1], 'stripslashes');
$form->applyFilter('extra_'.$field_details[1], 'trim');
if ($field_details[7] == 0) $form->freeze('extra_'.$field_details[1]);
break;
case USER_FIELD_TYPE_RADIO:
$group = array();
foreach ($field_details[9] as $option_id => $option_details) {
$options[$option_details[1]] = $option_details[2];
$group[] =& HTML_QuickForm::createElement('radio', 'extra_'.$field_details[1], $option_details[1], $option_details[2].'<br />', $option_details[1]);
}
$form->addGroup($group, 'extra_'.$field_details[1], $field_details[3], '');
if ($field_details[7] == 0) $form->freeze('extra_'.$field_details[1]);
break;
case USER_FIELD_TYPE_SELECT:
if (in_array($field_details[1], array('mail_notify_invitation', 'mail_notify_message', 'mail_notify_group_message'))) {
$field_details[3] = get_lang($field_details[3]);
}
$options = array();
foreach ($field_details[9] as $option_id => $option_details) {
if (in_array($field_details[1], array('mail_notify_invitation', 'mail_notify_message', 'mail_notify_group_message'))) {
$option_details[2] = get_lang($option_details[2]);
}
$options[$option_details[1]] = $option_details[2];
}
$form->addElement('select', 'extra_'.$field_details[1], $field_details[3], $options, array('class'=>'chzn-select', 'id'=>'extra_'.$field_details[1]));
if ($field_details[7] == 0) $form->freeze('extra_'.$field_details[1]);
break;
case USER_FIELD_TYPE_SELECT_MULTIPLE:
$options = array();
foreach ($field_details[9] as $option_id => $option_details) {
$options[$option_details[1]] = $option_details[2];
}
$form->addElement('select', 'extra_'.$field_details[1], $field_details[3], $options, array('multiple' => 'multiple'));
if ($field_details[7] == 0) $form->freeze('extra_'.$field_details[1]);
break;
case USER_FIELD_TYPE_DATE:
$form->addElement('datepickerdate', 'extra_'.$field_details[1], $field_details[3], array('form_name' => 'profile'));
$form->_elements[$form->_elementIndex['extra_'.$field_details[1]]]->setLocalOption('minYear', 1900);
if ($field_details[7] == 0) $form->freeze('extra_'.$field_details[1]);
$form->applyFilter('theme', 'trim');
$defaults['extra_'.$field_details[1]] = date('Y-m-d 12:00:00');
$form -> setDefaults($defaults);
break;
case USER_FIELD_TYPE_DATETIME:
$form->addElement('datepicker', 'extra_'.$field_details[1],$field_details[3], array('form_name' => 'profile'));
$form->_elements[$form->_elementIndex['extra_'.$field_details[1]]]->setLocalOption('minYear', 1900);
if ($field_details[7] == 0) $form->freeze('extra_'.$field_details[1]);
$form->applyFilter('theme', 'trim');
$defaults['extra_'.$field_details[1]] = date('Y-m-d 12:00:00');
$form -> setDefaults($defaults);
break;
case USER_FIELD_TYPE_DOUBLE_SELECT:
foreach ($field_details[9] as $key => $element) {
if ($element[2][0] == '*') {
$values['*'][$element[0]] = str_replace('*', '', $element[2]);
} else {
$values[0][$element[0]] = $element[2];
}
}
$group = '';
$group[] =& HTML_QuickForm::createElement('select', 'extra_'.$field_details[1], '', $values[0], '');
$group[] =& HTML_QuickForm::createElement('select', 'extra_'.$field_details[1].'*', '', $values['*'], '');
$form->addGroup($group, 'extra_'.$field_details[1], $field_details[3], '&nbsp;');
if ($field_details[7] == 0) $form->freeze('extra_'.$field_details[1]);
// recoding the selected values for double : if the user has selected certain values, we have to assign them to the correct select form
if (key_exists('extra_'.$field_details[1], $extra_data)) {
// exploding all the selected values (of both select forms)
$selected_values = explode(';', $extra_data['extra_'.$field_details[1]]);
$extra_data['extra_'.$field_details[1]] = array();
// looping through the selected values and assigning the selected values to either the first or second select form
foreach ($selected_values as $key=>$selected_value) {
if (key_exists($selected_value,$values[0])) {
$extra_data['extra_'.$field_details[1]]['extra_'.$field_details[1]] = $selected_value;
} else {
$extra_data['extra_'.$field_details[1]]['extra_'.$field_details[1].'*'] = $selected_value;
}
}
}
break;
case USER_FIELD_TYPE_DIVIDER:
$form->addElement('static', $field_details[1], '<br /><strong>'.$field_details[3].'</strong>');
break;
case USER_FIELD_TYPE_TAG:
//the magic should be here
$user_tags = UserManager::get_user_tags(api_get_user_id(),$field_details[0]);
$pre_html = '<div class="row">
<div class="label">'.$field_details[3].'</div>
<div class="formw">';
$post = '</div></div>';
$tag_list = '';
if (is_array($user_tags) && count($user_tags)> 0) {
foreach ($user_tags as $tag) {
$tag_list .= '<option value="'.$tag['tag'].'" class="selected">'.$tag['tag'].'</option>';
}
}
$multi_select = '<select id="extra_'.$field_details[1].'" name="extra_'.$field_details[1].'">
'.$tag_list.'
</select>';
$form->addElement('html',$pre_html.$multi_select.$post );
$url = api_get_path(WEB_AJAX_PATH).'user_manager.ajax.php';
$complete_text = get_lang('StartToType');
//if cache is set to true the jquery will be called 1 time
$jquery_ready_content.= <<<EOF
$("#extra_$field_details[1]").fcbkcomplete({
json_url: "$url?a=search_tags&field_id=$field_details[0]",
cache: false,
filter_case: true,
filter_hide: true,
complete_text:"$complete_text",
firstselected: true,
//onremove: "testme",
//onselect: "testme",
filter_selected: true,
newel: true
});
EOF;
break;
case USER_FIELD_TYPE_TIMEZONE:
$form->addElement('select', 'extra_'.$field_details[1], $field_details[3], api_get_timezones(), '');
if ($field_details[7] == 0) $form->freeze('extra_'.$field_details[1]);
break;
case USER_FIELD_TYPE_SOCIAL_PROFILE:
// get the social network's favicon
$icon_path = UserManager::get_favicon_from_url($extra_data['extra_'.$field_details[1]], $field_details[4]);
// special hack for hi5
$leftpad = '1.7'; $top = '0.4'; $domain = parse_url($icon_path, PHP_URL_HOST); if ($domain == 'www.hi5.com' or $domain == 'hi5.com') { $leftpad = '3'; $top = '0';}
// print the input field
$form->addElement('text', 'extra_'.$field_details[1], $field_details[3], array('size' => 60, 'style' => 'background-image: url(\''.$icon_path.'\'); background-repeat: no-repeat; background-position: 0.4em '.$top.'em; padding-left: '.$leftpad.'em; '));
$form->applyFilter('extra_'.$field_details[1], 'stripslashes');
$form->applyFilter('extra_'.$field_details[1], 'trim');
if ($field_details[7] == 0) $form->freeze('extra_'.$field_details[1]);
break;
}
}
// the $jquery_ready_content variable collects all functions that will be load in the $(document).ready javascript function
$htmlHeadXtra[] ='<script type="text/javascript">
$(document).ready(function(){
'.$jquery_ready_content.'
});
</script>';
if (api_get_setting('profile', 'apikeys') == 'true') {
$form->addElement('html', '<div id="div_api_key">');
$form->addElement('text', 'api_key_generate', get_lang('MyApiKey'), array('size' => 40, 'id' => 'id_api_key_generate'));
$form->addElement('html', '</div>');
$form->addElement('button', 'generate_api_key', get_lang('GenerateApiKey'), array('id' => 'id_generate_api_key', 'onclick' => 'generate_open_id_form()')); //generate_open_id_form()
}
// SUBMIT
if (is_profile_editable()) {
$form->addElement('style_submit_button', 'apply_change', get_lang('SaveSettings'), 'class="save"');
} else {
$form->freeze();
}
$user_data = array_merge($user_data, $extra_data);
$form->setDefaults($user_data);
/* FUNCTIONS */
/**
* Can a user edit his/her profile?
*
* @return boolean Editability of the profile
*/
function is_profile_editable() {
return $GLOBALS['profileIsEditable'];
}
/*
PRODUCTIONS FUNCTIONS
*/
/**
* Upload a submitted user production.
*
* @param $user_id User id
* @return The filename of the new production or FALSE if the upload has failed
*/
function upload_user_production($user_id) {
$image_path = UserManager::get_user_picture_path_by_id($user_id, 'system', true);
$production_repository = $image_path['dir'].$user_id.'/';
if (!file_exists($production_repository)) {
@mkdir($production_repository, api_get_permissions_for_new_directories(), true);
}
$filename = replace_dangerous_char($_FILES['production']['name']);
$filename = disable_dangerous_file($filename);
if (filter_extension($filename)) {
if (@move_uploaded_file($_FILES['production']['tmp_name'], $production_repository.$filename)) {
return $filename;
}
}
return false; // this should be returned if anything went wrong with the upload
}
/**
* Check current user's current password
* @param char password
* @return bool true o false
* @uses Gets user ID from global variable
*/
function check_user_password($password){
global $_user;
$user_id = api_get_user_id();
if ($user_id != strval(intval($user_id)) || empty($password)) { return false; }
$table_user = Database :: get_main_table(TABLE_MAIN_USER);
$password = api_get_encrypted_password($password);
$sql_password = "SELECT * FROM $table_user WHERE user_id='".$user_id."' AND password='".$password."'";
$result = Database::query($sql_password);
return Database::num_rows($result) != 0;
}
/**
* Check current user's current password
* @param char email
* @return bool true o false
* @uses Gets user ID from global variable
*/
function check_user_email($email){
global $_user;
$user_id = api_get_user_id();
if ($user_id != strval(intval($user_id)) || empty($email)) { return false; }
$table_user = Database :: get_main_table(TABLE_MAIN_USER);
$sql_password = "SELECT * FROM $table_user WHERE user_id='".$user_id."' AND email='".$email."'";
$result = Database::query($sql_password);
return Database::num_rows($result) != 0;
}
/* MAIN CODE */
$filtered_extension = false;
$update_success = false;
$upload_picture_success = false;
$upload_production_success = false;
$msg_fail_changue_email = false;
$msg_is_not_password = false;
if (!empty($_SESSION['change_email'])) {
$msg_fail_changue_email= ($_SESSION['change_email'] == 'success');
unset($_SESSION['change_email']);
} elseif (!empty($_SESSION['is_not_password'])) {
$msg_is_not_password = ($_SESSION['is_not_password'] == 'success');
unset($_SESSION['is_not_password']);
} elseif (!empty($_SESSION['profile_update'])) {
$update_success = ($_SESSION['profile_update'] == 'success');
unset($_SESSION['profile_update']);
} elseif (!empty($_SESSION['image_uploaded'])) {
$upload_picture_success = ($_SESSION['image_uploaded'] == 'success');
unset($_SESSION['image_uploaded']);
} elseif (!empty($_SESSION['production_uploaded'])) {
$upload_production_success = ($_SESSION['production_uploaded'] == 'success');
unset($_SESSION['production_uploaded']);
}
if ($form->validate()) {
$wrong_current_password = false;
// $user_data = $form->exportValues();
$user_data = $form->getSubmitValues();
// set password if a new one was provided
if (!empty($user_data['password0'])) {
if (check_user_password($user_data['password0'])) {
if (!empty($user_data['password1'])) {
$password = $user_data['password1'];
}
} else {
$wrong_current_password = true;
$_SESSION['is_not_password'] = 'success';
}
}
if (empty($user_data['password0']) && !empty($user_data['password1'])) {
$wrong_current_password = true;
$_SESSION['is_not_password'] = 'success';
}
if (!check_user_email($user_data['email']) && !empty($user_data['password0']) && !$wrong_current_password) {
$changeemail = $user_data['email'];
}
if (!check_user_email($user_data['email']) && empty($user_data['password0'])){
$_SESSION['change_email'] = 'success';
}
// Upload picture if a new one is provided
if ($_FILES['picture']['size']) {
if ($new_picture = UserManager::update_user_picture(api_get_user_id(), $_FILES['picture']['name'], $_FILES['picture']['tmp_name'])) {
$user_data['picture_uri'] = $new_picture;
$_SESSION['image_uploaded'] = 'success';
}
} elseif (!empty($user_data['remove_picture'])) {
// remove existing picture if asked
UserManager::delete_user_picture(api_get_user_id());
$user_data['picture_uri'] = '';
}
//Remove production
if (is_array($user_data['remove_production'])) {
foreach (array_keys($user_data['remove_production']) as $production) {
UserManager::remove_user_production(api_get_user_id(), urldecode($production));
}
if ($production_list = UserManager::build_production_list(api_get_user_id(), true, true)) {
$form->insertElementBefore($form->createElement('static', null, null, $production_list), 'productions_list');
}
$form->removeElement('productions_list');
$file_deleted = true;
}
// upload production if a new one is provided
if ($_FILES['production']['size']) {
$res = upload_user_production(api_get_user_id());
if (!$res) {
//it's a bit excessive to assume the extension is the reason why upload_user_production() returned false, but it's true in most cases
$filtered_extension = true;
} else {
$_SESSION['production_uploaded'] = 'success';
}
}
// remove values that shouldn't go in the database
unset($user_data['password0'],$user_data['password1'], $user_data['password2'], $user_data['MAX_FILE_SIZE'],
$user_data['remove_picture'], $user_data['apply_change'],$user_data['email'] );
// Following RFC2396 (http://www.faqs.org/rfcs/rfc2396.html), a URI uses ':' as a reserved character
// we can thus ensure the URL doesn't contain any scheme name by searching for ':' in the string
$my_user_openid = isset($user_data['openid']) ? $user_data['openid'] : '';
if (!preg_match('/^[^:]*:\/\/.*$/', $my_user_openid)) {
//ensure there is at least a http:// scheme in the URI provided
$user_data['openid'] = 'http://'.$my_user_openid;
}
$extras = array();
//Checking the user language
$languages = api_get_languages();
if (!in_array($user_data['language'], $languages['folder'])) {
$user_data['language'] = api_get_setting('platformLanguage');
}
//Only update values that are request by the "profile" setting
$profile_list = api_get_setting('profile');
//Adding missing variables
$available_values_to_modify = array();
foreach($profile_list as $key => $status) {
if ($status == 'true') {
if ($key == 'name') {
$available_values_to_modify[] = 'firstname';
$available_values_to_modify[] = 'lastname';
} elseif ($key == 'picture') {
$available_values_to_modify[] = 'picture_uri';
} else {
$available_values_to_modify[] = $key;
}
}
}
//Fixing missing variables
$available_values_to_modify = array_merge($available_values_to_modify, array('competences', 'diplomas', 'openarea', 'teach', 'openid'));
// build SQL query
$sql = "UPDATE $table_user SET";
unset($user_data['api_key_generate']);
foreach ($user_data as $key => $value) {
if (substr($key, 0, 6) == 'extra_') { //an extra field
$new_key = substr($key, 6);
// format array date to 'Y-m-d' or date time to 'Y-m-d H:i:s'
if (is_array($value) && isset($value['Y']) && isset($value['F']) && isset($value['d'])) {
if (isset($value['H']) && isset($value['i'])) {
// extra field date time
$time = mktime($value['H'],$value['i'],0,$value['F'],$value['d'],$value['Y']);
$extras[$new_key] = date('Y-m-d H:i:s',$time);
} else {
// extra field date
$time = mktime(0,0,0,$value['F'],$value['d'],$value['Y']);
$extras[$new_key] = date('Y-m-d',$time);
}
} else {
$extras[$new_key] = $value;
}
} else {
if (in_array($key, $available_values_to_modify)) {
$sql .= " $key = '".Database::escape_string($value)."',";
}
}
}
//changue email
if (isset($changeemail) && !isset($password) && in_array('email', $available_values_to_modify)) {
$sql .= " email = '".Database::escape_string($changeemail)."' ";
} elseif (isset($password) && isset($changeemail) && in_array('email', $available_values_to_modify) && in_array('password', $available_values_to_modify)) {
$sql .= " email = '".Database::escape_string($changeemail)."', ";
$password = api_get_encrypted_password($password);
$sql .= " password = '".Database::escape_string($password)."'";
} elseif (isset($password) && !isset($changeemail) && in_array('password', $available_values_to_modify)) {
$password = api_get_encrypted_password($password);
$sql .= " password = '".Database::escape_string($password)."'";
} else {
// remove trailing , from the query we have so far
$sql = rtrim($sql, ',');
}
$sql .= " WHERE user_id = '".api_get_user_id()."'";
Database::query($sql);
// User tag process
//1. Deleting all user tags
$list_extra_field_type_tag = UserManager::get_all_extra_field_by_type(USER_FIELD_TYPE_TAG);
if (is_array($list_extra_field_type_tag) && count($list_extra_field_type_tag)>0) {
foreach ($list_extra_field_type_tag as $id) {
UserManager::delete_user_tags(api_get_user_id(), $id);
}
}
//2. Update the extra fields and user tags if available
if (is_array($extras) && count($extras)> 0) {
foreach ($extras as $key => $value) {
//3. Tags are process in the UserManager::update_extra_field_value by the UserManager::process_tags function
$myres = UserManager::update_extra_field_value(api_get_user_id(), $key, $value);
}
}
// re-init the system to take new settings into account
$uidReset = true;
include api_get_path(INCLUDE_PATH).'local.inc.php';
$_SESSION['profile_update'] = 'success';
header("Location: ".api_get_self()."?{$_SERVER['QUERY_STRING']}".($filtered_extension && strpos($_SERVER['QUERY_STRING'], '&fe=1') === false ? '&fe=1' : ''));
exit;
}
/* MAIN DISPLAY SECTION */
// the header
Display::display_header(get_lang('ModifyProfile'));
if (api_get_setting('allow_social_tool') != 'true') {
if (api_get_setting('extended_profile') == 'true') {
echo '<div class="actions">';
if (api_get_setting('allow_social_tool') == 'true' && api_get_setting('allow_message_tool') == 'true') {
echo '<a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'.Display::return_icon('shared_profile.png', get_lang('ViewSharedProfile')).'&nbsp;'.get_lang('ViewSharedProfile').'</a>';
}
if (api_get_setting('allow_message_tool') == 'true') {
echo '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.Display::return_icon('inbox.png').' '.get_lang('Messages').'</a>';
}
$show = isset($_GET['show']) ? '&amp;show='.Security::remove_XSS($_GET['show']) : '';
if (isset($_GET['type']) && $_GET['type'] == 'extended') {
echo '<a href="profile.php?type=reduced'.$show.'">'.Display::return_icon('edit.png', get_lang('EditNormalProfile'),'',16).'&nbsp;'.get_lang('EditNormalProfile').'</a>';
} else {
echo '<a href="profile.php?type=extended'.$show.'">'.Display::return_icon('edit.png', get_lang('EditExtendProfile'),'',16).'&nbsp;'.get_lang('EditExtendProfile').'</a>';
}
echo '</div>';
}
}
if (!empty($file_deleted)) {
Display :: display_confirmation_message(get_lang('FileDeleted'), false);
} elseif (!empty($update_success)) {
$message = get_lang('ProfileReg');
if ($upload_picture_success) {
$message .= '<br /> '.get_lang('PictureUploaded');
}
if ($upload_production_success) {
$message.='<br />'.get_lang('ProductionUploaded');
}
Display :: display_confirmation_message($message, false);
}
if (!empty($msg_fail_changue_email)){
$errormail=get_lang('ToChangeYourEmailMustTypeYourPassword');
Display :: display_error_message($errormail, false);
}
if (!empty($msg_is_not_password)){
$warning_msg = get_lang('CurrentPasswordEmptyOrIncorrect');
Display :: display_warning_message($warning_msg, false);
}
//User picture size is calculated from SYSTEM path
$image_syspath = UserManager::get_user_picture_path_by_id(api_get_user_id(), 'system', false, true);
$image_syspath['dir'].$image_syspath['file'];
$image_size = api_getimagesize($image_syspath['dir'].$image_syspath['file']);
//Web path
$image_path = UserManager::get_user_picture_path_by_id(api_get_user_id(), 'web', false, true);
$image_dir = $image_path['dir'];
$image = $image_path['file'];
$image_file = $image_dir.$image;
$img_attributes = 'src="'.$image_file.'?rand='.time().'" '
.'alt="'.api_get_person_name($user_data['firstname'], $user_data['lastname']).'" '
.'style="float:'.($text_dir == 'rtl' ? 'left' : 'right').'; margin-top:0px;padding:5px;" ';
if ($image_size['width'] > 300) {
//limit display width to 300px
$img_attributes .= 'width="300" ';
}
// get the path,width and height from original picture
$big_image = $image_dir.'big_'.$image;
$big_image_size = api_getimagesize($big_image);
$big_image_width = $big_image_size['width'];
$big_image_height = $big_image_size['height'];
$url_big_image = $big_image.'?rnd='.time();
if (api_get_setting('allow_social_tool') == 'true') {
echo '<div id="social-content">';
echo '<div id="social-content-left">';
SocialManager::show_social_menu('home', null, api_get_user_id(), false);
echo '</div>';
echo '<div id="social-content-right">';
echo '<table><tr><td>';
//Useless link
/*
echo '<div id="social-content-online">';
if (api_get_setting('extended_profile') == 'true') {
$show = isset($_GET['show']) ? '&amp;show='.Security::remove_XSS($_GET['show']) : '';
if (isset($_GET['type']) && $_GET['type'] == 'reduced') {
echo '<a href="profile.php?type=extended '.$show.'"><span class="social-menu-text1">'.Display::return_icon('edit.png', get_lang('EditExtendProfile'),'',16).'&nbsp;'.get_lang('EditExtendProfile').'</span></a>';
} else {
echo '<a href="profile.php?type=reduced'.$show.'"><span class="social-menu-text1">'.Display::return_icon('edit.png', get_lang('EditNormalProfile'),'',16).'&nbsp;'.get_lang('EditNormalProfile').'</span></a>';
}
}
echo '</div>';*/
$form->display();
echo '</td></tr></table>';
echo '</div>';
} else {
// Style position:absolute has been removed for Opera-compatibility.
//echo '<div id="image-message-container" style="float:right;display:inline;position:absolute;padding:3px;width:250px;" >';
echo '<div id="image-message-container" style="float:right;display:inline;padding:3px;width:230px;" >';
if ($image == 'unknown.jpg') {
echo '<img '.$img_attributes.' />';
} else {
echo '<input type="image" '.$img_attributes.' onclick="javascript: return show_image(\''.$url_big_image.'\',\''.$big_image_width.'\',\''.$big_image_height.'\');"/>';
}
echo '</div>';
$form->display();
}
Display :: display_footer();

@ -183,9 +183,8 @@ if (is_int($global_error_code) && $global_error_code > 0) {
<img vspace="10" hspace="10" alt="Chamilo" src="{CHAMILO_LOGO}">
</div>
</div>
<div class="clear"></div>
<div id="header2"></div>
<div id="header3">
<div class="clear"></div>
<div class="subnav">
<ul>
<li id="current"><a href="#"><span id="tab_active">{SECTION}</span></a></li>
</ul>

@ -428,12 +428,6 @@ function return_menu() {
//start user section line with name, my course, my profile, scorm info, etc
$menu .= '<ul class="nav nav-pills pull-right">';
//echo '<li><span>'.get_lang('LoggedInAsX').' '.$login.'</span></li>';
//echo '<li><a href="'.api_get_path(WEB_PATH).'main/auth/profile.php" target="_top"><span>'.get_lang('Profile').'</span></a></li>';
//$header3 .= '<li><a href="'.api_get_path(WEB_PATH).'index.php?logout=logout&uid='.api_get_user_id().'" target="_top"><span>'.get_lang('Logout').' ('.$login.')</span></a></li>';
//$menu .= '<li><a href=""><img src="'.$user_info['avatar_small'].'"/></a></li>';
//<a href="'.$logout_link.'">'.get_lang('Logout').'</a>
$menu .= '<li class="dropdown">';
$menu .= '<a class="dropdown-toggle" data-toggle="dropdown" href="#"><img src="'.$user_info['avatar_small'].'"/> '.$user_info['complete_name'].'<b class="caret"></b></a>
<ul class="dropdown-menu">

@ -1365,7 +1365,7 @@ class CourseManager {
return $teachers;
}
public static function get_teacher_list_from_course_code_to_string($course_code) {
public static function get_teacher_list_from_course_code_to_string($course_code, $separator = ',') {
$teacher_list = self::get_teacher_list_from_course_code($course_code);
$teacher_string = '';
$list = array();
@ -1374,7 +1374,7 @@ class CourseManager {
$list[]= api_get_person_name($teacher['firstname'], $teacher['lastname']);
}
if (!empty($list)) {
$teacher_string = implode (', ', $list);
$teacher_string = implode($separator.' ', $list);
}
}
return $teacher_string;
@ -2713,31 +2713,29 @@ class CourseManager {
return self::course_code_exists($wanted_course_code);
}
/* Use smarty*/
/* Builds the course block
* @todo use smarty
*/
public function course_item_html($params, $is_sub_content = false) {
$html = '';
$class = "well course_item";
$class = "well";
if ($is_sub_content) {
$class = "";
}
$html .= '<div class="row-fluid">';
//$html .= '<div class="span9">';
$html .= '<div class="'.$class.'">';
$html .= '<div class="span1">'.$params['icon'].'</div>';
$html .= '<div class="span5">';
$html .= '<h4>'.$params['title'].$params['notifications'].'</h4>';
if (!empty($params['teachers'])) {
$html .= '<h5>'.$params['teachers'].'</h5>';
}
if (!empty($params['coaches'])) {
$html .= '<h5>'.$params['coaches'].'</h5>';
}
$html .= '</div>';
$html .= '<div class="span1 pull-right">'.$params['right_actions'].'</div>';
$html .= '</div>';
//$html .= '</div>';
}
$html .= '<div class="'.$class.'">';
$html .= '<div class="row">';
$html .= '<div class="span1">'.$params['icon'].'</div>';
$html .= '<div class="span6">';
$html .= '<h4>'.$params['title'].$params['notifications'].'</h4>';
if (!empty($params['teachers'])) {
$html .= '<h5>'.$params['teachers'].'</h5>';
}
if (!empty($params['coaches'])) {
$html .= '<h5>'.$params['coaches'].'</h5>';
}
$html .= '</div>';
$html .= '<div class="span1 pull-right">'.$params['right_actions'].'</div>';
$html .= '</div>';
$html .= '</div>';
return $html;
}

@ -274,6 +274,7 @@ class Database {
* @todo move this function in a gradebook-related library
*/
public static function get_course_by_category($category_id) {
$category_id = intval($category_id);
$info = self::fetch_array(self::query('SELECT course_code FROM '.self::get_main_table(TABLE_MAIN_GRADEBOOK_CATEGORY).' WHERE id='.$category_id), 'ASSOC');
return $info ? $info['course_code'] : false;
}

@ -262,6 +262,7 @@ class Database {
* @todo move this function in a gradebook-related library
*/
public static function get_course_by_category($category_id) {
$category_id = intval($category_id);
$info = self::fetch_array(self::query('SELECT course_code FROM '.self::get_main_table(TABLE_MAIN_GRADEBOOK_CATEGORY).' WHERE id='.$category_id), 'ASSOC');
return $info ? $info['course_code'] : false;
}

@ -33,7 +33,7 @@ class FormValidator extends HTML_QuickForm {
function __construct($form_name, $method = 'post', $action = '', $target = '', $attributes = null, $track_submit = true) {
//Default form class
if (!isset($attributes['class'])) {
if (is_array($attributes) && !isset($attributes['class']) || empty($attributes)) {
$attributes['class'] = 'form-horizontal';
}

@ -3,8 +3,10 @@
class AppPlugin {
var $plugin_blocks = array (
// 'loginpage_main',
'login',
'menu',
'login_top',
'login_bottom',
'menu_top',
'menu_bottom',
/* 'campushomepage_main',
'campushomepage_menu',
'mycourses_main',

@ -392,37 +392,32 @@ class SocialManager extends UserManager {
$main_user_table = Database :: get_main_table(TABLE_MAIN_USER);
$tbl_session = Database :: get_main_table(TABLE_MAIN_SESSION);
$user_id = api_get_user_id();
$course_system_code = $my_course['k'];
$course_visual_code = $my_course['c'];
$course_title = $my_course['i'];
$course_directory = $my_course['d'];
$course_teacher = $my_course['t'];
$course_code = $my_course['code'];
$course_visual_code = $my_course['course_info']['official_code'];
$course_title = $my_course['course_info']['title'];
$course_teacher_email = isset($my_course['email'])?$my_course['email']:'';
$course_info = Database :: get_course_info($course_system_code);
$course_info = Database :: get_course_info($course_code);
$course_id = $course_info['real_id'];
$course_access_settings = CourseManager :: get_access_settings($course_system_code);
$course_access_settings = CourseManager :: get_access_settings($course_code);
$course_visibility = $course_access_settings['visibility'];
$user_in_course_status = CourseManager :: get_user_in_course_status(api_get_user_id(), $course_system_code);
$user_in_course_status = CourseManager :: get_user_in_course_status(api_get_user_id(), $course_code);
//function logic - act on the data
$is_virtual_course = CourseManager :: is_virtual_course_from_system_code($my_course['k']);
$is_virtual_course = CourseManager :: is_virtual_course_from_system_code($course_code);
if ($is_virtual_course) {
// If the current user is also subscribed in the real course to which this
// virtual course is linked, we don't need to display the virtual course entry in
// the course list - it is combined with the real course entry.
$target_course_code = CourseManager :: get_target_of_linked_course($course_system_code);
$target_course_code = CourseManager :: get_target_of_linked_course($course_code);
$is_subscribed_in_target_course = CourseManager :: is_user_subscribed_in_course(api_get_user_id(), $target_course_code);
if ($is_subscribed_in_target_course) {
return; //do not display this course entry
}
}
$has_virtual_courses = CourseManager :: has_virtual_courses_from_code($course_system_code, api_get_user_id());
$has_virtual_courses = CourseManager :: has_virtual_courses_from_code($course_code, api_get_user_id());
if ($has_virtual_courses) {
$return_result = CourseManager :: determine_course_title_from_course_info(api_get_user_id(), $course_info);
$course_display_title = $return_result['title'];
@ -581,8 +576,7 @@ class SocialManager extends UserManager {
ident="#edit_image";
$(ident).hide();
}
</script>';
</script>';
if (in_array($show, $show_groups) && !empty($group_id)) {
//--- Group image
@ -656,9 +650,9 @@ class SocialManager extends UserManager {
$html .= '<li><a href="'.api_get_path(WEB_PATH).'main/social/home.php">'.Display::return_icon('home.png',get_lang('Home'),array('hspace'=>'6')).'<span class="social-menu-text4" >'.get_lang('Home').'</span></a></li>
<li><a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php?f=social">'.Display::return_icon('instant_message.png',get_lang('Messages'),array('hspace'=>'6')).'<span class="social-menu-text4" >'.get_lang('Messages').$count_unread_message.'</span></a></li>';
$html .= '<li><a href="'.api_get_path(WEB_PATH).'main/social/invitations.php">'.Display::return_icon('invitation.png',get_lang('Invitations'),array('hspace'=>'6')).'<span class="'.($show=='invitations'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Invitations').$total_invitations.'</span></a></li>';
$html .= '<li><a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'.Display::return_icon('my_shared_profile.png',get_lang('ViewMySharedProfile',array('hspace'=>'6','style'=>'float:left')).'<span class="social-menu-text-active" >'.get_lang('ViewMySharedProfile').'</span></a></li>
$html .= '<li><a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'.Display::return_icon('my_shared_profile.png', get_lang('ViewMySharedProfile'), array('hspace'=>'6','style'=>'float:left')).'<span class="social-menu-text-active" >'.get_lang('ViewMySharedProfile').'</span></a></li>
<li><a href="'.api_get_path(WEB_PATH).'main/social/friends.php">'.Display::return_icon('friend.png',get_lang('Friends'),array('hspace'=>'6')).'<span class="social-menu-text4" >'.get_lang('Friends').'</span></a></li>
<li><a href="'.api_get_path(WEB_PATH).'main/social/groups.php">'.Display::return_icon('group_s.png'),get_lang('SocialGroups'),array('hspace'=>'6')).'<span class="social-menu-text4" >'.get_lang('SocialGroups').'</span></a></li>';
<li><a href="'.api_get_path(WEB_PATH).'main/social/groups.php">'.Display::return_icon('group_s.png', get_lang('SocialGroups'),array('hspace'=>'6')).'<span class="social-menu-text4" >'.get_lang('SocialGroups').'</span></a></li>';
$html .= '<li><a href="'.api_get_path(WEB_PATH).'main/social/search.php">'.Display::return_icon('zoom.png',get_lang('Search'),array('hspace'=>'6')).'<span class="'.($show=='search'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Search').'</span></a></li>';
$html .= '<li><a href="'.api_get_path(WEB_PATH).'main/social/myfiles.php">'.Display::return_icon('briefcase.png',get_lang('MyFiles'),array('hspace'=>'6'),16).'<span class="'.($show=='myfiles'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('MyFiles').'</span></a></li>';
}
@ -959,6 +953,17 @@ class SocialManager extends UserManager {
echo '</ul></dd>';
}
}
public function social_wrapper_div($content, $span_count) {
$span_count = intval($span_count);
$html = '<div class="span'.$span_count.'">';
$html .= '<div class="well_border">';
$html .= $content;
$html .= '</div></div>';
return $html;
}
/**
* Dummy function
*

@ -798,18 +798,16 @@ class IndexManager {
}
$img_array = UserManager::get_picture_user(api_get_user_id(), $img_array['file'], 50, USER_IMAGE_SIZE_MEDIUM, ' width="90" height="90" ');
$profile_content = '<div id="social_widget">';
$profile_content .= '<div id="social_widget_image">';
if (api_get_setting('allow_social_tool') == 'true') {
if (!$no_image) {
$profile_content .='<a href="'.api_get_path(WEB_PATH).'main/social/home.php"><img src="'.$img_array['file'].'" '.$img_array['style'].' border="1"></a>';
$profile_content .= '<ul class="menulist">';
if (api_get_setting('allow_social_tool') == 'true') {
if (!$no_image) {
$profile_content .='<li><a class="thumbnail" href="'.api_get_path(WEB_PATH).'main/social/home.php"><img src="'.$img_array['file'].'" '.$img_array['style'].' border="1"></a></li>';
} else {
$profile_content .='<a href="'.api_get_path(WEB_PATH).'main/auth/profile.php"><img title="'.get_lang('EditProfile').'" src="'.$img_array['file'].'" '.$img_array['style'].' border="1"></a>';
$profile_content .='<li><a class="thumbnail" href="'.api_get_path(WEB_PATH).'main/auth/profile.php"><img title="'.get_lang('EditProfile').'" src="'.$img_array['file'].'" '.$img_array['style'].' border="1"></a></li>';
}
}
$profile_content .= ' </div></div>';
$profile_content .= ' <div class="clear"></div>';
}
// @todo Add a platform setting to add the user image.
if (api_get_setting('allow_message_tool') == 'true') {
@ -828,9 +826,8 @@ class IndexManager {
$cant_msg = '';
if ($number_of_new_messages > 0) {
$cant_msg = ' ('.$number_of_new_messages.')';
}
$profile_content .= '<ul class="menulist">';
}
$link = '';
if (api_get_setting('allow_social_tool') == 'true') {
$link = '?f=social';
@ -846,9 +843,9 @@ class IndexManager {
}
$profile_content .= '<li><a href="'.api_get_path(WEB_PATH).'main/social/invitations.php">'.get_lang('PendingInvitations').' '.$total_invitations.' </a></li>';
}
$profile_content .= '<li><a href="'.api_get_path(WEB_PATH).'main/auth/profile.php">'.get_lang('EditProfile').'</a></li>';
$profile_content .= '</ul>';
$profile_content .= '<li><a href="'.api_get_path(WEB_PATH).'main/auth/profile.php">'.get_lang('EditProfile').'</a></li>';
}
$profile_content .= '</ul>';
$html = self::show_right_block(get_lang('Profile'), $profile_content);
return $html;
}

@ -68,7 +68,7 @@ if (api_get_setting('profile', 'picture') == 'true') {
$user_info = UserManager :: get_user_info_by_id(api_get_user_id());
$social_left_content = SocialManager::show_social_menu('home');
$social_right_content .= '<div class="social_user_information span4">';
$social_right_content .= '<div class="span5">';
$social_right_content .= '<div class="social-groups-home-title">'.get_lang('ContactInformation').'</div>';
// information current user

@ -104,7 +104,7 @@ $number_loop = count($list_get_invitation);
$total_invitations = $number_loop + count($list_get_invitation_sent) + count($pending_invitations);
if ($total_invitations == 0 && count($_GET) <= 0) {
$social_right_content .= '<a href="search.php">'.get_lang('TryAndFindSomeFriends').'</a><br /><br />';
$social_right_content .= '<div class="span8"><a class="btn" href="search.php">'.get_lang('TryAndFindSomeFriends').'</a></div>';
}
if ($number_loop != 0) {

@ -7,7 +7,7 @@
* @package chamilo.social
*/
$language_file = array('userInfo');
$language_file = array('userInfo', 'index');
$cidReset = true;
require_once '../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'group_portal_manager.lib.php';
@ -208,14 +208,15 @@ $_SESSION['social_user_id'] = intval($user_id);
//Setting some course info
$my_user_id=isset($_GET['u']) ? Security::remove_XSS($_GET['u']) : api_get_user_id();
$personal_course_list = UserManager::get_personal_session_course_list($my_user_id);
$course_list_code = array();
$i=1;
if (is_array($personal_course_list)) {
foreach ($personal_course_list as $my_course) {
if ($i<=10) {
$list[] = SocialManager::get_logged_user_course_html($my_course, $i);
$course_list_code[] = array('code'=>$my_course['k']);
$list[] = SocialManager::get_logged_user_course_html($my_course, $i);
$course_list_code[] = array('code'=>$my_course['code']);
} else {
break;
}
@ -226,40 +227,105 @@ if (is_array($personal_course_list)) {
}
$social_left_content = SocialManager::show_social_menu('shared_profile', null, $user_id, $show_full_profile);
$social_right_content = '<div class="well_border span4">';
$personal_info = null;
if (!empty($user_info['firstname']) || !empty($user_info['lastname'])) {
$social_right_content .= '<div><h3>'.api_get_person_name($user_info['firstname'], $user_info['lastname']).'</h3></div>';
$personal_info .= '<div><h3>'.api_get_person_name($user_info['firstname'], $user_info['lastname']).'</h3></div>';
} else {
//--- Basic Information
$social_right_content .= '<div><h3>'.get_lang('Profile').'</h3></div>';
$personal_info .= '<div><h3>'.get_lang('Profile').'</h3></div>';
}
if ($show_full_profile) {
$social_right_content .= '<div class="social-profile-info">';
$social_right_content .= '<dl>';
$social_right_content .= '<dt>'.get_lang('UserName').'</dt><dd>'. $user_info['username'].' </dd>';
if ($show_full_profile) {
$personal_info .= '<dl class="dl-horizontal">';
$personal_info .= '<dt>'.get_lang('UserName').'</dt><dd>'. $user_info['username'].' </dd>';
if (!empty($user_info['firstname']) || !empty($user_info['lastname']))
$social_right_content .= '<dt>'.get_lang('Name').'</dt><dd>'. api_get_person_name($user_info['firstname'], $user_info['lastname']).'</dd>';
$personal_info .= '<dt>'.get_lang('Name').'</dt><dd>'. api_get_person_name($user_info['firstname'], $user_info['lastname']).'</dd>';
if (!empty($user_info['official_code']))
$social_right_content .= '<dt>'.get_lang('OfficialCode').'</dt><dd>'.$user_info['official_code'].'</dd>';
$personal_info .= '<dt>'.get_lang('OfficialCode').'</dt><dd>'.$user_info['official_code'].'</dd>';
if (!empty($user_info['email']))
if (api_get_setting('show_email_addresses')=='true')
$social_right_content .= '<dt>'.get_lang('Email').'</dt><dd>'.$user_info['email'].'</dd>';
$personal_info .= '<dt>'.get_lang('Email').'</dt><dd>'.$user_info['email'].'</dd>';
if (!empty($user_info['phone']))
$social_right_content .= '<dt>'.get_lang('Phone').'</dt><dd>'. $user_info['phone'].'</dd>';
$social_right_content .= '</dl>';
$social_right_content .= '</div>';
} else {
$social_right_content .= '<div class="social-profile-info">';
$social_right_content .= '<dl>';
$personal_info .= '<dt>'.get_lang('Phone').'</dt><dd>'. $user_info['phone'].'</dd>';
$personal_info .= '</dl>';
} else {
$personal_info .= '<dl>';
if (!empty($user_info['username']))
$social_right_content .= '<dt>'.get_lang('UserName').'</dt><dd>'. $user_info['username'].'</dd>';
$social_right_content .= '</dl>';
$social_right_content .= '</div>';
$personal_info .= '<dt>'.get_lang('UserName').'</dt><dd>'. $user_info['username'].'</dd>';
$personal_info .= '</dl>';
}
$social_right_content = SocialManager::social_wrapper_div($personal_info, 4);
if ($show_full_profile) {
//SOCIALGOODFRIEND , USER_RELATION_TYPE_FRIEND, USER_RELATION_TYPE_PARENT
$friends = SocialManager::get_friends($user_id, USER_RELATION_TYPE_FRIEND);
$friend_html = '';
$number_of_images = 6;
$number_friends = 0;
$number_friends = count($friends);
$social_right_content .= '<div class="clear"></div>';
if ($number_friends != 0) {
$friend_html.= '<div><h3>'.get_lang('SocialFriend').'</h3></div>';
$friend_html.= '<div id="friend-container" class="social-friend-container">';
$friend_html.= '<div id="friend-header">';
if ($number_friends == 1) {
$friend_html.= '<div style="float:left;width:80%">'.$number_friends.' '.get_lang('Friend').'</div>';
} else {
$friend_html.= '<div style="float:left;width:80%">'.$number_friends.' '.get_lang('Friends').'</div>';
}
if ($number_friends > $number_of_images) {
if (api_get_user_id() == $user_id) {
$friend_html.= '<div style="float:right;width:20%"><a href="friends.php">'.get_lang('SeeAll').'</a></div>';
} else {
$friend_html.= '<div style="float:right;width:20%"><a href="'.api_get_path(WEB_CODE_PATH).'social/profile_friends_and_groups.inc.php?view=friends&height=390&width=610&&user_id='.$user_id.'" class="thickbox" title="'.get_lang('SeeAll').'" >'.get_lang('SeeAll').'</a></div>';
}
}
$friend_html.= '</div>'; // close div friend-header
$j=1;
for ($k=0;$k<$number_friends;$k++) {
if ($j > $number_of_images) break;
if (isset($friends[$k])) {
$friend = $friends[$k];
$name_user = api_get_person_name($friend['firstName'], $friend['lastName']);
$user_info_friend = api_get_user_info($friend['friend_user_id'], true);
if ($user_info_friend['user_is_online']) {
$status_icon = Display::div('', array('class' => 'online_user'));
} else {
$status_icon = Display::div('', array('class' => 'offline_user'));
}
$friend_html.= '<div id=div_'.$friend['friend_user_id'].' class="image_friend_network" >';
$friend_html.= $status_icon.'<span><center>';
// the height = 92 must be the sqme in the image_friend_network span style in default.css
$friends_profile = SocialManager::get_picture_user($friend['friend_user_id'], $friend['image'], 92, USER_IMAGE_SIZE_MEDIUM , 'width="85" height="90" ');
$friend_html.= '<a href="profile.php?u='.$friend['friend_user_id'].'&amp;'.$link_shared.'">';
$friend_html.= '<img src="'.$friends_profile['file'].'" '.$friends_profile['style'].' id="imgfriend_'.$friend['friend_user_id'].'" title="'.$name_user.'" />';
$friend_html.= '</center></span>';
$friend_html.= '<center class="friend">'.$name_user.'</a></center>';
$friend_html.= '</div>';
}
$j++;
}
} else {
// No friends!! :(
$friend_html .= '<div><h3>'.get_lang('SocialFriend').'</h3></div>';
$friend_html.= '<div id="friend-container" class="social-friend-container">';
$friend_html.= '<div id="friend-header">';
$friend_html.= '<div>'.get_lang('NoFriendsInYourContactList').'<br /><a class="btn" href="'.api_get_path(WEB_PATH).'whoisonline.php">'.get_lang('TryAndFindSomeFriends').'</a></div>';
$friend_html.= '</div>'; // close div friend-header
}
$friend_html.= '</div>';
$social_right_content .= SocialManager::social_wrapper_div($friend_html, 5);
}
// Extra information
if ($show_full_profile) {
@ -332,86 +398,12 @@ if ($show_full_profile) {
$extra_information .= '</div>'; //social-profile-info
}
// if there are information to show
if (!empty($extra_information_value)) $social_right_content .= $extra_information;
if (!empty($extra_information_value))
$social_right_content .= SocialManager::social_wrapper_div($extra_information, 9);
}
$social_right_content .= '</div>'; // close div tag rounded
if ($show_full_profile) {
$social_right_content .= '<div class="well_border span4">';
$list_path_normal_friends = $list_path_parents = array();
//SOCIALGOODFRIEND , USER_RELATION_TYPE_FRIEND, USER_RELATION_TYPE_PARENT
$friends = SocialManager::get_friends($user_id, USER_RELATION_TYPE_FRIEND);
$friend_html = '';
$number_of_images = 6;
$number_friends = 0;
$number_friends = count($friends);
if ($number_friends != 0) {
$friend_html.= '<div><h3>'.get_lang('SocialFriend').'</h3></div>';
$friend_html.= '<div id="friend-container" class="social-friend-container">';
$friend_html.= '<div id="friend-header">';
if ($number_friends == 1) {
$friend_html.= '<div style="float:left;width:80%">'.$number_friends.' '.get_lang('Friend').'</div>';
} else {
$friend_html.= '<div style="float:left;width:80%">'.$number_friends.' '.get_lang('Friends').'</div>';
}
if ($number_friends > $number_of_images) {
if (api_get_user_id() == $user_id) {
$friend_html.= '<div style="float:right;width:20%"><a href="friends.php">'.get_lang('SeeAll').'</a></div>';
} else {
$friend_html.= '<div style="float:right;width:20%"><a href="'.api_get_path(WEB_CODE_PATH).'social/profile_friends_and_groups.inc.php?view=friends&height=390&width=610&&user_id='.$user_id.'" class="thickbox" title="'.get_lang('SeeAll').'" >'.get_lang('SeeAll').'</a></div>';
}
}
$friend_html.= '</div>'; // close div friend-header
$j=1;
for ($k=0;$k<$number_friends;$k++) {
if ($j > $number_of_images) break;
if (isset($friends[$k])) {
$friend = $friends[$k];
$name_user = api_get_person_name($friend['firstName'], $friend['lastName']);
$user_info_friend = api_get_user_info($friend['friend_user_id'], true);
if ($user_info_friend['user_is_online']) {
$status_icon = Display::div('', array('class' => 'online_user'));
} else {
$status_icon = Display::div('', array('class' => 'offline_user'));
}
$friend_html.= '<div id=div_'.$friend['friend_user_id'].' class="image_friend_network" >';
$friend_html.= $status_icon.'<span><center>';
// the height = 92 must be the sqme in the image_friend_network span style in default.css
$friends_profile = SocialManager::get_picture_user($friend['friend_user_id'], $friend['image'], 92, USER_IMAGE_SIZE_MEDIUM , 'width="85" height="90" ');
$friend_html.= '<a href="profile.php?u='.$friend['friend_user_id'].'&amp;'.$link_shared.'">';
$friend_html.= '<img src="'.$friends_profile['file'].'" '.$friends_profile['style'].' id="imgfriend_'.$friend['friend_user_id'].'" title="'.$name_user.'" />';
$friend_html.= '</center></span>';
$friend_html.= '<center class="friend">'.$name_user.'</a></center>';
$friend_html.= '</div>';
}
$j++;
}
} else {
// No friends!! :(
$friend_html .= '<div><h3>'.get_lang('SocialFriend').'</h3></div>';
$friend_html.= '<div id="friend-container" class="social-friend-container">';
$friend_html.= '<div id="friend-header">';
$friend_html.= '<div style="float:left; padding:0px 8px 0px 8px;">'.get_lang('NoFriendsInYourContactList').'<br /><a href="'.api_get_path(WEB_PATH).'whoisonline.php">'.get_lang('TryAndFindSomeFriends').'</a></div>';
$friend_html.= '</div>'; // close div friend-header
}
$friend_html.= '</div>';
$social_right_content .= $friend_html;
$social_right_content .= '</div>'; // close div tag rounded
}
if ($show_full_profile) {
// MY GROUPS
@ -457,69 +449,68 @@ if ($show_full_profile) {
}
if (count($grid_my_groups) > 0) {
$social_right_content .= '<div class="well_border span8" >';
$count_groups = 0;
if (count($results) == 1 ) {
$count_groups = count($results);
} else {
$count_groups = count($results);
}
$social_right_content .= '<div><h3>'.get_lang('MyGroups').' ('.$count_groups.') </h3></div>';
if ($i > $max_numbers_of_group) {
if (api_get_user_id() == $user_id) {
$social_right_content .= '<div class="box_shared_profile_group_actions"><a href="groups.php?#tab_browse-1">'.get_lang('SeeAllMyGroups').'</a></div>';
} else {
$social_right_content .= '<div class="box_shared_profile_group_actions"><a href="'.api_get_path(WEB_CODE_PATH).'social/profile_friends_and_groups.inc.php?view=mygroups&height=390&width=610&&user_id='.$user_id.'" class="thickbox" title="'.get_lang('SeeAll').'" >'.get_lang('SeeAllMyGroups').'</a></div>';
}
}
//Display::display_sortable_grid('shared_profile_mygroups', array(), $grid_my_groups, array('hide_navigation'=>true, 'per_page' => 2), $query_vars, false, array(true, true, true,false));
$total = count($grid_my_groups);
$i = 1;
foreach($grid_my_groups as $group) {
$social_right_content .= $group[0];
if ($i < $total) {
$social_right_content .= ', ';
}
$i++;
}
$social_right_content .= '<br /><br /></div>'; //close rounded
$my_groups = '';
$count_groups = 0;
if (count($results) == 1 ) {
$count_groups = count($results);
} else {
$count_groups = count($results);
}
$my_groups .= '<div><h3>'.get_lang('MyGroups').' ('.$count_groups.') </h3></div>';
if ($i > $max_numbers_of_group) {
if (api_get_user_id() == $user_id) {
$my_groups .= '<div class="box_shared_profile_group_actions"><a href="groups.php?#tab_browse-1">'.get_lang('SeeAllMyGroups').'</a></div>';
} else {
$my_groups .= '<div class="box_shared_profile_group_actions"><a href="'.api_get_path(WEB_CODE_PATH).'social/profile_friends_and_groups.inc.php?view=mygroups&height=390&width=610&&user_id='.$user_id.'" class="thickbox" title="'.get_lang('SeeAll').'" >'.get_lang('SeeAllMyGroups').'</a></div>';
}
}
//Display::display_sortable_grid('shared_profile_mygroups', array(), $grid_my_groups, array('hide_navigation'=>true, 'per_page' => 2), $query_vars, false, array(true, true, true,false));
$total = count($grid_my_groups);
$i = 1;
foreach($grid_my_groups as $group) {
$my_groups .= $group[0];
if ($i < $total) {
$my_groups .= ', ';
}
$i++;
}
$social_right_content .= SocialManager::social_wrapper_div($my_groups, 9);
}
// COURSES LIST
if ( is_array($list) ) {
$social_right_content .= '<div class="well_border span8">';
$social_right_content .= '<div><h3>'.api_ucfirst(get_lang('MyCourses')).'</h3></div>';
$social_right_content .= '<div class="social-content-training">';
//Courses whithout sessions
$old_user_category = 0;
$i=1;
foreach($list as $key=>$value) {
if ( empty($value[2]) ) { //if out of any session
$social_right_content .= $value[1];
$social_right_content .= '<div id="social_content'.$i.'" class="course_social_content" style="display:none" ></div>';
$i++;
}
}
$listActives = $listInactives = $listCourses = array();
foreach ( $list as $key=>$value ) {
if ( $value['active'] ) { //if the session is still active (as told by get_logged_user_course_html())
$listActives[] = $value;
} elseif ( !empty($value[2]) ) { //if there is a session but it is not active
$listInactives[] = $value;
}
}
$social_right_content .= '</div>'; //social-content-training
$social_right_content .= '</div>'; //close rounded
if ( is_array($list) ) {
$my_courses .= '<div><h3>'.api_ucfirst(get_lang('MyCourses')).'</h3></div>';
$my_courses .= '<div class="social-content-training">';
//Courses without sessions
$i=1;
foreach ($list as $key=>$value) {
if ( empty($value[2]) ) { //if out of any session
$my_courses .= $value[1];
$my_courses .= '<div id="social_content'.$i.'" class="course_social_content" style="display:none" >s</div>';
$i++;
}
}
/*
$listActives = $listInactives = array();
foreach ( $list as $key=>$value ) {
if ( $value['active'] ) { //if the session is still active (as told by get_logged_user_course_html())
$listActives[] = $value;
} elseif ( !empty($value[2]) ) { //if there is a session but it is not active
$listInactives[] = $value;
}
}*/
$my_courses .= '</div>'; //social-content-training
$social_right_content .= SocialManager::social_wrapper_div($my_courses, 9);
}
// user feeds
$user_feeds = SocialManager::get_user_feeds($user_id);
if (!empty($user_feeds)) {
$social_right_content .= '<div class="well_border span8">';
$social_right_content .= '<div><h3>'.get_lang('RSSFeeds').'</h3></div>';
$social_right_content .= '<div class="social-content-training">'.$user_feeds.'</div>';
$social_right_content .= '</div>';
if (!empty($user_feeds)) {
$rss = '<div><h3>'.get_lang('RSSFeeds').'</h3></div>';
$rss .= '<div class="social-content-training">'.$user_feeds.'</div>';
$social_right_content .= SocialManager::social_wrapper_div($rss, 9);
}
//--Productions
@ -531,7 +522,7 @@ if ($show_full_profile) {
foreach ($course_list_code as $course) {
$file_list.= UserManager::get_user_upload_files_by_course($user_id, $course['code'], $resourcetype='images');
}
}
}
$count_pending_invitations = 0;
if (!isset($_GET['u']) || (isset($_GET['u']) && $_GET['u']==api_get_user_id())) {
@ -545,87 +536,77 @@ if ($show_full_profile) {
//Pending invitations
if (!isset($_GET['u']) || (isset($_GET['u']) && $_GET['u']==api_get_user_id())) {
if ($count_pending_invitations > 0) {
$social_right_content .= '<div class="well_border span4">';
$social_right_content .= '<div><h3>'.get_lang('PendingInvitations').'</h3></div>';
if ($count_pending_invitations > 0) {
$invitations .= '<div><h3>'.get_lang('PendingInvitations').'</h3></div>';
for ($i=0;$i<$count_pending_invitations;$i++) {
$user_invitation_id = $pending_invitations[$i]['user_sender_id'];
$social_right_content .= '<div id="dpending_'.$user_invitation_id.'" class="friend_invitations">';
$social_right_content .= '<div style="float:left;width:60px;" >';
$social_right_content .= '<img style="margin-bottom:5px;" src="'.$list_get_path_web[$i]['dir'].'/'.$list_get_path_web[$i]['file'].'" width="60px">';
$social_right_content .= '</div>';
$invitations .= '<div id="dpending_'.$user_invitation_id.'" class="friend_invitations">';
$invitations .= '<div style="float:left;width:60px;" >';
$invitations .= '<img style="margin-bottom:5px;" src="'.$list_get_path_web[$i]['dir'].'/'.$list_get_path_web[$i]['file'].'" width="60px">';
$invitations .= '</div>';
$social_right_content .= '<div style="padding-left:70px;">';
$invitations .= '<div style="padding-left:70px;">';
$user_invitation_info = api_get_user_info($user_invitation_id);
$social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/social/profile.php?u='.$user_invitation_id.'">'.api_get_person_name($user_invitation_info['firstname'], $user_invitation_info['lastname']).'</a>';
$social_right_content .= '<br />';
$social_right_content .= Security::remove_XSS(cut($pending_invitations[$i]['content'], 50), STUDENT, true);
$social_right_content .= '<br />';
$social_right_content .= '<a id="btn_accepted_'.$user_invitation_id.'" class="btn" onclick="register_friend(this)" href="javascript:void(0)">'.get_lang('SocialAddToFriends').'</a>';
$social_right_content .= '<div id="id_response"></div>';
$social_right_content .= '</div>';
$social_right_content .= '</div>';
$invitations .= '<a href="'.api_get_path(WEB_PATH).'main/social/profile.php?u='.$user_invitation_id.'">'.api_get_person_name($user_invitation_info['firstname'], $user_invitation_info['lastname']).'</a>';
$invitations .= '<br />';
$invitations .= Security::remove_XSS(cut($pending_invitations[$i]['content'], 50), STUDENT, true);
$invitations .= '<br />';
$invitations .= '<a id="btn_accepted_'.$user_invitation_id.'" class="btn" onclick="register_friend(this)" href="javascript:void(0)">'.get_lang('SocialAddToFriends').'</a>';
$invitations .= '<div id="id_response"></div>';
$invitations .= '</div>';
$invitations .= '</div>';
}
$social_right_content .= '</div>'; //close rounded
$social_right_content .= SocialManager::social_wrapper_div($invitations, 4);
}
}
}
//--Productions
$production_list = UserManager::build_production_list($user_id);
$product_content = '';
if (!empty($production_list)) {
$product_content .= '<div class="well_border span4">';
if (!empty($production_list)) {
$product_content .= '<div><h3>'.get_lang('MyProductions').'</h3></div>';
$product_content .= $production_list;
$product_content .= '</div>';
$social_right_content .= SocialManager::social_wrapper_div($product_content, 5);
}
// Images uploaded by course
if (!empty($file_list)) {
$product_content .= '<div class="well_border span4">';
$product_content .= '<div><h3>'.get_lang('ImagesUploaded').'</h3></div>';
$product_content .= '<div class="social-content-information">';
$product_content .= $file_list;
$product_content .= '</div>';
$product_content .= '</div>';
}
$social_right_content .= $product_content;
}
$images_uploaded = null;
// Images uploaded by course
if (!empty($file_list)) {
$images_uploaded .= '<div><h3>'.get_lang('ImagesUploaded').'</h3></div>';
$images_uploaded .= '<div class="social-content-information">';
$images_uploaded .= $file_list;
$images_uploaded .= '</div>';
$social_right_content .= SocialManager::social_wrapper_div($images_uploaded, 9);
}
}
if (!empty($user_info['competences']) || !empty($user_info['diplomas']) || !empty($user_info['openarea']) || !empty($user_info['teach']) ) {
$social_right_content .= '<div class="well_border span4">';
$social_right_content .= '<div><h3>'.get_lang('MoreInformation').'</h3></div>';
$more_info .= '<div><h3>'.get_lang('MoreInformation').'</h3></div>';
$cut_size = 220;
if (!empty($user_info['competences'])) {
$social_right_content .= '<br />';
$social_right_content .= '<div class="social-actions-message"><strong>'.get_lang('MyCompetences').'</strong></div>';
$social_right_content .= '<div class="social-profile-extended">'.$user_info['competences'].'</div>';
$social_right_content .= '<br />';
$more_info .= '<br />';
$more_info .= '<div class="social-actions-message"><strong>'.get_lang('MyCompetences').'</strong></div>';
$more_info .= '<div class="social-profile-extended">'.$user_info['competences'].'</div>';
$more_info .= '<br />';
}
if (!empty($user_info['diplomas'])) {
$social_right_content .= '<div class="social-actions-message"><strong>'.get_lang('MyDiplomas').'</strong></div>';
$social_right_content .= '<div class="social-profile-extended">'.$user_info['diplomas'].'</div>';
$social_right_content .= '<br />';
$more_info .= '<div class="social-actions-message"><strong>'.get_lang('MyDiplomas').'</strong></div>';
$more_info .= '<div class="social-profile-extended">'.$user_info['diplomas'].'</div>';
$more_info .= '<br />';
}
if (!empty($user_info['openarea'])) {
$social_right_content .= '<div class="social-actions-message"><strong>'.get_lang('MyPersonalOpenArea').'</strong></div>';
$social_right_content .= '<div class="social-profile-extended">'.$user_info['openarea'].'</div>';
$social_right_content .= '<br />';
if (!empty($user_info['openarea'])) {
$more_info .= '<div class="social-actions-message"><strong>'.get_lang('MyPersonalOpenArea').'</strong></div>';
$more_info .= '<div class="social-profile-extended">'.$user_info['openarea'].'</div>';
$more_info .= '<br />';
}
if (!empty($user_info['teach'])) {
$social_right_content .= '<div class="social-actions-message"><strong>'.get_lang('MyTeach').'</strong></div>';
$social_right_content .= '<div class="social-profile-extended">'.$user_info['teach'].'</div>';
$social_right_content .= '<br />';
}
$social_right_content .= '</div>'; //rounded
$more_info .= '<div class="social-actions-message"><strong>'.get_lang('MyTeach').'</strong></div>';
$more_info .= '<div class="social-profile-extended">'.$user_info['teach'].'</div>';
$more_info .= '<br />';
}
$social_right_content .= SocialManager::social_wrapper_div($more_info, 9);
}
$social_right_content .= '</div>';
}
$tpl = new Template(get_lang('Social'));

@ -62,6 +62,11 @@
{* Right column *}
<div class="span3">
{if !empty($plugin_menu_top)}
<div id="plugin_menu_top">
{$plugin_menu_top}
</div>
{/if}
{*if user is not login show the login form*}
{if $_u.logged == 0}
{include file="default/layout/login_form.tpl"}
@ -92,9 +97,9 @@
{* Plugin courses sidebar *}
{* Plugins for footer section *}
{if !empty($plugin_menu)}
<div id="plugin_menu">
{$plugin_menu}
{if !empty($plugin_menu_bottom)}
<div id="plugin_menu_bottom">
{$plugin_menu_bottom}
</div>
{/if}
</div>

@ -4,14 +4,20 @@
{"Login"|get_lang}
</span>
</div>
{$login_language_form}
{if !empty($plugin_login_top)}
<div id="plugin_login_top">
{$plugin_login_top}
</div>
{/if}
{$login_form}
{$login_failed}
{$login_options}
{if !empty($plugin_login)}
<div id="plugin_login">
{$plugin_login}
{if !empty($plugin_login_bottom)}
<div id="plugin_login_bottom">
{$plugin_login_bottom}
</div>
{/if}
</div>

@ -76,9 +76,9 @@
</div>
{/if}
</header>
{* header 3 - menu *}
{* menu *}
{if $menu}
<div id="header3" class="subnav">
<div class="subnav">
{$menu}
</div>
{/if}

@ -1,4 +1,4 @@
<div class="row-fluid">
<div class="row">
<div class="span3">
{$social_left_content}
{$social_left_menu}

@ -25,7 +25,7 @@ header('Pragma: no-cache');
//protection
api_protect_course_script(true);
$id = $_GET['id'];
$id = intval($_GET['id']);
$course_info = api_get_course_info();
@ -52,7 +52,9 @@ if (!empty($course_info['real_id'])) {
if (Security::check_abs_path($full_file_name, api_get_path(SYS_COURSE_PATH).api_get_course_path().'/')) {
DocumentManager::file_send_for_download($full_file_name, true, $title);
}
}
} else {
api_not_allowed();
}
}
}
exit;

@ -123,7 +123,6 @@ function display_tool_options($uploadvisibledisabled, $origin) {
</div>
</div>';
echo '</form>';
}
/**
@ -904,10 +903,10 @@ function display_student_publications_list($id, $link_target_parameter, $dateFor
if ($is_allowed_to_edit) {
$action = '';
if ($qualification_exists) {
$action .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&id='.$my_folder_data['id'].'&origin='.$origin.'&gradebook='.$gradebook.'&amp;action=mark_work&item_id='.$work->id.'&gradebook='.Security::remove_XSS($_GET['gradebook']).'&amp;parent_id='.$work->parent_id.'" title="'.get_lang('Modify').'" >'.
$action .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&id='.$my_folder_data['id'].'&origin='.$origin.'&gradebook='.$gradebook.'&amp;action=edit&item_id='.$work->id.'&gradebook='.Security::remove_XSS($_GET['gradebook']).'&amp;parent_id='.$work->parent_id.'" title="'.get_lang('Modify').'" >'.
Display::return_icon('rate_work.png', get_lang('CorrectAndRate'),array(), ICON_SIZE_SMALL).'</a>';
} else {
$action .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&id='.$my_folder_data['id'].'&origin='.$origin.'&gradebook='.$gradebook.'&amp;action=mark_work&item_id='.$work->id.'&gradebook='.Security::remove_XSS($_GET['gradebook']).'&amp;parent_id='.$work->parent_id.'" title="'.get_lang('Modify').'" >'.
$action .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&id='.$my_folder_data['id'].'&origin='.$origin.'&gradebook='.$gradebook.'&amp;action=edit&item_id='.$work->id.'&gradebook='.Security::remove_XSS($_GET['gradebook']).'&amp;parent_id='.$work->parent_id.'" title="'.get_lang('Modify').'" >'.
Display::return_icon('edit.png', get_lang('Comment'),array(), ICON_SIZE_SMALL).'</a>';
}
if ($work->contains_file) {
@ -918,7 +917,7 @@ function display_student_publications_list($id, $link_target_parameter, $dateFor
} else {
$action .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&id='.$my_folder_data['id'].'&origin='.$origin.'&gradebook='.$gradebook.'&amp;action=make_visible&item_id='.$work->id.'&amp;'.$sort_params.'" title="'.get_lang('Visible').'" >'.Display::return_icon('invisible.png', get_lang('Visible'),array(), ICON_SIZE_SMALL).'</a> ';
}
$action .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&id='.$my_folder_data['id'].'&origin='.$origin.'&gradebook='.$gradebook.'&amp;delete='.$work->id.'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES))."'".')) return false;" title="'.get_lang('WorkDelete').'" >'.Display::return_icon('delete.png', get_lang('WorkDelete'),'',ICON_SIZE_SMALL).'</a>';
$action .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&id='.$my_folder_data['id'].'&origin='.$origin.'&gradebook='.$gradebook.'&amp;action=delete&amp;item_id='.$work->id.'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES))."'".')) return false;" title="'.get_lang('WorkDelete').'" >'.Display::return_icon('delete.png', get_lang('WorkDelete'),'',ICON_SIZE_SMALL).'</a>';
$row[] = $action;
// the user that is not course admin can only edit/delete own document
} elseif ($is_author && empty($work->qualificator_id)) {
@ -928,12 +927,12 @@ function display_student_publications_list($id, $link_target_parameter, $dateFor
}
$action = '';
if (api_is_allowed_to_session_edit(false, true)) {
$action .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&id='.$my_folder_data['id'].'&gradebook='.Security::remove_XSS($_GET['gradebook']).'&amp;origin='.$origin.'&gradebook='.$gradebook.'&amp;action=mark_work&item_id='.$work->id.'" title="'.get_lang('Modify').'" >'.Display::return_icon('edit.png', get_lang('Modify'),array(), ICON_SIZE_SMALL).'</a>';
$action .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&id='.$my_folder_data['id'].'&gradebook='.Security::remove_XSS($_GET['gradebook']).'&amp;origin='.$origin.'&gradebook='.$gradebook.'&amp;action=edit&item_id='.$work->id.'" title="'.get_lang('Modify').'" >'.Display::return_icon('edit.png', get_lang('Modify'),array(), ICON_SIZE_SMALL).'</a>';
} else {
$action .= Display::return_icon('edit_na.png', get_lang('Modify'),array(), ICON_SIZE_SMALL);
}
if (api_get_course_setting('student_delete_own_publication') == 1) {
$action .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&id='.$my_folder_data['id'].'&origin='.$origin.'&gradebook='.$gradebook.'&delete='.$work->id.'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES))."'".')) return false;" title="'.get_lang('WorkDelete').'" >'.Display::return_icon('delete.png',get_lang('WorkDelete'),'',ICON_SIZE_SMALL).'</a>';
$action .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&id='.$my_folder_data['id'].'&origin='.$origin.'&gradebook='.$gradebook.'&amp;action=delete&amp;item_id='.$work->id.'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES))."'".')) return false;" title="'.get_lang('WorkDelete').'" >'.Display::return_icon('delete.png',get_lang('WorkDelete'),'',ICON_SIZE_SMALL).'</a>';
}
$row[] = $action;
} else {
@ -1838,3 +1837,28 @@ function draw_date_picker($prefix, $default = '') {
function get_date_from_select($prefix) {
return $_POST[$prefix.'_year'].'-'.two_digits($_POST[$prefix.'_month']).'-'.two_digits($_POST[$prefix.'_day']).' '.two_digits($_POST[$prefix.'_hour']).':'.two_digits($_POST[$prefix.'_minute']).':00';
}
/* Check if a user is the author of the item */
function user_is_author($item_id, $user_id = null) {
if (empty($item_id)) {
return false;
}
if (empty($user_id)) {
$user_id = api_get_user_id();
}
$is_author = false;
$item_to_edit_data = api_get_item_property_info(api_get_course_int_id(), 'work', $item_id, api_get_session_id());
$is_allowed_to_edit = api_is_allowed_to_edit();
if ($is_allowed_to_edit) {
$is_author = true;
} else {
if ($item_to_edit_data['insert_user_id'] == $user_id) {
$is_author = true;
}
}
if (!$is_author) {
api_not_allowed();
}
return $is_author;
}

@ -190,7 +190,20 @@ if (!empty($gradebook) && $gradebook == 'view') {
}
if (!empty($group_id)) {
$group_properties = GroupManager :: get_group_properties($group_id);
$group_properties = GroupManager :: get_group_properties($group_id);
$show_work = false;
if (api_is_allowed_to_edit(false, true)) {
$show_work = true;
} else {
// you are not a teacher
$show_work = GroupManager::user_has_access($user_id, $group_id, GROUP_TOOL_WORK);
}
if (!$show_work) {
api_not_allowed();
}
$interbreadcrumb[] = array ('url' => '../group/group.php', 'name' => get_lang('Groups'));
$interbreadcrumb[] = array ('url' => '../group/group_space.php?gidReq='.$group_id, 'name' => get_lang('GroupSpace').' '.$group_properties['name']);
@ -322,14 +335,14 @@ switch ($action) {
case 'mark_work':
if (!api_is_allowed_to_edit()) {
echo Display::return_message(get_lang('ActionNotAllowed'), 'error');
Display::display_footer();
Display::display_footer();
}
break;
case 'edit':
case 'upload_form': //can be add or edit work
$is_author = false;
if (empty($item_id)) {
if (empty($item_id)) {
$parent_data = get_work_data_by_id($work_id);
$parent_data['qualification'] = intval($parent_data['qualification']);
@ -354,16 +367,10 @@ switch ($action) {
$work_item = Database::fetch_array($result);
}
//Get the author ID for that document from the item_property table
$author_sql = "SELECT * FROM $iprop_table
WHERE c_id = $course_id AND tool = 'work' AND insert_user_id = '$user_id' AND ref = " . $item_id;
$author_qry = Database::query($author_sql);
if (Database :: num_rows($author_qry)) {
$is_author = true;
}
}
$form = new FormValidator('form', 'POST', api_get_self() . "?action=upload&id=".$work_id."&curdirpath=" . rtrim(Security :: remove_XSS($curdirpath),'/') . "&gradebook=".Security::remove_XSS($_GET['gradebook'])."&origin=$origin", '', 'enctype="multipart/form-data"');
//Get the author ID for that document from the item_property table
$is_author = user_is_author($item_id);
}
$form = new FormValidator('form', 'POST', api_get_self() . "?action=upload&id=".$work_id."&curdirpath=" . rtrim(Security :: remove_XSS($curdirpath),'/') . "&gradebook=".Security::remove_XSS($_GET['gradebook'])."&origin=$origin", '', array('enctype' => "multipart/form-data"));
// form title
if ($item_id) {
@ -392,10 +399,13 @@ switch ($action) {
$form->addElement('file', 'file', get_lang('UploadADocument'), 'size="40" onchange="updateDocumentTitle(this.value)"');
$show_progress_bar = true;
}
$form->addElement('hidden', 'id', $item_id);
$form->addElement('hidden', 'id', $work_id);
if (empty($item_id)) {
$form->addElement('checkbox', 'contains_file', null, get_lang('ContainsAfile'), array('id'=>'contains_file_id'));
}
} else {
$form->addElement('hidden', 'item_id', $item_id);
}
$form->addElement('text', 'title', get_lang('Title'), 'id="file_upload" style="width: 350px;"');
$form->addElement('textarea', 'description', get_lang("Description"), 'style="width: 350px; height: 60px;"');
@ -463,9 +473,229 @@ switch ($action) {
}
} else {
Display::display_error_message(get_lang('ActionNotAllowed'));
}
break;
}
break;
case 'upload':
$check = Security::check_token('post');
//var_dump($check);
if ($student_can_edit_in_session && $check) {
//check the token inserted into the form
if (isset($_POST['submitWork']) && !empty($is_course_member)) {
$authors = api_get_person_name($currentUserFirstName, $currentUserLastName);
$url = null;
if ($_POST['contains_file'] && !empty($_FILES['file']['size'])) {
$updir = $currentCourseRepositorySys . 'work/'; //directory path to upload
// Try to add an extension to the file if it has'nt one
$new_file_name = add_ext_on_mime(stripslashes($_FILES['file']['name']), $_FILES['file']['type']);
// Replace dangerous characters
$new_file_name = replace_dangerous_char($new_file_name, 'strict');
// Transform any .php file in .phps fo security
$new_file_name = php2phps($new_file_name);
$filesize = filesize($_FILES['file']['tmp_name']);
if (empty($filesize)) {
Display :: display_error_message(get_lang('UplUploadFailedSizeIsZero'));
$succeed = false;
} elseif (!filter_extension($new_file_name)) {
//filter extension
Display :: display_error_message(get_lang('UplUnableToSaveFileFilteredExtension'));
$succeed = false;
}
if (!$title) {
$title = $_FILES['file']['name'];
}
// Compose a unique file name to avoid any conflict
$new_file_name = api_get_unique_id();
//if we come from the group tools the groupid will be saved in $work_table
@move_uploaded_file($_FILES['file']['tmp_name'], $updir.$curdirpath.'/'.$new_file_name);
$url = 'work'.$curdirpath.'/'.$new_file_name;
}
if (empty($title)) {
$title = get_lang('Untitled');
}
$active = '1';
$sql_add_publication = "INSERT INTO " . $work_table . " SET
c_id = $course_id ,
url = '" . $url . "',
title = '" . Database::escape_string($title) . "',
description = '" . Database::escape_string($description) . "',
author = '" . Database::escape_string($authors) . "',
contains_file = '".intval($_POST['contains_file'])."',
active = '" . $active . "',
accepted = '1',
post_group_id = '".$group_id."',
sent_date = '".api_get_utc_datetime()."',
parent_id = '".$work_id."' ,
session_id = '".intval($id_session)."' ,
user_id = '".$user_id."'";
//var_dump($sql_add_publication);
Database::query($sql_add_publication);
$id = Database::insert_id();
if ($id) {
api_item_property_update($course_info, 'work', $id, 'DocumentAdded', $user_id, api_get_group_id());
$succeed = true;
}
} elseif ($newWorkUrl) {
// SPECIAL CASE ! For a work coming from another area (i.e. groups)
/*
$url = str_replace('../../' . $_course['path'] . '/', '', $newWorkUrl);
if (!$title) {
$title = basename($workUrl);
}
$sql = "INSERT INTO " . $work_table . " SET
c_id = $course_id,
url = '" . $url . "',
title = '" . Database::escape_string($title) . "',
description = '" . Database::escape_string($description) . "',
author = '" . Database::escape_string($authors) . "',
post_group_id = '".$group_id."',
sent_date = '".api_get_utc_datetime()."',
session_id = '".intval($id_session)."',
user_id = '".$user_id."'";
Database::query($sql);
$insertId = Database::insert_id();
api_item_property_update($_course, 'work', $insertId, 'DocumentAdded', $user_id, $group_id);
$succeed = true;*/
} elseif (isset($_POST['editWork'])) {
/*
* SPECIAL CASE ! For a work edited
*/
//Get the author ID for that document from the item_property table
$item_to_edit_id = intval($_POST['item_to_edit']);
$is_author = user_is_author($item_to_edit_id);
if ($is_author) {
$work_data = get_work_data_by_id($item_to_edit_id);
if (!empty($_POST['title']))
$title = isset($_POST['title']) ? $_POST['title'] : $work_data['title'];
$description = isset($_POST['description']) ? $_POST['description'] : $work_data['description'];
if ($is_allowed_to_edit && ($_POST['qualification'] !='' )) {
$add_to_update = ', qualificator_id ='."'".api_get_user_id()."',";
$add_to_update .= ' qualification ='."'".Database::escape_string($_POST['qualification'])."',";
$add_to_update .= ' date_of_qualification ='."'".api_get_utc_datetime()."'";
}
if ((int)$_POST['qualification'] > (int)$_POST['qualification_over']) {
Display::display_error_message(get_lang('QualificationMustNotBeMoreThanQualificationOver'));
} else {
$sql = "UPDATE " . $work_table . "
SET title = '" . Database::escape_string($title) . "',
description = '" . Database::escape_string($description) . "'
".$add_to_update."
WHERE c_id = $course_id AND id = $item_to_edit_id";
Database::query($sql);
}
api_item_property_update($_course, 'work', $item_to_edit_id, 'DocumentUpdated', $user_id);
$succeed = true;
Display :: display_confirmation_message(get_lang('ItemUpdated'), false);
} else {
$error_message = get_lang('IsNotPosibleSaveTheDocument');
}
}
Security::clear_token();
}
if (!empty($succeed) && !empty($id)) {
//last value is to check this is not "just" an edit
//YW Tis part serve to send a e-mail to the tutors when a new file is sent
$send = api_get_course_setting('email_alert_manager_on_new_doc');
if ($send > 0) {
// Lets predefine some variables. Be sure to change the from address!
$emailto = array ();
if (empty($id_session)) {
$sql_resp = 'SELECT u.email as myemail FROM ' . $table_course_user . ' cu, ' . $table_user . ' u
WHERE cu.course_code = ' . "'" . api_get_course_id() . "'" . ' AND cu.status = 1 AND u.user_id = cu.user_id';
$res_resp = Database::query($sql_resp);
while ($row_email = Database :: fetch_array($res_resp)) {
if (!empty ($row_email['myemail'])) {
$emailto[$row_email['myemail']] = $row_email['myemail'];
}
}
} else {
// coachs of the session
$sql_resp = 'SELECT user.email as myemail
FROM ' . $table_session . ' session INNER JOIN ' . $table_user . ' user
ON user.user_id = session.id_coach
WHERE session.id = ' . intval($id_session);
$res_resp = Database::query($sql_resp);
while ($row_email = Database :: fetch_array($res_resp)) {
if (!empty ($row_email['myemail'])) {
$emailto[$row_email['myemail']] = $row_email['myemail'];
}
}
//coach of the course
$sql_resp = 'SELECT user.email as myemail
FROM ' . $table_session_course_user . ' scu
INNER JOIN ' . $table_user . ' user
ON user.user_id = scu.id_user AND scu.status=2
WHERE scu.id_session = ' . intval($id_session);
$res_resp = Database::query($sql_resp);
while ($row_email = Database :: fetch_array($res_resp)) {
if (!empty ($row_email['myemail'])) {
$emailto[$row_email['myemail']] = $row_email['myemail'];
}
}
}
if (count($emailto) > 0) {
$emailto = implode(',', $emailto);
$emailsubject = "[" . api_get_setting('siteName') . "] ";
$sender_name = api_get_setting('administratorName').' '.api_get_setting('administratorSurname');
$email_admin = api_get_setting('emailAdministrator');
// The body can be as long as you wish, and any combination of text and variables
$emailbody = get_lang('SendMailBody')."\n".get_lang('CourseName')." : ".$_course['name']."\n";
$emailbody .= get_lang('WorkName')." : ".substr($my_cur_dir_path, 0, -1)."\n";
$emailbody .= get_lang('UserName')." : ".$currentUserFirstName .' '.$currentUserLastName ."\n";
$emailbody .= get_lang('DateSent')." : ".api_format_date(api_get_local_time())."\n";
$emailbody .= get_lang('FileName')." : ".$title."\n\n".get_lang('DownloadLink')."\n";
$emailbody .= api_get_path(WEB_CODE_PATH)."work/work.php?".api_get_cidreq()."&amp;curdirpath=".$my_cur_dir_path."\n\n" . api_get_setting('administratorName') . " " . api_get_setting('administratorSurname') . "\n" . get_lang('Manager') . " " . api_get_setting('siteName') . "\n" . get_lang('Email') . " : " . api_get_setting('emailAdministrator');
// Here we are forming one large header line
// Every header must be followed by a \n except the last
@api_mail('', $emailto, $emailsubject, $emailbody, $sender_name,$email_admin);
$emailbody_user = get_lang('Dear')." ".$currentUserFirstName .' '.$currentUserLastName .", \n\n";
$emailbody_user .= get_lang('MessageConfirmSendingOfTask')."\n".get_lang('CourseName')." : ".$_course['name']."\n";
$emailbody_user .= get_lang('WorkName')." : ".substr($my_cur_dir_path, 0, -1)."\n";
$emailbody_user .= get_lang('DateSent')." : ".api_format_date(api_get_local_time())."\n";
$emailbody_user .= get_lang('FileName')." : ".$title."\n\n".api_get_setting('administratorName')." ".api_get_setting('administratorSurname') . "\n" . get_lang('Manager') . " " . api_get_setting('siteName') . "\n" . get_lang('Email') . " : " . api_get_setting('emailAdministrator');;
//Mail to user
var_dump($currentUserEmail, $emailsubject, $emailbody_user, $sender_name, $email_admin);
@api_mail('', $currentUserEmail, $emailsubject, $emailbody_user, $sender_name, $email_admin);
}
}
$message = get_lang('DocAdd');
//stats
if (!$Id) {
$Id = $insertId;
}
event_upload($Id);
$submit_success_message = $message . "<br />";
Display :: display_confirmation_message($submit_success_message, false);
}
break;
case 'send_mail':
if (Security::check_token('get')) {
$mails_sent_to = send_reminder_users_without_publication($my_folder_data);
@ -506,7 +736,8 @@ switch ($action) {
}
/* Display of tool options */
display_tool_options($uploadvisibledisabled, $origin);
break;
break;
case 'create_dir':
case 'add':
//$check = Security::check_token('post');
@ -693,242 +924,15 @@ switch ($action) {
}
} else {
$form->display();
}
case 'upload':
if ($student_can_edit_in_session && isset($_POST['sec_token']) && Security::check_token('post')) {
//check the token inserted into the form
if (isset($_POST['submitWork']) && !empty($is_course_member)) {
$authors = api_get_person_name($currentUserFirstName, $currentUserLastName);
$url = null;
if ($_POST['contains_file'] && !empty($_FILES['file']['size'])) {
$updir = $currentCourseRepositorySys . 'work/'; //directory path to upload
// Try to add an extension to the file if it has'nt one
$new_file_name = add_ext_on_mime(stripslashes($_FILES['file']['name']), $_FILES['file']['type']);
// Replace dangerous characters
$new_file_name = replace_dangerous_char($new_file_name, 'strict');
// Transform any .php file in .phps fo security
$new_file_name = php2phps($new_file_name);
$filesize = filesize($_FILES['file']['tmp_name']);
if (empty($filesize)) {
Display :: display_error_message(get_lang('UplUploadFailedSizeIsZero'));
$succeed = false;
} elseif (!filter_extension($new_file_name)) {
//filter extension
Display :: display_error_message(get_lang('UplUnableToSaveFileFilteredExtension'));
$succeed = false;
}
if (!$title) {
$title = $_FILES['file']['name'];
}
// Compose a unique file name to avoid any conflict
$new_file_name = api_get_unique_id();
//if we come from the group tools the groupid will be saved in $work_table
@move_uploaded_file($_FILES['file']['tmp_name'], $updir.$curdirpath.'/'.$new_file_name);
$url = 'work'.$curdirpath.'/'.$new_file_name;
}
if (empty($title)) {
$title = get_lang('Untitled');
}
$active = '1';
$sql_add_publication = "INSERT INTO " . $work_table . " SET
c_id = $course_id ,
url = '" . $url . "',
title = '" . Database::escape_string($title) . "',
description = '" . Database::escape_string($description) . "',
author = '" . Database::escape_string($authors) . "',
contains_file = '".intval($_POST['contains_file'])."',
active = '" . $active . "',
accepted = '1',
post_group_id = '".$group_id."',
sent_date = '".api_get_utc_datetime()."',
parent_id = '".$work_id."' ,
session_id = '".intval($id_session)."' ,
user_id = '".$user_id."'";
//var_dump($sql_add_publication);
Database::query($sql_add_publication);
$id = Database::insert_id();
if ($id) {
api_item_property_update($course_info, 'work', $id, 'DocumentAdded', $user_id, api_get_group_id());
$succeed = true;
}
} elseif ($newWorkUrl) {
// SPECIAL CASE ! For a work coming from another area (i.e. groups)
$url = str_replace('../../' . $_course['path'] . '/', '', $newWorkUrl);
if (!$title) {
$title = basename($workUrl);
}
$sql = "INSERT INTO " . $work_table . " SET
c_id = $course_id,
url = '" . $url . "',
title = '" . Database::escape_string($title) . "',
description = '" . Database::escape_string($description) . "',
author = '" . Database::escape_string($authors) . "',
post_group_id = '".$group_id."',
sent_date = '".api_get_utc_datetime()."',
session_id = '".intval($id_session)."',
user_id = '".$user_id."'";
Database::query($sql);
$insertId = Database::insert_id();
api_item_property_update($_course, 'work', $insertId, 'DocumentAdded', $user_id, $group_id);
$succeed = true;
} elseif (isset($_POST['editWork'])) {
/*
* SPECIAL CASE ! For a work edited
*/
//Get the author ID for that document from the item_property table
$is_author = false;
$item_to_edit_id = intval($_POST['item_to_edit']);
$item_to_edit_data = api_get_item_property_info(api_get_course_int_id(), 'work', $item_to_edit_id);
if ($is_allowed_to_edit) {
$is_author = true;
} else {
if ($item_to_edit_data['insert_user_id'] == api_get_user_id()) {
$is_author = true;
}
}
if ($is_author) {
$work_data = get_work_data_by_id($item_to_edit_id);
if (!empty($_POST['title']))
$title = isset($_POST['title']) ? $_POST['title'] : $work_data['title'];
$description = isset($_POST['description']) ? $_POST['description'] : $work_data['description'];
if ($is_allowed_to_edit && ($_POST['qualification'] !='' )) {
$add_to_update = ', qualificator_id ='."'".api_get_user_id()."',";
$add_to_update .= ' qualification ='."'".Database::escape_string($_POST['qualification'])."',";
$add_to_update .= ' date_of_qualification ='."'".api_get_utc_datetime()."'";
}
if ((int)$_POST['qualification'] > (int)$_POST['qualification_over']) {
Display::display_error_message(get_lang('QualificationMustNotBeMoreThanQualificationOver'));
} else {
$sql = "UPDATE " . $work_table . "
SET title = '" . Database::escape_string($title) . "',
description = '" . Database::escape_string($description) . "'
".$add_to_update."
WHERE c_id = $course_id AND id = $item_to_edit_id";
Database::query($sql);
}
api_item_property_update($_course, 'work', $item_to_edit_id, 'DocumentUpdated', $user_id);
$succeed = true;
} else {
$error_message = get_lang('IsNotPosibleSaveTheDocument');
}
}
}
if (!empty($_POST['submitWork']) && !empty($succeed) && !$id) {
//last value is to check this is not "just" an edit
//YW Tis part serve to send a e-mail to the tutors when a new file is sent
$send = api_get_course_setting('email_alert_manager_on_new_doc');
if ($send > 0) {
// Lets predefine some variables. Be sure to change the from address!
$emailto = array ();
if (empty ($id_session)) {
$sql_resp = 'SELECT u.email as myemail FROM ' . $table_course_user . ' cu, ' . $table_user . ' u
WHERE cu.course_code = ' . "'" . api_get_course_id() . "'" . ' AND cu.status = 1 AND u.user_id = cu.user_id';
$res_resp = Database::query($sql_resp);
while ($row_email = Database :: fetch_array($res_resp)) {
if (!empty ($row_email['myemail'])) {
$emailto[$row_email['myemail']] = $row_email['myemail'];
}
}
} else {
// coachs of the session
$sql_resp = 'SELECT user.email as myemail
FROM ' . $table_session . ' session INNER JOIN ' . $table_user . ' user
ON user.user_id = session.id_coach
WHERE session.id = ' . intval($id_session);
$res_resp = Database::query($sql_resp);
while ($row_email = Database :: fetch_array($res_resp)) {
if (!empty ($row_email['myemail'])) {
$emailto[$row_email['myemail']] = $row_email['myemail'];
}
}
//coach of the course
$sql_resp = 'SELECT user.email as myemail
FROM ' . $table_session_course_user . ' scu
INNER JOIN ' . $table_user . ' user
ON user.user_id = scu.id_user AND scu.status=2
WHERE scu.id_session = ' . intval($id_session);
$res_resp = Database::query($sql_resp);
while ($row_email = Database :: fetch_array($res_resp)) {
if (!empty ($row_email['myemail'])) {
$emailto[$row_email['myemail']] = $row_email['myemail'];
}
}
}
if (count($emailto) > 0) {
$emailto = implode(',', $emailto);
$emailsubject = "[" . api_get_setting('siteName') . "] ";
$sender_name = api_get_setting('administratorName').' '.api_get_setting('administratorSurname');
$email_admin = api_get_setting('emailAdministrator');
// The body can be as long as you wish, and any combination of text and variables
$emailbody = get_lang('SendMailBody')."\n".get_lang('CourseName')." : ".$_course['name']."\n";
$emailbody .= get_lang('WorkName')." : ".substr($my_cur_dir_path, 0, -1)."\n";
$emailbody .= get_lang('UserName')." : ".$currentUserFirstName .' '.$currentUserLastName ."\n";
$emailbody .= get_lang('DateSent')." : ".api_format_date(api_get_local_time())."\n";
$emailbody .= get_lang('FileName')." : ".$title."\n\n".get_lang('DownloadLink')."\n";
$emailbody .= api_get_path(WEB_CODE_PATH)."work/work.php?".api_get_cidreq()."&amp;curdirpath=".$my_cur_dir_path."\n\n" . api_get_setting('administratorName') . " " . api_get_setting('administratorSurname') . "\n" . get_lang('Manager') . " " . api_get_setting('siteName') . "\n" . get_lang('Email') . " : " . api_get_setting('emailAdministrator');
// Here we are forming one large header line
// Every header must be followed by a \n except the last
@api_mail('', $emailto, $emailsubject, $emailbody, $sender_name,$email_admin);
$emailbody_user = get_lang('Dear')." ".$currentUserFirstName .' '.$currentUserLastName .", \n\n";
$emailbody_user .= get_lang('MessageConfirmSendingOfTask')."\n".get_lang('CourseName')." : ".$_course['name']."\n";
$emailbody_user .= get_lang('WorkName')." : ".substr($my_cur_dir_path, 0, -1)."\n";
$emailbody_user .= get_lang('DateSent')." : ".api_format_date(api_get_local_time())."\n";
$emailbody_user .= get_lang('FileName')." : ".$title."\n\n".api_get_setting('administratorName')." ".api_get_setting('administratorSurname') . "\n" . get_lang('Manager') . " " . api_get_setting('siteName') . "\n" . get_lang('Email') . " : " . api_get_setting('emailAdministrator');;
//Mail to user
@api_mail('', $currentUserEmail, $emailsubject, $emailbody_user, $sender_name,$email_admin);
}
}
$message = get_lang('DocAdd');
//stats
if (!$Id) {
$Id = $insertId;
}
event_upload($Id);
$submit_success_message = $message . "<br />";
Display :: display_confirmation_message($submit_success_message, false);
}
}
case 'make_visible':
case 'make_invisible':
case 'mark_work':
case 'delete':
case 'make_invisible':
case 'move':
case 'move_to':
case 'list':
if ($action == 'mark_work') {
}
case 'list':
/* Move file command */
if ($is_allowed_to_edit && $action == 'move_to') {
if ($is_allowed_to_edit && $action == 'move_to') {
$move_to_path = get_work_path($_REQUEST['move_to_id']);
if ($move_to_path==-1) {
@ -962,7 +966,7 @@ switch ($action) {
}
/* Move file form request */
if ($is_allowed_to_edit && $action == 'move') {
if ($is_allowed_to_edit && $action == 'move') {
if (!empty($item_id)) {
$folders = array();
$session_id = api_get_session_id();
@ -1021,7 +1025,7 @@ switch ($action) {
/* Delete dir command */
if ($is_allowed_to_edit && !empty($_REQUEST['delete_dir'])) {
if ($is_allowed_to_edit && !empty($_REQUEST['delete_dir'])) {
del_dir($_REQUEST['delete_dir']);
@ -1049,109 +1053,52 @@ switch ($action) {
/* DELETE WORK COMMAND */
if ($is_allowed_to_edit && $delete) {
if ($delete == 'all') {
//we can't delete all documents
if ($action == 'delete' && $item_id) {
$file_deleted = false;
$is_author = user_is_author($item_id);
/*
$path = $currentCourseRepositorySys;
$t_agenda = Database::get_course_table(TABLE_AGENDA);
$sql = "SELECT id, url, filetype FROM ".$work_table." WHERE c_id = $course_id AND session_id = ".api_get_session_id().' ORDER BY url DESC'; // do not change the "order by", otherwise the work assignments will not be renamed
$result = Database::query($sql);
while($row = Database::fetch_array($result)) {
$url = $row['url'];
//Deleting works
$delete_query = "DELETE FROM ".$work_table." WHERE c_id = $course_id AND id = ".$row['id'];
Database::query($delete_query);
//Deleting agenda calendar for that work assignment
$sql_agenda = "SELECT add_to_calendar FROM ".$TSTDPUBASG." WHERE c_id = $course_id AND publication_id = ".$row['id'];
$rs_agenda = Database::query($sql_agenda);
while ($row_agenda = Database::fetch_array($rs_agenda)) {
if (!empty($row_agenda['add_to_calendar'])) {
$delete_agenda = "DELETE FROM ".$t_agenda." WHERE c_id = $course_id AND id = ".$row_agenda['add_to_calendar'];
Database::query($delete_agenda);
}
}
//Deleting the work assignment
$delete_query = "DELETE FROM ".$TSTDPUBASG. " WHERE c_id = $course_id AND publication_id = ".$row['id'];
Database::query($delete_query);
if ($row['filetype'] == 'folder') {
$url = 'work'.$url;
}
if (api_get_setting('permanently_remove_deleted_files') == 'true') {
if (file_exists($path.$url)) {
rmdirr($path.$url);
}
} else {
if ($row['filetype'] == 'folder') {
$new_file = $path.'work/DELETED_'.basename($url);
} else {
$new_file = $path.dirname($url).'/DELETED_'.basename($url);
}
if (file_exists($path.$url)) {
rename($path.$url, $new_file);
}
}
}*/
} else {
$file_deleted = false;
//Get the author ID for that document from the item_property table
$author_sql = "SELECT * FROM $iprop_table WHERE c_id = $course_id AND tool = 'work' AND insert_user_id='$user_id' AND ref=" .Database::escape_string($delete);
$author_qry = Database::query($author_sql);
if ((Database :: num_rows($author_qry) == 1 AND api_get_course_setting('student_delete_own_publication') == 1) || api_is_allowed_to_edit(null,true)) {
//we found the current user is the author
$queryString1 = "SELECT url, contains_file FROM " . $work_table . " WHERE c_id = $course_id AND id = $delete";
$result1 = Database::query($queryString1);
$row = Database::fetch_array($result1);
if (Database::num_rows($result1) > 0) {
$queryString2 = "UPDATE " . $work_table . " SET active = 2 WHERE c_id = $course_id AND id = $delete";
$queryString3 = "DELETE FROM " . $TSTDPUBASG . " WHERE c_id = $course_id AND publication_id = $delete";
$result2 = Database::query($queryString2);
$result3 = Database::query($queryString3);
api_item_property_update($_course, 'work', $delete, 'DocumentDeleted', $user_id);
$work = $row['url'];
if ($row['contains_file'] == 1) {
if (!empty($work)) {
if (api_get_setting('permanently_remove_deleted_files') == 'true') {
my_delete($currentCourseRepositorySys.'/'.$work);
Display::display_confirmation_message(get_lang('TheDocumentHasBeenDeleted'));
$file_deleted = true;
} else {
require_once api_get_path(LIBRARY_PATH).'fileManage.lib.php';
$extension = pathinfo($work, PATHINFO_EXTENSION);
$basename_file = basename($work, '.'.$extension);
$new_dir = $work.'_DELETED_'.$delete.'.'.$extension;
if (file_exists($currentCourseRepositorySys.'/'.$work)) {
rename($currentCourseRepositorySys.'/'.$work, $currentCourseRepositorySys.'/'.$new_dir);
Display::display_confirmation_message(get_lang('TheDocumentHasBeenDeleted'));
$file_deleted = true;
}
}
}
} else {
$file_deleted = true;
}
}
if (!$file_deleted) {
Display::display_error_message(get_lang('YouAreNotAllowedToDeleteThisDocument'));
}
} else {
Display::display_error_message(get_lang('YouAreNotAllowedToDeleteThisDocument'));
}
}
if (($is_author AND api_get_course_setting('student_delete_own_publication') == 1)) {
//we found the current user is the author
$queryString1 = "SELECT url, contains_file FROM " . $work_table . " WHERE c_id = $course_id AND id = $item_id";
$result1 = Database::query($queryString1);
$row = Database::fetch_array($result1);
if (Database::num_rows($result1) > 0) {
$queryString2 = "UPDATE " . $work_table . " SET active = 2 WHERE c_id = $course_id AND id = $item_id";
$queryString3 = "DELETE FROM " . $TSTDPUBASG . " WHERE c_id = $course_id AND publication_id = $item_id";
$result2 = Database::query($queryString2);
$result3 = Database::query($queryString3);
api_item_property_update($_course, 'work', $item_id, 'DocumentDeleted', $user_id);
$work = $row['url'];
if ($row['contains_file'] == 1) {
if (!empty($work)) {
if (api_get_setting('permanently_remove_deleted_files') == 'true') {
my_delete($currentCourseRepositorySys.'/'.$work);
Display::display_confirmation_message(get_lang('TheDocumentHasBeenDeleted'));
$file_deleted = true;
} else {
require_once api_get_path(LIBRARY_PATH).'fileManage.lib.php';
$extension = pathinfo($work, PATHINFO_EXTENSION);
//$basename_file = basename($work, '.'.$extension);
$new_dir = $work.'_DELETED_'.$item_id.'.'.$extension;
if (file_exists($currentCourseRepositorySys.'/'.$work)) {
rename($currentCourseRepositorySys.'/'.$work, $currentCourseRepositorySys.'/'.$new_dir);
Display::display_confirmation_message(get_lang('TheDocumentHasBeenDeleted'));
$file_deleted = true;
}
}
}
} else {
$file_deleted = true;
}
}
}
if (!$file_deleted) {
Display::display_error_message(get_lang('YouAreNotAllowedToDeleteThisDocument'));
}
}
/* Display list of student publications */

@ -18,7 +18,7 @@ $sql = "DELETE FROM $t_settings WHERE variable = 'bbb_plugin_host'";
Database::query($sql);
$sql = "DELETE FROM $t_settings WHERE variable = 'bbb_plugin_salt'";
Database::query($sql);
$sql = "DROP TABLE plugin_bbb";
$sql = "DROP TABLE IF EXISTS plugin_bbb";
Database::query($sql);
// update existing courses to add conference settings
$t_courses = Database::get_main_table(TABLE_MAIN_COURSE);

Loading…
Cancel
Save