diff --git a/app/Resources/public/css/base.css b/app/Resources/public/css/base.css
index 5057eac276..69a286daea 100644
--- a/app/Resources/public/css/base.css
+++ b/app/Resources/public/css/base.css
@@ -235,22 +235,24 @@ header {
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=80);
}
.notification-panel .help a {
- background-color:#879DAA;
- border:1px solid #FFFFFF;
- display:block;
- margin-left:50px;
- opacity:0.6;
- width:65px;
- padding: 6px 0 8px 6px;
+ background-color:#879DAA;
+ border:1px solid #FFFFFF;
+ display:block;
+ margin-left:50px;
+ opacity:0.8;
+ width:65px;
+ padding: 6px 0 8px 6px;
+ border-radius: 10px 0 0 10px;
}
.notification-panel .report a {
- background-color:#8fd400;
- border:1px solid #FFFFFF;
- display:block;
- margin-left:50px;
- opacity:0.6;
- width:65px;
- padding: 6px 0 8px 6px;
+ background-color:#8fd400;
+ border:1px solid #FFFFFF;
+ display:block;
+ margin-left:50px;
+ opacity:0.8;
+ width:65px;
+ padding: 6px 0 8px 6px;
+ border-radius: 10px 0 0 10px;
}
.cookieUsageValidation {
padding: 5px;
diff --git a/app/Resources/public/css/themes/rainbow/default.css b/app/Resources/public/css/themes/rainbow/default.css
index 5f3349410a..99ba96cd13 100755
--- a/app/Resources/public/css/themes/rainbow/default.css
+++ b/app/Resources/public/css/themes/rainbow/default.css
@@ -2059,4 +2059,21 @@ blockquote p {
.skills_chart > ul > li > ul > li > a {
width: 8em;
}
-
+.communications #skillList .thumbnail{
+ border: none;
+}
+.communications #skillList .table-bordered tbody tr td{
+ border: 1px solid #84bd00;
+}
+.table thead tr th.achieved{
+ vertical-align: bottom;
+ border-bottom: 2px solid #84bd00;
+}
+.table-header{
+ color: #333;
+ padding: 8px;
+ line-height: 1.428;
+ border-bottom: 2px solid #84bd00;
+ font-size: 13px;
+ font-weight: bold;
+}
\ No newline at end of file
diff --git a/app/bootstrap.php.cache b/app/bootstrap.php.cache
index c968f55da0..300520e6d9 100644
--- a/app/bootstrap.php.cache
+++ b/app/bootstrap.php.cache
@@ -205,7 +205,7 @@ $this->headers[$key] = $values;
$this->headers[$key] = array_merge($this->headers[$key], $values);
}
if ('cache-control'=== $key) {
-$this->cacheControl = $this->parseCacheControl($values[0]);
+$this->cacheControl = $this->parseCacheControl(implode(', ', $this->headers[$key]));
}
}
public function has($key)
@@ -332,6 +332,9 @@ $file = new UploadedFile($file['tmp_name'], $file['name'], $file['type'], $file[
}
} else {
$file = array_map(array($this,'convertFileInformation'), $file);
+if (array_keys($keys) === $keys) {
+$file = array_filter($file);
+}
}
}
return $file;
@@ -387,7 +390,7 @@ $authorizationHeader = $this->parameters['REDIRECT_HTTP_AUTHORIZATION'];
if (null !== $authorizationHeader) {
if (0 === stripos($authorizationHeader,'basic ')) {
$exploded = explode(':', base64_decode(substr($authorizationHeader, 6)), 2);
-if (count($exploded) == 2) {
+if (2 == count($exploded)) {
list($headers['PHP_AUTH_USER'], $headers['PHP_AUTH_PW']) = $exploded;
}
} elseif (empty($this->parameters['PHP_AUTH_DIGEST']) && (0 === stripos($authorizationHeader,'digest '))) {
@@ -590,22 +593,22 @@ self::$requestFactory = $callable;
public function duplicate(array $query = null, array $request = null, array $attributes = null, array $cookies = null, array $files = null, array $server = null)
{
$dup = clone $this;
-if ($query !== null) {
+if (null !== $query) {
$dup->query = new ParameterBag($query);
}
-if ($request !== null) {
+if (null !== $request) {
$dup->request = new ParameterBag($request);
}
-if ($attributes !== null) {
+if (null !== $attributes) {
$dup->attributes = new ParameterBag($attributes);
}
-if ($cookies !== null) {
+if (null !== $cookies) {
$dup->cookies = new ParameterBag($cookies);
}
-if ($files !== null) {
+if (null !== $files) {
$dup->files = new FileBag($files);
}
-if ($server !== null) {
+if (null !== $server) {
$dup->server = new ServerBag($server);
$dup->headers = new HeaderBag($dup->server->getHeaders());
}
@@ -816,7 +819,7 @@ $host = $host[0];
} elseif (!$host = $this->headers->get('HOST')) {
return $this->server->get('SERVER_PORT');
}
-if ($host[0] ==='[') {
+if ('['=== $host[0]) {
$pos = strpos($host,':', strrpos($host,']'));
} else {
$pos = strrpos($host,':');
@@ -847,7 +850,7 @@ public function getHttpHost()
{
$scheme = $this->getScheme();
$port = $this->getPort();
-if (('http'== $scheme && $port == 80) || ('https'== $scheme && $port == 443)) {
+if (('http'== $scheme && 80 == $port) || ('https'== $scheme && 443 == $port)) {
return $this->getHost();
}
return $this->getHost().':'.$port;
@@ -1043,7 +1046,7 @@ return in_array($this->getMethod(), array('GET','HEAD'));
public function getContent($asResource = false)
{
$currentContentIsResource = is_resource($this->content);
-if (PHP_VERSION_ID < 50600 && false === $this->content) {
+if (\PHP_VERSION_ID < 50600 && false === $this->content) {
throw new \LogicException('getContent() can only be called once when using the resource return type and PHP below 5.6.');
}
if (true === $asResource) {
@@ -1115,7 +1118,7 @@ $lang = $codes[1];
}
} else {
for ($i = 0, $max = count($codes); $i < $max; ++$i) {
-if ($i === 0) {
+if (0 === $i) {
$lang = strtolower($codes[0]);
} else {
$lang .='_'.strtoupper($codes[$i]);
@@ -1164,14 +1167,14 @@ $this->server->remove('IIS_WasUrlRewritten');
} elseif ($this->headers->has('X_REWRITE_URL')) {
$requestUri = $this->headers->get('X_REWRITE_URL');
$this->headers->remove('X_REWRITE_URL');
-} elseif ($this->server->get('IIS_WasUrlRewritten') =='1'&& $this->server->get('UNENCODED_URL') !='') {
+} elseif ('1'== $this->server->get('IIS_WasUrlRewritten') &&''!= $this->server->get('UNENCODED_URL')) {
$requestUri = $this->server->get('UNENCODED_URL');
$this->server->remove('UNENCODED_URL');
$this->server->remove('IIS_WasUrlRewritten');
} elseif ($this->server->has('REQUEST_URI')) {
$requestUri = $this->server->get('REQUEST_URI');
$schemeAndHttpHost = $this->getSchemeAndHttpHost();
-if (strpos($requestUri, $schemeAndHttpHost) === 0) {
+if (0 === strpos($requestUri, $schemeAndHttpHost)) {
$requestUri = substr($requestUri, strlen($schemeAndHttpHost));
}
} elseif ($this->server->has('ORIG_PATH_INFO')) {
@@ -1207,7 +1210,7 @@ $baseUrl ='/'.$seg.$baseUrl;
} while ($last > $index && (false !== $pos = strpos($path, $baseUrl)) && 0 != $pos);
}
$requestUri = $this->getRequestUri();
-if ($requestUri !==''&& $requestUri[0] !=='/') {
+if (''!== $requestUri &&'/'!== $requestUri[0]) {
$requestUri ='/'.$requestUri;
}
if ($baseUrl && false !== $prefix = $this->getUrlencodedPrefix($requestUri, $baseUrl)) {
@@ -1224,7 +1227,7 @@ $basename = basename($baseUrl);
if (empty($basename) || !strpos(rawurldecode($truncatedRequestUri), $basename)) {
return'';
}
-if (strlen($requestUri) >= strlen($baseUrl) && (false !== $pos = strpos($requestUri, $baseUrl)) && $pos !== 0) {
+if (strlen($requestUri) >= strlen($baseUrl) && (false !== $pos = strpos($requestUri, $baseUrl)) && 0 !== $pos) {
$baseUrl = substr($requestUri, 0, $pos + strlen($baseUrl));
}
return rtrim($baseUrl,'/'.DIRECTORY_SEPARATOR);
@@ -1255,7 +1258,7 @@ return'/';
if (false !== $pos = strpos($requestUri,'?')) {
$requestUri = substr($requestUri, 0, $pos);
}
-if ($requestUri !==''&& $requestUri[0] !=='/') {
+if (''!== $requestUri &&'/'!== $requestUri[0]) {
$requestUri ='/'.$requestUri;
}
$pathInfo = substr($requestUri, strlen($baseUrl));
diff --git a/bin/doctrine.php b/bin/doctrine.php
index 91986c6286..63bb135aae 100644
--- a/bin/doctrine.php
+++ b/bin/doctrine.php
@@ -47,10 +47,12 @@ Type::overrideType(
Database::getUTCDateTimeTypeClass()
);
-/*Type::addType(
- 'json',
- 'Sonata\Doctrine\Types\JsonType'
-);*/
+if (!Type::hasType('json')) {
+ Type::addType(
+ 'json',
+ 'Sonata\Doctrine\Types\JsonType'
+ );
+}
$commands = array(
new \Doctrine\DBAL\Migrations\Tools\Console\Command\DiffCommand(),
diff --git a/main/auth/my_progress.php b/main/auth/my_progress.php
index df7d4527f7..6c9a955922 100755
--- a/main/auth/my_progress.php
+++ b/main/auth/my_progress.php
@@ -75,11 +75,13 @@ $content .= Tracking::show_course_detail(api_get_user_id(), $courseCode, $sessio
// Ofaj
$courseId = 0;
+
if (empty($courseCode)) {
- $content .= '
';
+ $content .= '
';
$content .= Tracking::displayUserSkills(
$user_id
);
+ $content .= '
';
}
if (!empty($dates)) {
diff --git a/main/img/icons/128/help.png b/main/img/icons/128/help.png
new file mode 100644
index 0000000000..6db4042788
Binary files /dev/null and b/main/img/icons/128/help.png differ
diff --git a/main/img/icons/128/project.png b/main/img/icons/128/project.png
new file mode 100644
index 0000000000..00b72bf39b
Binary files /dev/null and b/main/img/icons/128/project.png differ
diff --git a/main/img/icons/128/ticket.png b/main/img/icons/128/ticket.png
new file mode 100644
index 0000000000..2552470a03
Binary files /dev/null and b/main/img/icons/128/ticket.png differ
diff --git a/main/img/icons/128/tickets.png b/main/img/icons/128/tickets.png
new file mode 100644
index 0000000000..dc867bf807
Binary files /dev/null and b/main/img/icons/128/tickets.png differ
diff --git a/main/img/icons/128/tickets_urgent.png b/main/img/icons/128/tickets_urgent.png
new file mode 100644
index 0000000000..2adcbcb7b9
Binary files /dev/null and b/main/img/icons/128/tickets_urgent.png differ
diff --git a/main/img/icons/22/help.png b/main/img/icons/22/help.png
new file mode 100644
index 0000000000..21ed8cb242
Binary files /dev/null and b/main/img/icons/22/help.png differ
diff --git a/main/img/icons/22/project.png b/main/img/icons/22/project.png
new file mode 100644
index 0000000000..73ac516c0e
Binary files /dev/null and b/main/img/icons/22/project.png differ
diff --git a/main/img/icons/22/ticket.png b/main/img/icons/22/ticket.png
new file mode 100644
index 0000000000..8dcab370f4
Binary files /dev/null and b/main/img/icons/22/ticket.png differ
diff --git a/main/img/icons/22/tickets.png b/main/img/icons/22/tickets.png
new file mode 100644
index 0000000000..40e90556bb
Binary files /dev/null and b/main/img/icons/22/tickets.png differ
diff --git a/main/img/icons/22/tickets_urgent.png b/main/img/icons/22/tickets_urgent.png
new file mode 100644
index 0000000000..cb212fca2b
Binary files /dev/null and b/main/img/icons/22/tickets_urgent.png differ
diff --git a/main/img/icons/32/help.png b/main/img/icons/32/help.png
new file mode 100644
index 0000000000..fe62616769
Binary files /dev/null and b/main/img/icons/32/help.png differ
diff --git a/main/img/icons/32/project.png b/main/img/icons/32/project.png
new file mode 100644
index 0000000000..41874cc2b8
Binary files /dev/null and b/main/img/icons/32/project.png differ
diff --git a/main/img/icons/32/ticket.png b/main/img/icons/32/ticket.png
new file mode 100644
index 0000000000..f8f3b8e7b8
Binary files /dev/null and b/main/img/icons/32/ticket.png differ
diff --git a/main/img/icons/32/tickets.png b/main/img/icons/32/tickets.png
new file mode 100644
index 0000000000..b857ae408f
Binary files /dev/null and b/main/img/icons/32/tickets.png differ
diff --git a/main/img/icons/32/tickets_urgent.png b/main/img/icons/32/tickets_urgent.png
new file mode 100644
index 0000000000..34e75e5f4e
Binary files /dev/null and b/main/img/icons/32/tickets_urgent.png differ
diff --git a/main/img/icons/48/help.png b/main/img/icons/48/help.png
new file mode 100644
index 0000000000..293bf685f1
Binary files /dev/null and b/main/img/icons/48/help.png differ
diff --git a/main/img/icons/48/project.png b/main/img/icons/48/project.png
new file mode 100644
index 0000000000..7acec41100
Binary files /dev/null and b/main/img/icons/48/project.png differ
diff --git a/main/img/icons/48/ticket.png b/main/img/icons/48/ticket.png
new file mode 100644
index 0000000000..f5ad667cbc
Binary files /dev/null and b/main/img/icons/48/ticket.png differ
diff --git a/main/img/icons/48/tickets.png b/main/img/icons/48/tickets.png
new file mode 100644
index 0000000000..7f6519f71f
Binary files /dev/null and b/main/img/icons/48/tickets.png differ
diff --git a/main/img/icons/48/tickets_urgent.png b/main/img/icons/48/tickets_urgent.png
new file mode 100644
index 0000000000..51f5097b42
Binary files /dev/null and b/main/img/icons/48/tickets_urgent.png differ
diff --git a/main/img/icons/64/help.png b/main/img/icons/64/help.png
new file mode 100644
index 0000000000..d95d8e4bb0
Binary files /dev/null and b/main/img/icons/64/help.png differ
diff --git a/main/img/icons/64/project.png b/main/img/icons/64/project.png
new file mode 100644
index 0000000000..6ed8e58e5e
Binary files /dev/null and b/main/img/icons/64/project.png differ
diff --git a/main/img/icons/64/ticket.png b/main/img/icons/64/ticket.png
new file mode 100644
index 0000000000..153346130d
Binary files /dev/null and b/main/img/icons/64/ticket.png differ
diff --git a/main/img/icons/64/tickets.png b/main/img/icons/64/tickets.png
new file mode 100644
index 0000000000..134620f0d2
Binary files /dev/null and b/main/img/icons/64/tickets.png differ
diff --git a/main/img/icons/64/tickets_urgent.png b/main/img/icons/64/tickets_urgent.png
new file mode 100644
index 0000000000..912f736552
Binary files /dev/null and b/main/img/icons/64/tickets_urgent.png differ
diff --git a/main/img/icons/svg/help.svg b/main/img/icons/svg/help.svg
new file mode 100644
index 0000000000..1f1d418300
--- /dev/null
+++ b/main/img/icons/svg/help.svg
@@ -0,0 +1,425 @@
+
+
+
+
diff --git a/main/img/icons/svg/project.svg b/main/img/icons/svg/project.svg
new file mode 100644
index 0000000000..7a0ebb610a
--- /dev/null
+++ b/main/img/icons/svg/project.svg
@@ -0,0 +1,1859 @@
+
+
+
+
diff --git a/main/img/icons/svg/ticket.svg b/main/img/icons/svg/ticket.svg
new file mode 100644
index 0000000000..31e21f7843
--- /dev/null
+++ b/main/img/icons/svg/ticket.svg
@@ -0,0 +1,1610 @@
+
+
+
+
\ No newline at end of file
diff --git a/main/img/icons/svg/tickets.svg b/main/img/icons/svg/tickets.svg
new file mode 100644
index 0000000000..ca829d31c7
--- /dev/null
+++ b/main/img/icons/svg/tickets.svg
@@ -0,0 +1,1803 @@
+
+
+
+
\ No newline at end of file
diff --git a/main/img/icons/svg/tickets_urgent.svg b/main/img/icons/svg/tickets_urgent.svg
new file mode 100644
index 0000000000..4ebb746fc5
--- /dev/null
+++ b/main/img/icons/svg/tickets_urgent.svg
@@ -0,0 +1,155 @@
+
+
diff --git a/main/inc/lib/TicketManager.php b/main/inc/lib/TicketManager.php
index fbc47a42a3..07bc4bc6e7 100644
--- a/main/inc/lib/TicketManager.php
+++ b/main/inc/lib/TicketManager.php
@@ -5,6 +5,7 @@ use Chamilo\TicketBundle\Entity\Project;
use Chamilo\TicketBundle\Entity\Status;
use Chamilo\TicketBundle\Entity\Priority;
use Chamilo\TicketBundle\Entity\Ticket;
+use \Database;
/**
* Class TicketManager
@@ -850,6 +851,9 @@ class TicketManager
ticket.message LIKE '%$keyword%' OR
ticket.keyword LIKE '%$keyword%' OR
ticket.source LIKE '%$keyword%' OR
+ cat.name LIKE '%$keyword%' OR
+ status.name LIKE '%$keyword%' OR
+ priority.name LIKE '%$keyword%' OR
ticket.personal_email LIKE '%$keyword%'
)";
}
@@ -863,10 +867,12 @@ class TicketManager
'keyword_priority' => 'ticket.priority_id'
];
- foreach ($keywords as $keyword => $sqlLabel) {
+ foreach ($keywords as $keyword => $label) {
if (isset($_GET[$keyword])) {
$data = Database::escape_string(trim($_GET[$keyword]));
- $sql .= " AND $sqlLabel = '$data' ";
+ if (!empty($data)) {
+ $sql .= " AND $label = '$data' ";
+ }
}
}
@@ -932,14 +938,20 @@ class TicketManager
$img_source = 'icons/32/event.png';
break;
default:
- $img_source = 'icons/32/course_home.png';
+ $img_source = 'icons/32/ticket.png';
break;
}
$row['start_date'] = Display::dateToStringAgoAndLongDate($row['start_date']);
$row['sys_lastedit_datetime'] = Display::dateToStringAgoAndLongDate($row['sys_lastedit_datetime']);
- $icon = Display::return_icon($img_source, get_lang('Info')).''.$row['code'].'';
+ $icon = Display::return_icon(
+ $img_source,
+ get_lang('Info'),
+ ['style' => 'margin-right: 10px; float: left;']
+ );
+
+ $icon .= ''.$row['code'].'';
if ($isAdmin) {
$ticket = array(
@@ -2167,29 +2179,48 @@ class TicketManager
}
/**
- * @return string
+ * Returns a list of menu elements for the tickets system's configuration
+ * @param string $exclude The element to exclude from the list
+ * @return array
*/
- public static function getSettingsMenu()
+ public static function getSettingsMenuItems($exclude = null)
{
- $items = [
- [
- 'url' => 'projects.php',
- 'content' => get_lang('Projects')
- ],
- [
- 'url' => 'status.php',
- 'content' => get_lang('Status')
- ],
- [
- 'url' => 'priorities.php',
- 'content' => get_lang('Priority')
- ]
+ $items = [];
+ $project = [
+ 'icon' => 'project.png',
+ 'url' => 'projects.php',
+ 'content' => get_lang('Projects')
+ ];
+ $status = [
+ 'icon' => 'check-circle.png',
+ 'url' => 'status.php',
+ 'content' => get_lang('Status')
];
+ $priority = [
+ 'icon' => 'tickets_urgent.png',
+ 'url' => 'priorities.php',
+ 'content' => get_lang('Priority')
+ ];
+ switch ($exclude) {
+ case 'project':
+ $items = [$status, $priority];
+ break;
+ case 'status':
+ $items = [$project, $priority];
+ break;
+ case 'priority':
+ $items = [$project, $status];
+ break;
+ default:
+ $items = [$project, $status, $priority];
+ break;
+ }
- echo Display::actions($items);
+ return $items;
}
/**
+ * Returns a list of strings representing the default statuses
* @return array
*/
public static function getDefaultStatusList()
diff --git a/main/inc/lib/skill.lib.php b/main/inc/lib/skill.lib.php
index b63e15e19d..960d967c35 100755
--- a/main/inc/lib/skill.lib.php
+++ b/main/inc/lib/skill.lib.php
@@ -1339,7 +1339,7 @@ class Skill extends Model
- | '.get_lang('AchievedSkills').' |
+ '.get_lang('AchievedSkills').' |
@@ -1391,7 +1391,7 @@ class Skill extends Model
$transparency = '';
if ($passed === false) {
// @todo use a css class
- $transparency = 'opacity: 0.4; filter: alpha(opacity=40);';
+ $transparency = 'filter: alpha(opacity=40);';
}
$label = $this->processSkillListSimple([$data], 'mini', $transparency);
diff --git a/main/inc/lib/template.lib.php b/main/inc/lib/template.lib.php
index 3c4b5e45b3..04e442c810 100755
--- a/main/inc/lib/template.lib.php
+++ b/main/inc/lib/template.lib.php
@@ -1004,7 +1004,7 @@ class Template
if (api_get_setting('show_link_ticket_notification') == 'true' && $this->user_is_logged_in) {
// by default is project_id = 1
$iconTicket = Display::return_icon(
- 'bug.png',
+ 'help.png',
get_lang('Ticket'),
[],
ICON_SIZE_LARGE
@@ -1015,7 +1015,7 @@ class Template
$courseParams = api_get_cidreq();
}
$url = api_get_path(WEB_CODE_PATH).'ticket/tickets.php?project_id=1&'.$courseParams;
- $rightFloatMenu .= '
+ $rightFloatMenu .= '
'.$iconTicket.'
diff --git a/main/inc/lib/userportal.lib.php b/main/inc/lib/userportal.lib.php
index 15c4770c58..b021d42684 100755
--- a/main/inc/lib/userportal.lib.php
+++ b/main/inc/lib/userportal.lib.php
@@ -1097,7 +1097,7 @@ class IndexManager
'icon' => Display::return_icon('order-course.png', get_lang('SortMyCourses')),
'link' => api_get_path(WEB_CODE_PATH).'auth/courses.php?action=sortmycourses',
'title' => get_lang('SortMyCourses')
- ];*/
+ ];
// Session history
if (isset($_GET['history']) && intval($_GET['history']) == 1) {
@@ -1115,7 +1115,7 @@ class IndexManager
'title' => get_lang('HistoryTrainingSessions')
];
}
-
+ */
if ($isHrm) {
$items[] = [
'link' => api_get_path(WEB_CODE_PATH).'auth/hrm_courses.php',
diff --git a/main/mySpace/myStudents.php b/main/mySpace/myStudents.php
index 1610aa164f..0104d090cf 100755
--- a/main/mySpace/myStudents.php
+++ b/main/mySpace/myStudents.php
@@ -1682,12 +1682,13 @@ if (empty($_GET['details'])) {
';
echo Tracking::displayUserSkills(
$user_info['user_id'],
$courseInfo ? $courseInfo['real_id'] : 0,
$sessionId
);
+echo '
';
if ($allowMessages === true) {
// Messages
diff --git a/main/survey/fillsurvey.php b/main/survey/fillsurvey.php
index 75357dffa1..20257cd6f0 100755
--- a/main/survey/fillsurvey.php
+++ b/main/survey/fillsurvey.php
@@ -19,7 +19,6 @@ if (!isset($_GET['cidReq'])) {
$_cid = $_GET['cidReq'];
}
-// Including the global initialization file
require_once __DIR__.'/../inc/global.inc.php';
// Database table definitions
@@ -33,32 +32,34 @@ $table_user = Database::get_main_table(TABLE_MAIN_USER);
$allowRequiredSurveyQuestions = api_get_configuration_value('allow_required_survey_questions');
// Check if user is anonymous or not
+$isAnonymous = false;
if (api_is_anonymous(api_get_user_id(), true)) {
$isAnonymous = true;
-} else {
- $isAnonymous = false;
}
// getting all the course information
if (isset($_GET['course'])) {
- $course_info = api_get_course_info($_GET['course']);
+ $courseInfo = api_get_course_info($_GET['course']);
} else {
- $course_info = api_get_course_info();
+ $courseInfo = api_get_course_info();
}
-if (empty($course_info)) {
- api_not_allowed();
+if (empty($courseInfo)) {
+ api_not_allowed(true);
}
+$userInfo = api_get_user_info();
+$sessionId = isset($_GET['id_session']) ? (int) $_GET['id_session'] : api_get_session_id();
+
// Breadcrumbs
-if (!empty($_user)) {
- $interbreadcrumb[] = array(
- 'url' => api_get_path(WEB_CODE_PATH).'survey/survey_list.php?cidReq='.$course_info['code'],
+if (!empty($userInfo)) {
+ $interbreadcrumb[] = [
+ 'url' => api_get_path(WEB_CODE_PATH).'survey/survey_list.php?cidReq='.$courseInfo['code'].'&id_session='.$sessionId,
'name' => get_lang('SurveyList')
- );
+ ];
}
-$course_id = $course_info['real_id'];
+$course_id = $courseInfo['real_id'];
$surveyCode = isset($_GET['scode']) ? Database::escape_string($_GET['scode']) : '';
if ($surveyCode != '') {
@@ -159,7 +160,7 @@ $sql = "SELECT * FROM $table_survey
WHERE
c_id = $course_id AND
code = '".Database::escape_string($survey_invitation['survey_code'])."'";
-$sql .= api_get_session_condition(api_get_session_id());
+$sql .= api_get_session_condition($sessionId);
$result = Database::query($sql);
if (Database::num_rows($result) > 1) {
@@ -192,6 +193,9 @@ if (Database::num_rows($result) > 1) {
// Getting the survey information
$survey_data = SurveyManager::get_survey($survey_invitation['survey_id']);
+if (empty($survey_data)) {
+ api_not_allowed(true);
+}
$survey_data['survey_id'] = $survey_invitation['survey_id'];
// Storing the answers
@@ -353,7 +357,7 @@ if (count($_POST) > 0) {
}
} else {
// In case it's another type than 0 or 1
- die(get_lang('ErrorSurveyTypeUnknown'));
+ api_not_allowed(true, get_lang('ErrorSurveyTypeUnknown'));
}
}
@@ -379,14 +383,11 @@ if ($survey_data['form_fields'] != '' &&
}
}
- // We use the same form as in auth/profile.php
- $form = new FormValidator(
- 'profile',
- 'post',
- api_get_self()."?".api_get_cidreq().'&'
- .str_replace('&show_form=1', '&show_form=1', Security::remove_XSS($_SERVER['QUERY_STRING']))
- );
+ $url = api_get_self().'?cidReq='.$courseInfo['code'].'&id_session='.$sessionId.'&'.
+ str_replace('&show_form=1', '&show_form=1', Security::remove_XSS($_SERVER['QUERY_STRING']));
+ // We use the same form as in auth/profile.php
+ $form = new FormValidator('profile', 'post', $url);
if (api_is_western_name_order()) {
if (isset($list['firstname']) && $list['firstname'] == 1) {
//FIRST NAME
@@ -605,10 +606,10 @@ if (isset($_POST['finish_survey'])) {
$survey_invitation['c_id']
);
- if ($course_info) {
+ if ($courseInfo) {
echo Display::toolbarButton(
get_lang('ReturnToCourseHomepage'),
- api_get_course_url($course_info['code']),
+ api_get_course_url($courseInfo['code']),
'home'
);
}
@@ -807,10 +808,7 @@ if (isset($_GET['show']) || isset($_POST['personality'])) {
$list['group'] = $row['survey_group_pri'];
$totals[] = $list;
}
- //echo ''; print_r($totals);
-
- $final_results = array();
-
+ $final_results = [];
// Get a percentage score for each group
for ($i = 0; $i < count($totals); $i++) {
for ($j = 0; $j < count($results); $j++) {
@@ -974,7 +972,6 @@ if (isset($_GET['show']) || isset($_POST['personality'])) {
$paged_questions_sec = Session::read('page_questions_sec');
}
$paged_questions = Session::read('paged_questions'); // For the sake of pages counting
- //$paged_questions = $paged_questions_sec; // For the sake of pages counting coming up at display time...
if ($shuffle == '') {
$shuffle = ' BY survey_question.sort, survey_question_option.sort ASC ';
}
@@ -1153,7 +1150,6 @@ if (isset($_GET['show']) || isset($_POST['personality'])) {
}
$counter++;
}
- var_Dump($questions);
}
}
} else { // In case it's another type than 0 or 1
@@ -1192,7 +1188,8 @@ $p_l = isset($_POST['language']) ? Security::remove_XSS($_POST['language']) : ''
$add_parameters = isset($_GET['user_id']) ? 'user_id='.intval($_GET['user_id']).'&' : '';
-$url = api_get_self().'?'.api_get_cidreq().'&'.$add_parameters.'course='.$g_c.'&invitationcode='.$g_ic.'&show='.$show;
+$url = api_get_self().'?cidReq='.$courseInfo['code'].'&id_session='.$sessionId.
+ '&'.$add_parameters.'course='.$g_c.'&invitationcode='.$g_ic.'&show='.$show;
$form = new FormValidator(
'question',
'post',
@@ -1209,7 +1206,6 @@ if (isset($questions) && is_array($questions)) {
$display = new $ch_type;
// @todo move this in a function.
$form->addHtml('');
- //$form->addHtml('
');
$form->addHtml('
'.$question['sort'].'. '.strip_tags($question['survey_question']).'
');
//$form->addHtml($question['survey_question']);
@@ -1220,8 +1216,7 @@ if (isset($questions) && is_array($questions)) {
$userAnswer = $userAnswerData[$user_id];
switch ($question['type']) {
case 'score':
- $finalAnswer = array();
-
+ $finalAnswer = [];
foreach ($userAnswer as $userChoice) {
list($choiceId, $choiceValue) = explode('*', $userChoice);
@@ -1238,7 +1233,6 @@ if (isset($questions) && is_array($questions)) {
break;
}
}
-
$display->render($form, $question, $finalAnswer);
$form->addHtml('');
}
@@ -1305,7 +1299,8 @@ if ($survey_data['survey_type'] === '0') {
}
}
}
-} elseif ($survey_data['survey_type'] === '1') { //conditional/personality-test type survey
+} elseif ($survey_data['survey_type'] === '1') {
+ //conditional/personality-test type survey
if (isset($_GET['show']) || isset($_POST['personality'])) {
$numberofpages = count($paged_questions);
if (!empty($paged_questions_sec) && count($paged_questions_sec) > 0) {
@@ -1361,33 +1356,20 @@ if ($survey_data['survey_type'] === '0') {
}
$form->addHtml('
');
$form->display();
-
-// Footer
Display::display_footer();
/**
* Check whether this survey has ended. If so, display message and exit rhis script
+ * @param array $surveyData Survey data
*/
-function check_time_availability($surv_data)
+function check_time_availability($surveyData)
{
- $start_date = mktime(
- 0,
- 0,
- 0,
- substr($surv_data['start_date'], 5, 2),
- substr($surv_data['start_date'], 8, 2),
- substr($surv_data['start_date'], 0, 4)
- );
- $end_date = mktime(
- 0,
- 0,
- 0,
- substr($surv_data['end_date'], 5, 2),
- substr($surv_data['end_date'], 8, 2),
- substr($surv_data['end_date'], 0, 4)
- );
- $cur_date = time();
- if ($cur_date < $start_date) {
+ $userTimeZone = new DateTimeZone(api_get_timezone());
+ $startDate = new DateTime($surveyData['start_date'], $userTimeZone);
+ $endDate = new DateTime($surveyData['end_date'], $userTimeZone);
+ $currentDate = new DateTime('now', $userTimeZone);
+ $currentDate->modify('today');
+ if ($currentDate < $startDate) {
api_not_allowed(
true,
Display:: return_message(
@@ -1398,7 +1380,7 @@ function check_time_availability($surv_data)
);
}
- if ($cur_date > $end_date) {
+ if ($currentDate > $endDate) {
api_not_allowed(
true,
Display:: return_message(
diff --git a/main/survey/surveyUtil.class.php b/main/survey/surveyUtil.class.php
index e10240c31c..1f4c2f2efd 100755
--- a/main/survey/surveyUtil.class.php
+++ b/main/survey/surveyUtil.class.php
@@ -2173,11 +2173,8 @@ class SurveyUtil
* @param int $reminder
* @param bool $sendmail
* @param int $remindUnAnswered
- * @return int
- * @internal param
- * @internal param
- * @internal param
- * The text has to contain a **link** string or this will automatically be added to the end
+ * @return bool $isAdditionalEmail
+ *
* @author Patrick Cool
, Ghent University
* @author Julio Montoya - Adding auto-generated link support
* @version January 2007
@@ -2188,7 +2185,8 @@ class SurveyUtil
$invitation_text,
$reminder = 0,
$sendmail = false,
- $remindUnAnswered = 0
+ $remindUnAnswered = 0,
+ $isAdditionalEmail = false
) {
if (!is_array($users_array)) {
// Should not happen
@@ -2211,36 +2209,37 @@ class SurveyUtil
$counter = 0; // Nr of invitations "sent" (if sendmail option)
$course_id = api_get_course_int_id();
$session_id = api_get_session_id();
- $result = CourseManager::separateUsersGroups($users_array);
-
- $groupList = $result['groups'];
- $users_array = $result['users'];
-
- foreach ($groupList as $groupId) {
- $userGroupList = GroupManager::getStudents($groupId);
- $userGroupIdList = array_column($userGroupList, 'user_id');
- $users_array = array_merge($users_array, $userGroupIdList);
-
- $params = array(
- 'c_id' => $course_id,
- 'session_id' => $session_id,
- 'group_id' => $groupId,
- 'survey_code' => $survey_data['code']
- );
- $invitationExists = self::invitationExists(
- $course_id,
- $session_id,
- $groupId,
- $survey_data['code']
- );
- if (empty($invitationExists)) {
- self::save_invitation($params);
+ if ($isAdditionalEmail == false) {
+ $result = CourseManager::separateUsersGroups($users_array);
+ $groupList = $result['groups'];
+ $users_array = $result['users'];
+
+ foreach ($groupList as $groupId) {
+ $userGroupList = GroupManager::getStudents($groupId);
+ $userGroupIdList = array_column($userGroupList, 'user_id');
+ $users_array = array_merge($users_array, $userGroupIdList);
+
+ $params = [
+ 'c_id' => $course_id,
+ 'session_id' => $session_id,
+ 'group_id' => $groupId,
+ 'survey_code' => $survey_data['code']
+ ];
+
+ $invitationExists = self::invitationExists(
+ $course_id,
+ $session_id,
+ $groupId,
+ $survey_data['code']
+ );
+ if (empty($invitationExists)) {
+ self::save_invitation($params);
+ }
}
}
$users_array = array_unique($users_array);
-
foreach ($users_array as $key => $value) {
if (!isset($value) || $value == '') {
continue;
@@ -3253,7 +3252,8 @@ class SurveyUtil
ICON_SIZE_TINY
);
echo ''.$row['title']
+ .'&invitationcode='.$row['invitation_code'].'&cidReq='.$_course['sysCode'].'&id_session='.$row['session_id'].'">
+ '.$row['title']
.'';
} else {
$isDrhOfCourse = CourseManager::isUserSubscribedInCourseAsDrh(
@@ -3291,7 +3291,6 @@ class SurveyUtil
);
echo ''.($efvMandatory['value'] ? get_lang('Yes') : get_lang('No')).' | ';
}
-
echo '';
}
echo '';
diff --git a/main/survey/survey_invite.php b/main/survey/survey_invite.php
index c147016c16..5e28ba711d 100755
--- a/main/survey/survey_invite.php
+++ b/main/survey/survey_invite.php
@@ -163,7 +163,7 @@ if (api_is_multiple_url_enabled()) {
}
// Show the URL that can be used by users to fill a survey without invitation
-$auto_survey_link = $portal_url.'main/survey/fillsurvey.php?course='.$_course['sysCode'].'&invitationcode=auto&scode='.$survey_data['survey_code'];
+$auto_survey_link = $portal_url.'main/survey/fillsurvey.php?course='.$_course['sysCode'].'&invitationcode=auto&scode='.$survey_data['survey_code'].'&id_session='.$survey_data['session_id'];
$form->addElement('label', null, get_lang('AutoInviteLink'));
$form->addElement('label', null, $auto_survey_link);
@@ -174,6 +174,7 @@ if ($form->validate()) {
$resendAll = isset($values['resend_to_all']) ? $values['resend_to_all'] : '';
$sendMail = isset($values['send_mail']) ? $values['send_mail'] : '';
$remindUnAnswered = isset($values['remindUnAnswered']) ? $values['remindUnAnswered'] : '';
+ $users = isset($values['users']) ? $values['users'] : [];
if ($sendMail) {
if (empty($values['mail_title']) || empty($values['mail_text'])) {
@@ -194,6 +195,7 @@ if ($form->validate()) {
return;
}
}
+
// Save the invitation mail
SurveyUtil::save_invite_mail(
$values['mail_text'],
@@ -203,7 +205,7 @@ if ($form->validate()) {
// Saving the invitations for the course users
$count_course_users = SurveyUtil::saveInvitations(
- $values['users'],
+ $users,
$values['mail_title'],
$values['mail_text'],
$resendAll,
@@ -225,7 +227,8 @@ if ($form->validate()) {
$values['mail_text'],
$resendAll,
$sendMail,
- $remindUnAnswered
+ $remindUnAnswered,
+ true
);
// Updating the invited field in the survey table
diff --git a/main/template/rainbow/skill/issued.tpl b/main/template/rainbow/skill/issued.tpl
old mode 100644
new mode 100755
index 2e7ae6d93c..f9102f8887
--- a/main/template/rainbow/skill/issued.tpl
+++ b/main/template/rainbow/skill/issued.tpl
@@ -20,56 +20,16 @@
{% endif %}
- {% if allow_download_export %}
- {% if badge_error %}
-
- {{ 'BakedBadgeProblem'|get_lang }}
- {% else %}
-
-
- {{ 'DownloadBadge'|get_lang }}
-
-
- {% endif %}
-
-
-
- {{ 'ExportBadge'|get_lang }}
-
-
-
-
{{ 'ShareWithYourFriends' | get_lang }}
-
-
-
-
-
-
-
- {% endif %}
-
{{ 'RecipientDetails'|get_lang }}
-
{{ issue_info.user_complete_name }}
-
{{ 'SkillAcquiredAt'|get_lang }}
+
{{ issue_info.user_complete_name }}
- -
- {% if issue_info.source_name %}
-
- {{ 'TimeXThroughCourseY'|get_lang|format(issue_info.datetime, issue_info.source_name) }}
- {% else %}
-
- {{ issue_info.datetime }}
- {% endif %}
+
{{ 'SkillAcquiredAt'|get_lang }} {{ issue_info.datetime }}
{% if issue_info.argumentation %}
- {% if issue_info.argumentation %}
-
-
+
{{ 'UserXIndicated'|get_lang|format(issue_info.argumentation_author_name) }}
-
- {% endif %}
- {{ issue_info.argumentation }}
+
{% endif %}
@@ -130,13 +90,22 @@
{% else %}
-
-
+
{{ 'XComments'|get_lang|format(issue_info.comments|length) }}
- /
-
- {{ 'AverageRatingX'|get_lang|format(issue_info.feedback_average) }}
+
+ {% if issue_info.comments %}
+ {% for comment in issue_info.comments %}
+
+ {% endfor %}
+ {% endif %}
+
{% endif %}
diff --git a/main/template/rainbow/skill/student_report.tpl b/main/template/rainbow/skill/student_report.tpl
index 95d628f7b5..8d92efd817 100644
--- a/main/template/rainbow/skill/student_report.tpl
+++ b/main/template/rainbow/skill/student_report.tpl
@@ -1,3 +1,4 @@
+
-
+
+
+{{ 'MySkillsReportIntroduction' | get_lang }}
+
{% if rows %}
-
+
+ {% if skill_table %}
+ {{ skill_table }}
+ {% endif %}
+
+
@@ -40,7 +49,4 @@
{% endfor %}
- {% if skill_table %}
- {{ skill_table }}
- {% endif %}
{% endif %}
diff --git a/main/ticket/priorities.php b/main/ticket/priorities.php
index 767b7184f6..5d74c59aea 100644
--- a/main/ticket/priorities.php
+++ b/main/ticket/priorities.php
@@ -150,13 +150,24 @@ $table->set_column_filter('3', 'modify_filter');
Display::display_header($toolName);
$items = [
- [
- 'url' => 'priorities.php?action=add',
- 'content' => Display::return_icon('new_folder.png', null, null, ICON_SIZE_MEDIUM)
- ]
+ 'icon' => 'new_folder.png',
+ 'url' => 'priorities.php?action=add',
+ 'content' => get_lang('AddPriority')
];
-
-echo Display::actions($items);
+echo '';
+echo Display::url(
+ Display::return_icon('back.png', get_lang('Tickets'), [], ICON_SIZE_MEDIUM),
+ api_get_path(WEB_CODE_PATH).'ticket/tickets.php'
+);
+$sections = TicketManager::getSettingsMenuItems('priority');
+array_unshift($sections, $items);
+foreach ($sections as $item) {
+ echo Display::url(
+ Display::return_icon($item['icon'], $item['content'], [], ICON_SIZE_MEDIUM),
+ $item['url']
+ );
+}
+echo '
';
echo $formToString;
echo $table->return_table();
diff --git a/main/ticket/projects.php b/main/ticket/projects.php
index f19bb5e60c..2969b66d78 100644
--- a/main/ticket/projects.php
+++ b/main/ticket/projects.php
@@ -161,13 +161,26 @@ $table->set_column_filter('3', 'modify_filter');
Display::display_header('');
$items = [
- [
- 'url' => 'projects.php?action=add',
- 'content' => Display::return_icon('new_folder.png', null, null, ICON_SIZE_MEDIUM)
- ]
+ 'icon' => 'new_folder.png',
+ 'url' => 'projects.php?action=add',
+ 'content' => get_lang('AddProject')
];
-echo Display::actions($items);
+echo '';
+echo Display::url(
+ Display::return_icon('back.png', get_lang('Tickets'), [], ICON_SIZE_MEDIUM),
+ api_get_path(WEB_CODE_PATH).'ticket/tickets.php'
+);
+$sections = TicketManager::getSettingsMenuItems('project');
+array_unshift($sections, $items);
+foreach ($sections as $item) {
+ echo Display::url(
+ Display::return_icon($item['icon'], $item['content'], [], ICON_SIZE_MEDIUM),
+ $item['url']
+ );
+}
+echo '
';
+
echo $formToString;
echo $table->return_table();
diff --git a/main/ticket/settings.php b/main/ticket/settings.php
index b3c5efde70..defe223e2c 100644
--- a/main/ticket/settings.php
+++ b/main/ticket/settings.php
@@ -21,8 +21,15 @@ echo Display::url(
Display::return_icon('back.png', get_lang('Tickets'), [], ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH).'ticket/tickets.php'
);
+$sections = TicketManager::getSettingsMenuItems();
+foreach ($sections as $item) {
+ echo Display::url(
+ Display::return_icon($item['icon'], $item['content'], [], ICON_SIZE_MEDIUM),
+ $item['url']
+ );
+}
echo '';
-echo TicketManager::getSettingsMenu();
+
Display::display_footer();
diff --git a/main/ticket/status.php b/main/ticket/status.php
index b711ca50d7..36ba50def4 100644
--- a/main/ticket/status.php
+++ b/main/ticket/status.php
@@ -151,13 +151,24 @@ $table->set_column_filter('3', 'modify_filter');
Display::display_header($toolName);
$items = [
- [
- 'url' => 'status.php?action=add',
- 'content' => Display::return_icon('new_folder.png', null, null, ICON_SIZE_MEDIUM)
- ]
+ 'icon' => 'new_folder.png',
+ 'url' => 'status.php?action=add',
+ 'content' => get_lang('AddStatus')
];
-
-echo Display::actions($items);
+echo '';
+echo Display::url(
+ Display::return_icon('back.png', get_lang('Tickets'), [], ICON_SIZE_MEDIUM),
+ api_get_path(WEB_CODE_PATH).'ticket/tickets.php'
+);
+$sections = TicketManager::getSettingsMenuItems('status');
+array_unshift($sections, $items);
+foreach ($sections as $item) {
+ echo Display::url(
+ Display::return_icon($item['icon'], $item['content'], [], ICON_SIZE_MEDIUM),
+ $item['url']
+ );
+}
+echo '
';
echo $formToString;
echo $table->return_table();
diff --git a/main/ticket/tickets.php b/main/ticket/tickets.php
index 3545b7146e..1a722c34af 100644
--- a/main/ticket/tickets.php
+++ b/main/ticket/tickets.php
@@ -236,7 +236,7 @@ if (!empty($projectId)) {
null,
ICON_SIZE_MEDIUM
),
- api_get_path(WEB_CODE_PATH) . 'ticket/new_ticket.php?project_id=' . $projectId,
+ api_get_path(WEB_CODE_PATH) . 'ticket/new_ticket.php?project_id=' . $projectId.'&'.api_get_cidReq(),
['title' => get_lang('Add')]
);
}
@@ -256,7 +256,7 @@ if (!empty($projectId)) {
$actionRight .= Display::url(
Display::return_icon(
'settings.png',
- get_lang('Categories'),
+ get_lang('Settings'),
null,
ICON_SIZE_MEDIUM
),
@@ -283,21 +283,32 @@ if (!empty($projectId)) {
}
$options = '';
+ $iconProject = Display::return_icon(
+ 'project.png',
+ get_lang('Projects'),
+ null,
+ ICON_SIZE_MEDIUM
+ ) ;
if ($isAdmin) {
$options .= Display::url(
- get_lang('Projects'),
+ $iconProject,
api_get_path(WEB_CODE_PATH).'ticket/projects.php'
);
}
-
- $options .= Display::url(
+ $iconTicket = Display::return_icon(
+ 'tickets.png',
$ticketLabel,
+ null,
+ ICON_SIZE_MEDIUM
+ ) ;
+ $options .= Display::url(
+ $iconTicket,
$url
);
if ($isAllow) {
echo Display::toolbarAction(
- 'options',
+ 'toolbar-options',
array(
$options
)
diff --git a/plugin/bbb/lib/bbb.lib.php b/plugin/bbb/lib/bbb.lib.php
index b198ea331a..97050cb0c7 100755
--- a/plugin/bbb/lib/bbb.lib.php
+++ b/plugin/bbb/lib/bbb.lib.php
@@ -349,7 +349,6 @@ class bbb
// This setting currently limits the maximum conference duration,
// to avoid lingering sessions on the video-conference server #6261
$duration = 300;
-
$bbbParams = array(
'meetingId' => $params['remote_id'], // REQUIRED
'meetingName' => $meetingName, // REQUIRED
@@ -389,8 +388,9 @@ class bbb
}
}
- return $this->logoutUrl;
+ return false;
}
+ return false;
}
/**
@@ -479,8 +479,12 @@ class bbb
* @assert ('') === false
* @assert ('abcdefghijklmnopqrstuvwxyzabcdefghijklmno') === false
*/
- public function joinMeeting($meetingName, $loop = false)
+ public function joinMeeting($meetingName)
{
+ if ($this->debug) {
+ error_log("joinMeeting: $meetingName");
+ }
+
if (empty($meetingName)) {
return false;
}
@@ -521,51 +525,47 @@ class bbb
// -- REQUIRED - The moderator password for the meeting
);
- $status = false;
$meetingInfoExists = false;
- while ($status === false) {
- $meetingIsRunningInfo = $this->getMeetingInfo($params);
- if ($meetingIsRunningInfo === false) {
- //checking with the remote_id didn't work, so just in case and
- // to provide backwards support, check with the id
- $params = array(
- 'meetingId' => $meetingData['id'],
- // -- REQUIRED - The unique id for the meeting
- 'password' => $this->getModMeetingPassword()
- // -- REQUIRED - The moderator password for the meeting
- );
- $meetingIsRunningInfo = $this->getMeetingInfo($params);
- }
+ $meetingIsRunningInfo = $this->getMeetingInfo($params);
+ if ($this->debug) {
+ error_log('Searching meeting with params:');
+ error_log(print_r($params, 1));
+ error_log('Result:');
+ error_log(print_r($meetingIsRunningInfo, 1));
+ }
+ if ($meetingIsRunningInfo === false) {
+ // checking with the remote_id didn't work, so just in case and
+ // to provide backwards support, check with the id
+ $params = array(
+ 'meetingId' => $meetingData['id'],
+ // -- REQUIRED - The unique id for the meeting
+ 'password' => $this->getModMeetingPassword()
+ // -- REQUIRED - The moderator password for the meeting
+ );
+ $meetingIsRunningInfo = $this->getMeetingInfo($params);
if ($this->debug) {
+ error_log('Searching meetingId with params:');
+ error_log(print_r($params, 1));
+ error_log('Result:');
error_log(print_r($meetingIsRunningInfo, 1));
}
+ }
- if (strval($meetingIsRunningInfo['returncode']) == 'SUCCESS' &&
- isset($meetingIsRunningInfo['meetingName']) &&
- !empty($meetingIsRunningInfo['meetingName'])
- //strval($meetingIsRunningInfo['running']) == 'true'
- ) {
- $meetingInfoExists = true;
- }
-
- if ($this->debug) {
- error_log(
- "meeting is running: ".intval($meetingInfoExists)
- );
- }
-
- if ($meetingInfoExists) {
- $status = true;
- }
+ if (strval($meetingIsRunningInfo['returncode']) == 'SUCCESS' &&
+ isset($meetingIsRunningInfo['meetingName']) &&
+ !empty($meetingIsRunningInfo['meetingName'])
+ ) {
+ $meetingInfoExists = true;
+ }
- if ($loop) {
- continue;
- } else {
- break;
- }
+ if ($this->debug) {
+ error_log(
+ "meeting is running: ".intval($meetingInfoExists)
+ );
}
+ $url = false;
if ($meetingInfoExists) {
$joinParams = array(
'meetingId' => $meetingData['remote_id'], // -- REQUIRED - A unique id for the meeting
@@ -577,8 +577,6 @@ class bbb
);
$url = $this->api->getJoinMeetingURL($joinParams);
$url = $this->protocol.$url;
- } else {
- $url = $this->logoutUrl;
}
if ($this->debug) {
error_log("return url :".$url);
@@ -858,7 +856,10 @@ class bbb
'userID' => '', // -- OPTIONAL - string
'webVoiceConf' => '' // -- OPTIONAL - string
);
- $item['go_url'] = $this->protocol.$this->api->getJoinMeetingURL($joinParams);
+ $item['go_url'] = '';
+ if (!empty($pass)) {
+ $item['go_url'] = $this->protocol.$this->api->getJoinMeetingURL($joinParams);
+ }
}
$item = array_merge($item, $meetingDB, $meetingBBB);
diff --git a/plugin/bbb/start.php b/plugin/bbb/start.php
index d0474d7f83..a89c1e8141 100755
--- a/plugin/bbb/start.php
+++ b/plugin/bbb/start.php
@@ -56,15 +56,19 @@ if ($bbb->pluginEnabled) {
$meetingParams = array();
$meetingParams['meeting_name'] = $bbb->getCurrentVideoConferenceName();
-
if ($bbb->meetingExists($meetingParams['meeting_name'])) {
- $url = $bbb->joinMeeting($meetingParams['meeting_name']) ?: $bbb->createMeeting($meetingParams);
+ $joinUrl = $bbb->joinMeeting($meetingParams['meeting_name']);
+ if ($joinUrl) {
+ $url = $joinUrl;
+ } else {
+ $url = $bbb->createMeeting($meetingParams);
+ }
} else {
$url = $bbb->isConferenceManager() ? $bbb->createMeeting($meetingParams) : $bbb->getListingUrl();
}
$meetingInfo = $bbb->findMeetingByName($meetingParams['meeting_name']);
- if (!empty($meetingInfo)) {
+ if (!empty($meetingInfo) && $url) {
$bbb->saveParticipant($meetingInfo['id'], api_get_user_id());
$bbb->redirectToBBB($url);
} else {
diff --git a/src/Chamilo/CoreBundle/Entity/Repository/SequenceRepository.php b/src/Chamilo/CoreBundle/Entity/Repository/SequenceRepository.php
index abaea94637..f85540e50e 100644
--- a/src/Chamilo/CoreBundle/Entity/Repository/SequenceRepository.php
+++ b/src/Chamilo/CoreBundle/Entity/Repository/SequenceRepository.php
@@ -39,7 +39,7 @@ class SequenceRepository extends EntityRepository
public function getRequirementAndDependencies($resourceId, $type)
{
$sequence = $this->findRequirementForResource($resourceId, $type);
- $result = ['requirements' => '', 'dependencies' => ''];
+ $result = ['requirements' => '', 'dependencies' => []];
if ($sequence && $sequence->hasGraph()) {
$graph = $sequence->getSequence()->getUnSerializeGraph();
$vertex = $graph->getVertex($resourceId);
diff --git a/user_portal.php b/user_portal.php
index f50c8aad9d..cc7f9b43cd 100755
--- a/user_portal.php
+++ b/user_portal.php
@@ -338,6 +338,7 @@ $controller->tpl->assign('user_image_block', $controller->return_user_image_bloc
$controller->tpl->assign('course_block', $controller->return_course_block());
$controller->tpl->assign('navigation_course_links', $controller->return_navigation_links());
$controller->tpl->assign('search_block', $controller->return_search_block());
+$controller->tpl->assign('notice_block', $controller->return_notice());
$controller->tpl->assign('classes_block', $controller->return_classes_block());
$controller->tpl->assign('skills_block', $controller->returnSkillLinks());