Merge branch '1.11.x' of github.com:chamilo/chamilo-lms into 1.11.x

pull/2487/head
Angel Fernando Quiroz Campos 9 years ago
commit f41666006f
  1. 8
      app/Migrations/Schema/V111/Version111.php
  2. 6
      composer.json
  3. 1
      documentation/changelog.html
  4. 2
      documentation/dependencies.html
  5. 2
      documentation/installation_guide.html
  6. 2
      documentation/installation_guide_es_ES.html
  7. 2
      documentation/installation_guide_fr_FR.html
  8. 2
      documentation/installation_guide_it_IT.html
  9. 4
      main/course_description/index.php
  10. 4
      main/course_description/layout.php
  11. 30
      main/course_description/listing.php
  12. 1
      main/document/document_quota.php
  13. 6
      main/inc/lib/banner.lib.php
  14. 1
      main/inc/lib/template.lib.php
  15. 21
      main/install/install.lib.php
  16. 9
      main/lp/lp_upload.php
  17. 5
      main/template/default/layout/show_header.tpl
  18. 2
      plugin/studentfollowup/lang/english.php
  19. 21
      plugin/studentfollowup/post.php
  20. 5
      plugin/studentfollowup/posts.php
  21. 64
      plugin/studentfollowup/view/post.html.twig
  22. 2
      plugin/studentfollowup/view/posts.html.twig
  23. 12
      src/Chamilo/CourseBundle/Component/CourseCopy/CourseRestorer.php

@ -272,6 +272,7 @@ class Version111 extends AbstractMigrationChamilo
$this->addSql('ALTER TABLE ticket_message_attachments ENGINE=InnoDB');
$this->addSql('ALTER TABLE ticket_message_attachments DROP message_attch_id, CHANGE id id INT AUTO_INCREMENT NOT NULL, CHANGE message_id message_id INT DEFAULT NULL, CHANGE ticket_id ticket_id INT DEFAULT NULL, CHANGE filename filename LONGTEXT NOT NULL, CHANGE size size INT NOT NULL, CHANGE sys_insert_user_id sys_insert_user_id INT NOT NULL, CHANGE sys_insert_datetime sys_insert_datetime DATETIME NOT NULL, CHANGE sys_lastedit_user_id sys_lastedit_user_id INT DEFAULT NULL;');
$this->addSql('ALTER TABLE ticket_message_attachments ADD CONSTRAINT FK_70BF9E26700047D2 FOREIGN KEY (ticket_id) REFERENCES ticket_ticket (id);');
$this->addSql('ALTER TABLE ticket_message_attachments ADD CONSTRAINT FK_70BF9E26537A1329 FOREIGN KEY (message_id) REFERENCES ticket_message (id);');
$this->addSql('CREATE INDEX IDX_70BF9E26700047D2 ON ticket_message_attachments (ticket_id);');
} else {
$this->addSql('CREATE TABLE IF NOT EXISTS ticket_message_attachments (id INT AUTO_INCREMENT NOT NULL, ticket_id INT DEFAULT NULL, message_id INT DEFAULT NULL, path VARCHAR(255) NOT NULL, filename LONGTEXT NOT NULL, size INT NOT NULL, sys_insert_user_id INT NOT NULL, sys_insert_datetime DATETIME NOT NULL, sys_lastedit_user_id INT DEFAULT NULL, sys_lastedit_datetime DATETIME DEFAULT NULL, INDEX IDX_70BF9E26700047D2 (ticket_id), INDEX IDX_70BF9E26537A1329 (message_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
@ -318,7 +319,6 @@ class Version111 extends AbstractMigrationChamilo
$this->addSql('CREATE INDEX IDX_54B65868A76ED395 ON ticket_assigned_log (user_id);');
$this->addSql('ALTER TABLE ticket_message DROP message_id, CHANGE id id INT AUTO_INCREMENT NOT NULL, CHANGE ticket_id ticket_id INT DEFAULT NULL, CHANGE subject subject VARCHAR(255) DEFAULT NULL, CHANGE message message LONGTEXT DEFAULT NULL, CHANGE status status VARCHAR(255) NOT NULL, CHANGE ip_address ip_address VARCHAR(255) NOT NULL, CHANGE sys_insert_user_id sys_insert_user_id INT NOT NULL, CHANGE sys_insert_datetime sys_insert_datetime DATETIME NOT NULL, CHANGE sys_lastedit_user_id sys_lastedit_user_id INT DEFAULT NULL;');
$this->addSql('ALTER TABLE ticket_message ADD CONSTRAINT FK_BA71692D700047D2 FOREIGN KEY (ticket_id) REFERENCES ticket_ticket (id);');
@ -326,9 +326,6 @@ class Version111 extends AbstractMigrationChamilo
$this->addSql('ALTER TABLE ticket_ticket CHANGE category_id category_id INT DEFAULT NULL;');
$this->addSql('ALTER TABLE ticket_ticket ADD CONSTRAINT FK_EDE2C76812469DE2 FOREIGN KEY (category_id) REFERENCES ticket_category (id);');
$this->addSql('CREATE INDEX IDX_EDE2C76812469DE2 ON ticket_ticket (category_id);');
if ($fixTableMessage) {
$this->addSql('ALTER TABLE ticket_message_attachments ADD CONSTRAINT FK_70BF9E26537A1329 FOREIGN KEY (message_id) REFERENCES ticket_message (id);');
}
$this->addSql('DELETE FROM settings_current WHERE title = "Ticket"');
} else {
// Plugin was never installed. Create ticket tables
@ -403,7 +400,8 @@ class Version111 extends AbstractMigrationChamilo
$this->addSql("ALTER TABLE session MODIFY COLUMN name VARCHAR(150) NOT NULL DEFAULT ''");
if (!$schema->hasTable('version')) {
$this->addSql('CREATE TABLE version (id int unsigned NOT NULL AUTO_INCREMENT, version varchar(255), PRIMARY KEY(id), UNIQUE(version));');
$sql = getVersionTable();
$this->addSql($sql);
}
if ($schema->hasTable('resource')) {

@ -43,7 +43,7 @@
}
],
"require": {
"php": ">=5.4",
"php": ">=5.5",
"ext-intl": "*",
"ext-gd": "*",
"ext-curl": "*",
@ -90,7 +90,6 @@
"ircmaxell/password-compat": "~1.0.4",
"sylius/attribute": "0.13.0",
"sylius/translation": "0.13.0",
"ramsey/array_column": "~1.1",
"patchwork/utf8": "~1.2",
"ddeboer/data-import": "@stable",
"phpoffice/phpexcel": "~1.8",
@ -111,7 +110,8 @@
"essence/essence": "2.6.1",
"pclzip/pclzip": "2.8.2",
"chamilo/chash": "dev-master",
"ircmaxell/random-lib": "^1.2"
"ircmaxell/random-lib": "^1.2",
"ocramius/proxy-manager" : "~1.0|2.0.*"
},
"require-dev": {
"behat/behat": "@stable",

@ -69,6 +69,7 @@
</ul>
<h3>Possibly breaking changes</h3>
<ul>
<li>Dropped support for PHP 5.4 and inferior (now REQUIRES PHP 5.5 or more)</li>
<li>As Chamilo becomes more popular, we are facing new security-based challenges that come as consequences of the simplicity
that we offer our users. As such, in this version of Chamilo, the administrator *must* enable a configuration setting as follows
in order <b>to authorize teachers and students to use iframes</b> (embedding things from outside) inside the online text areas in their courses and personal spaces.

@ -71,7 +71,7 @@ We recommend using HTML5-compatible technology.
<h2>Dependencies - server-side</h2>
<ul>
<li>Apache 2+</li>
<li> PHP 5.4 or higher with MySQL bindings (mysqlnd is recommended) and php-gd extension to allow Chamilo to resize pictures. Now also supports PHP 7.0</li>
<li> PHP 5.5 or higher with MySQL bindings (mysqlnd is recommended) and php-gd extension to allow Chamilo to resize pictures. Now also supports PHP 7.0</li>
<li>MySQL 5.1+ or any version of MariaDB database server</li>
<li>php5-intl package (for international behaviour support)</li>
<li>php5-mbstring package (for international behaviour support)</li>

@ -78,7 +78,7 @@ Chamilo is mainly a LMS running (the so called <span style="font-weight: bold;">
<ul>
<li><span style="font-weight: bold;">Apache 2.2+</span></li>
<li><span style="font-weight: bold;">MySQL 5.1+ or MariaDB 5+</span></li>
<li><span style="font-weight: bold;">PHP 5.4+ (5.6 recommended for greater efficiency) (support for PHP7 seems OK but not evaluated on high load setups just yet)</span></li>
<li><span style="font-weight: bold;">PHP 5.5+ (5.6 recommended for greater efficiency) (support for PHP7 seems OK but not evaluated on high load setups just yet)</span></li>
</ul>
<br />
All these pieces of software are free software and freely available. <br /><br />

@ -86,7 +86,7 @@
Chamilo puede ser instalado indiferentemente en servidores Windows, Linux, Mac OS X y UNIX. Sin embargo, nosotros recomendamos el uso de un servidor Linux para una óptima flexibilidad, control remoto y escalabilidad.
</p>
<p>
Chamilo es fundamentalmente un LMS que se ejecuta con Apache (2.2+), MySQL 5.1+ (o MariaDB) y PHP 5.4+ (trilogía también llamada AMP).
Chamilo es fundamentalmente un LMS que se ejecuta con Apache (2.2+), MySQL 5.1+ (o MariaDB) y PHP 5.5+ (trilogía también llamada AMP).
</p>
<p>
Todo este software es software de código abierto y está disponible libremente.

@ -80,7 +80,7 @@
Chamilo est un système de gestion de l'apprentissage (LMS) qui fonctionne
principallement sur base d'un <span style="font-weight: bold;">serveur web (Apache 2.2+)</span>, de <span style="font-weight: bold;">MySQL 5.1+ ou de MariaDB 5+
(5 ou 10)</span> et de <span style="font-weight: bold;">PHP 5.4+</span> (le support de PHP 7 n'a pas été pleinement testé). <br />
(5 ou 10)</span> et de <span style="font-weight: bold;">PHP 5.5+</span> (le support de PHP 7 n'a pas été pleinement testé). <br />
<br />

@ -73,7 +73,7 @@
<p class="p8"><span class="s1"></span><br></p>
<p class="p2"><span class="s1"><b>Chamilo</b> può essere installato indifferentemente su server Windows, Linux, Mac OS X e Unix. Tuttavia raccomandiamo l’utilizzo di server Linux per sfruttarne al meglio le caratteristiche di flessibilità, controllo remoto e scalabilità.</span></p>
<p class="p3"><span class="s1"></span><br></p>
<p class="p2"><span class="s1"><b>Chamilo</b> è principalmente un <b>LMS (Learning Management System)</b> che gira sulla piattaforma composta da <b>Apache (1.3,2.0 or 2.2)</b>, <b>MySQL 5.1 (o MariaDB</b>) e <b>PHP 5.4, 5.5 o 5.6</b>, meglio nota come piattaforma <b>AMP</b>.</span></p>
<p class="p2"><span class="s1"><b>Chamilo</b> è principalmente un <b>LMS (Learning Management System)</b> che gira sulla piattaforma composta da <b>Apache (1.3,2.0 or 2.2)</b>, <b>MySQL 5.1 (o MariaDB</b>) e <b>PHP 5.5 o 5.6</b>, meglio nota come piattaforma <b>AMP</b>.</span></p>
<p class="p3"><span class="s1"></span><br></p>
<p class="p2"><span class="s1">Tutti questi software sono gratuiti e liberamente scaricabili.</span></p>
<p class="p3"><span class="s1"></span><br></p>

@ -24,12 +24,12 @@ api_protect_course_script(true);
$actions = array('listing', 'add', 'edit', 'delete', 'history');
$action = 'listing';
if (isset($_GET['action']) && in_array($_GET['action'], $actions)) {
$action = $_GET['action'];
$action = $_GET['action'];
}
$description_type = '';
if (isset($_GET['description_type'])) {
$description_type = intval($_GET['description_type']);
$description_type = intval($_GET['description_type']);
}
$id = null;

@ -11,7 +11,7 @@
api_protect_course_script(true);
// Header
Display :: display_header('');
Display::display_header('');
// Introduction section
Display::display_introduction_section(TOOL_COURSE_DESCRIPTION);
@ -23,4 +23,4 @@ Event::event_access_tool(TOOL_COURSE_DESCRIPTION);
echo $content;
// Footer
Display :: display_footer();
Display::display_footer();

@ -18,27 +18,27 @@ if (api_is_allowed_to_edit(null, true)) {
}
$categories[ADD_BLOCK] = get_lang('NewBloc');
$i = 1;
echo '<div class="actions" style="margin-bottom:30px">';
ksort($categories);
foreach ($categories as $id => $title) {
if ($i == ADD_BLOCK) {
echo '<a href="index.php?'.api_get_cidreq().'&action=add">'.
$i = 1;
echo '<div class="actions" style="margin-bottom:30px">';
ksort($categories);
foreach ($categories as $id => $title) {
if ($i == ADD_BLOCK) {
echo '<a href="index.php?'.api_get_cidreq().'&action=add">'.
Display::return_icon($default_description_icon[$id], $title, '', ICON_SIZE_MEDIUM).'</a>';
break;
} else {
echo '<a href="index.php?action=edit&'.api_get_cidreq().'&description_type='.$id.'">'.
break;
} else {
echo '<a href="index.php?action=edit&'.api_get_cidreq().'&description_type='.$id.'">'.
Display::return_icon($default_description_icon[$id], $title, '', ICON_SIZE_MEDIUM).'</a>';
$i++;
}
}
echo '</div>';
$i++;
}
}
echo '</div>';
}
$history = isset($history) ? $history : null;
// display course description list
if ($history) {
echo '<div>
echo '<div>
<table width="100%">
<tr>
<td><h3>'.get_lang('ThematicAdvanceHistory').'</h3></td>
@ -49,7 +49,7 @@ if ($history) {
$user_info = api_get_user_info();
if (isset($descriptions) && count($descriptions) > 0) {
foreach ($descriptions as $id => $description) {
foreach ($descriptions as $id => $description) {
if (!empty($description)) {
$actions = '';
if (api_is_allowed_to_edit(null, true) && !$history) {

@ -1,5 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Document quota management script
* @package chamilo.document

@ -343,9 +343,10 @@ function return_navigation_array()
if (true) {
$params = array('variable = ? AND subkey = ?' => ['status', 'studentfollowup']);
$result = api_get_settings_params_simple($params);
$plugin = StudentFollowUpPlugin::create();
if (!empty($result) && $result['selected_value'] === 'installed') {
$navigation['follow_up']['url'] = api_get_path(WEB_PLUGIN_PATH).'studentfollowup/posts.php';
$navigation['follow_up']['title'] = get_lang('MyDossier');
$navigation['follow_up']['title'] = $plugin->get_lang('CareDetailView');
$navigation['follow_up']['key'] = 'homepage';
$navigation['follow_up']['icon'] = 'homepage.png';
}
@ -363,8 +364,7 @@ function return_navigation_array()
// Reports
if (!empty($possible_tabs['reports'])) {
if (api_get_setting('show_tabs', 'reports') == 'true') {
if (
(api_is_platform_admin() || api_is_drh() || api_is_session_admin())
if ((api_is_platform_admin() || api_is_drh() || api_is_session_admin())
&& Rights::hasRight('show_tabs:reports')
) {
$navigation['reports'] = $possible_tabs['reports'];

@ -427,6 +427,7 @@ class Template
$show_course_navigation_menu = null;
if (!empty($this->course_id) && $this->user_is_logged_in) {
if (api_get_setting('show_toolshortcuts') != 'false') {
//Course toolbar
$show_course_shortcut = CourseHome::show_navigation_tool_shortcuts();

@ -2918,8 +2918,7 @@ function finishInstallation(
$files = $finder->files()->in($path);
// Needed for chash
$sql = 'CREATE TABLE IF NOT EXISTS version (id int unsigned NOT NULL AUTO_INCREMENT, version varchar(255), PRIMARY KEY(id), UNIQUE(version));';
Database::query($sql);
createVersionTable();
foreach ($files as $version) {
$version = str_replace(['Version', '.php'], '', $version->getFilename());
@ -2928,6 +2927,24 @@ function finishInstallation(
}
}
/**
* Creates 'version' table
*/
function createVersionTable()
{
$sql = getVersionTable();
Database::query($sql);
}
/**
* Get version creation table query
* @return string
*/
function getVersionTable()
{
return 'CREATE TABLE IF NOT EXISTS version (id int unsigned NOT NULL AUTO_INCREMENT, version varchar(20), PRIMARY KEY(id), UNIQUE(version));';
}
/**
* Update settings based on installation profile defined in a JSON file
* @param string $installationProfile The name of the JSON file in main/install/profiles/ folder

@ -32,12 +32,10 @@ if (isset($_POST) && $is_error) {
);
return false;
unset($_FILES['user_file']);
} else if ($_SERVER['REQUEST_METHOD'] == 'POST' && count($_FILES) > 0 && !empty($_FILES['user_file']['name'])) {
} elseif ($_SERVER['REQUEST_METHOD'] == 'POST' && count($_FILES) > 0 && !empty($_FILES['user_file']['name'])) {
// A file upload has been detected, now deal with the file...
// Directory creation.
$stopping_error = false;
$s = $_FILES['user_file']['name'];
// Get name of the zip file without the extension.
@ -47,7 +45,10 @@ if (isset($_POST) && $is_error) {
$file_base_name = str_replace('.'.$extension, '', $filename);
$new_dir = api_replace_dangerous_char(trim($file_base_name));
$type = learnpath::get_package_type($_FILES['user_file']['tmp_name'], $_FILES['user_file']['name']);
$type = learnpath::get_package_type(
$_FILES['user_file']['tmp_name'],
$_FILES['user_file']['name']
);
$proximity = 'local';
if (!empty($_REQUEST['content_proximity'])) {

@ -34,6 +34,11 @@
</div>
{% endif %}
{% include template ~ "/layout/page_header.tpl" %}
{% if show_course_shortcut is not null %}
<div class="nav-tools">
{{ show_course_shortcut }}
</div>
{% endif %}
<section id="content-section">
<div class="container">
{% block breadcrumb %}

@ -5,4 +5,6 @@ $strings['plugin_comment'] = "Care system (Zorgdossier) [CS]
Career follow system (Structuurschema) [CFS]
Competence based evaluation system (Competentie evaluatie systeem) [CBES]";
$strings['tool_enable'] = 'Enable plugin';
$strings['CareDetailView'] = 'Care detail view';

@ -35,27 +35,37 @@ if ($showPrivate == false) {
$criteria->andWhere(Criteria::expr()->eq('id', $postId));
$qb
->select('p')
->select('distinct p')
->from('ChamiloPluginBundle:StudentFollowUp\CarePost', 'p')
->addCriteria($criteria)
->setMaxResults(1)
;
$query = $qb->getQuery();
/** @var CarePost $post */
$post = $query->getOneOrNullResult();
// Get related posts (post with same parent)
$relatedPosts = [];
if ($post && !empty($post->getParent())) {
if ($post) {
$qb = $em->createQueryBuilder();
$criteria = Criteria::create();
if (!empty($post->getParent())) {
$criteria->where(Criteria::expr()->in('parent', [$post->getParent()->getId(), $post->getId()]));
} else {
$criteria->where(Criteria::expr()->eq('parent', $post->getId()));
}
if ($showPrivate == false) {
$criteria->andWhere(Criteria::expr()->eq('private', false));
}
$criteria->andWhere(Criteria::expr()->eq('parent', $post->getParent()));
$criteria->andWhere(Criteria::expr()->neq('id', $post->getId()));
$criteria->orWhere(Criteria::expr()->eq('id', $post->getId()));
$qb
->select('p')
->distinct()
->from('ChamiloPluginBundle:StudentFollowUp\CarePost', 'p')
->addCriteria($criteria)
->orderBy('p.createdAt', 'desc')
@ -63,6 +73,7 @@ if ($post && !empty($post->getParent())) {
$query = $qb->getQuery();
$relatedPosts = $query->getResult();
}
//var_dump($post->getTitle());
$tpl = new Template($plugin->get_lang('plugin_title'));
$tpl->assign('post', $post);
@ -77,6 +88,8 @@ $tpl->assign(
)
);
$tpl->assign('information_icon', Display::return_icon('info.png'));
$tpl->assign('student_info', api_get_user_info($studentId));
$tpl->assign('care_title', $plugin->get_lang('CareDetailView'));
$content = $tpl->fetch('/'.$plugin->get_name().'/view/post.html.twig');
// Assign into content

@ -36,6 +36,7 @@ $pageSize = 2;
$qb
->select('p')
->distinct()
->from('ChamiloPluginBundle:StudentFollowUp\CarePost', 'p')
->addCriteria($criteria)
->setFirstResult($pageSize * ($currentPage - 1))
@ -48,6 +49,7 @@ $posts = new Paginator($query, $fetchJoinCollection = true);
$totalItems = count($posts);
$pagesCount = ceil($totalItems / $pageSize);
$pagination = '';
$url = api_get_self().'?student_id='.$studentId;
if ($totalItems > 1) {
@ -70,8 +72,9 @@ $tpl->assign('current_url', $url);
$url = api_get_path(WEB_PLUGIN_PATH).'studentfollowup/post.php?student_id='.$studentId;
$tpl->assign('post_url', $url);
$tpl->assign('information_icon', Display::return_icon('info.png'));
$tpl->assign('student_info', api_get_user_info($studentId));
$tpl->assign('pagination', $pagination);
$tpl->assign('care_title', $plugin->get_lang('CareDetailView'));
$content = $tpl->fetch('/'.$plugin->get_name().'/view/posts.html.twig');
// Assign into content
$tpl->assign('content', $content);

@ -14,31 +14,24 @@
{% if countElements > 1 %}
{{ information_icon }} + {{ countElements }}
{% else %}
{{ information_icon }}
{{ information_icon }} + 1
{% endif %}
</a>
{% endif %}
{% if post.parent %}
<h3>Parent</h3>
<a href="{{ post_url }}&post_id={{ post.parent.id }}">
{{ post.parent.title }}
</a>
{% endif %}
{% endif %}
{% if type == 'all' %}
{% if related_posts %}
<h3>Related</h3>
{% for post in related_posts %}
<p>
<a href="{{ post_url }}&post_id={{ post.id }}">
{{ post.title }}
</a>
</p>
{% endfor %}
{% endif %}
{% endif %}
{#{% if type == 'all' %}#}
{#{% if related_posts %}#}
{#<h3>Related</h3>#}
{#{% for post in related_posts %}#}
{#<p>#}
{#<a href="{{ post_url }}&post_id={{ post.id }}">#}
{#{{ post.title }}#}
{#</a>#}
{#</p>#}
{#{% endfor %}#}
{#{% endif %}#}
{#{% endif %}#}
</div>
<div class="col-md-4">
@ -60,15 +53,15 @@
</div>
</div>
</div>
{% if post.children.count %}
{% for child in post.children %}
{{ _self.post_template('all', child) }}
{#<a href="{{ post_url }}&post_id={{ child.id }}">#}
{#{{ child.title }}#}
{#</a>#}
{% endfor %}
{% endif %}
{#{% if type == 'all' %}#}
{#{% if post.children.count %}#}
{#{% for child in post.children %}#}
{#{% if child.id != post.id %}#}
{#{{ _self.post_template('all', child) }}#}
{#{% endif %}#}
{#{% endfor %}#}
{#{% endif %}#}
{#{% endif %}#}
{% endif %}
{% endmacro %}
@ -78,6 +71,15 @@
{{ back_link }}
</div>
<h2 class="text-center">Care detail view</h2>
<h2 class="text-center">
{{ care_title }} - {{ student_info.complete_name }} - {{ post.title }}
{% if post.parent %}
{{ post.parent.title }}
{% endif %}
</h2>
{% for post in related_posts %}
{{ template.post_template('all', post, information_icon, post_url, current_url) }}
{% endfor %}
{{ template.post_template('all', post, information_icon, post_url, current_url, related_posts) }}
{#{{ template.post_template('all', post, information_icon, post_url, current_url, related_posts) }}#}

@ -1,6 +1,6 @@
{% import 'studentfollowup/view/post.html.twig' as template %}
<h2 class="text-center">Care detail view</h2>
<h2 class="text-center">{{ care_title }} - {{ student_info.complete_name }}</h2>
{% if posts %}
{% for post in posts %}
{{ template.post_template('simple', post, information_icon, post_url, current_url) }}

@ -1759,8 +1759,8 @@ class CourseRestorer
'c_id' => $this->destination_course_id,
'title' => self::DBUTF8($quiz->title),
'description' => ($quiz->description === false ? '' : self::DBUTF8($quiz->description)),
'type' => isset($quiz->quiz_type) ? $quiz->quiz_type : $quiz->type,
'random' => $quiz->random,
'type' => isset($quiz->quiz_type) ? (int) $quiz->quiz_type : $quiz->type,
'random' => (int) $quiz->random,
'active' => $quiz->active,
'sound' => self::DBUTF8($doc),
'max_attempt' => (int) $quiz->max_attempt,
@ -1769,10 +1769,10 @@ class CourseRestorer
'pass_percentage' => $quiz->pass_percentage,
'feedback_type' => (int) $quiz->feedback_type,
'random_answers' => (int) $quiz->random_answers,
'random_by_category' => $quiz->random_by_category,
'review_answers' => $quiz->review_answers,
'propagate_neg' => $quiz->propagate_neg,
'text_when_finished' => $quiz->text_when_finished,
'random_by_category' => (int) $quiz->random_by_category,
'review_answers' => (int) $quiz->review_answers,
'propagate_neg' => (int) $quiz->propagate_neg,
'text_when_finished' => (string) $quiz->text_when_finished,
'expired_time' => (int) $quiz->expired_time,
'start_time' => $quiz->start_time,
'end_time' => $quiz->end_time,

Loading…
Cancel
Save