Skip to content
Snippets Groups Projects
Commit 21663f52 authored by Thomas Fradet's avatar Thomas Fradet
Browse files

bugs divers

parent ab66ac19
No related branches found
No related tags found
No related merge requests found
......@@ -103,3 +103,80 @@ Lors de l'envoi d'un message à certains étudiants sélectionnés, si aucun des
Correction du fait que le filtre affichait >=0 au lieu de >0.
# 23/05/2019
__MAJ en 3.7__
__Bugs__
## 1
NaN dans le tableau d'achèvement quand pas d'activité. Idée : buter le NaN définitivement avec si NaN alors "-" => fuck off
__à tester__
## 2
Warning: include(../../lib.php): failed to open stream: No such file or directory in /Applications/MAMP/htdocs/moodle37/course/format/iena/entity/course_format_iena_cron_action.php on line 37
Warning: include(): Failed opening '../../lib.php' for inclusion (include_path='/Applications/MAMP/htdocs/moodle37/lib/pear:.:/Applications/MAMP/bin/php/php7.2.10/lib/php') in /Applications/MAMP/htdocs/moodle37/course/format/iena/entity/course_format_iena_cron_action.php on line 37
Warning: include(../../../../config.php): failed to open stream: No such file or directory in /Applications/MAMP/htdocs/moodle37/course/format/iena/entity/course_format_iena_cron_action.php on line 38
Warning: include(): Failed opening '../../../../config.php' for inclusion (include_path='/Applications/MAMP/htdocs/moodle37/lib/pear:.:/Applications/MAMP/bin/php/php7.2.10/lib/php') in /Applications/MAMP/htdocs/moodle37/course/format/iena/entity/course_format_iena_cron_action.php on line 38
Les fichiers ne sont plus inclus car ils le sont dans course/view.php qui devrait se charger d'inclure à son tout le reste.
[ ] tester si les crons fonctionnent toujours et si oui, classer le bug.
## __Bugs résolus__
## 3
Clef numsection manquante sur l'objet cours. Suppression de l'appel à cette clef car dans le format de cours topic ils utilisent 0 pour ne pas recréer de sections. Question : à quoi ça sert ?
Test : créé un nouveau cours avec cette modification : OK
Test : changer le nombre de sections avec cette modification : OK
Avant : course_create_sections_if_missing($course, range(0, $course->numsections));
Après : course_create_sections_if_missing($course, 0);
[x] Solved.
## 4
Typo numsections au lieu de $numsections dans une condition dont l'intérieur n'était pas utilisé.
La condition elle-même est commentée et le $ est ajouté.
[x] Solved.
## 5
Notice: Undefined offset: 0 in /Applications/MAMP/htdocs/moodle37/course/format/iena/renderer.php on line 788
Avant : $nameSection[$section] .= $this->section_title_without_link($thissection, $course);
Après : $nameSection[$section] = $this->section_title_without_link($thissection, $course);
[x] Solved.
ET
Notice: Undefined offset: 0 in /Applications/MAMP/htdocs/moodle37/course/format/iena/renderer.php on line 796
Avant : $introSection[$section] .= $this->section_header($thissection, $course, false, 0, true);
Après : $introSection[$section] = $this->section_header($thissection, $course, false, 0, true);
[x] Solved.
## 6
Notice: Undefined property: stdClass::$showdefaultsectionname in /Applications/MAMP/htdocs/moodle37/course/format/iena/renderer.php on line 102
Commenté : sert à rien et la property n'existe pas. Pas présent dans le code de base du format topic.
[x] Solved.
......@@ -34,8 +34,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
include('../../lib.php');
include('../../../../config.php');
// include('../../lib.php');
// include('../../../../config.php');
class course_format_iena_cron_action
......
......@@ -57,7 +57,8 @@
course_set_marker($course->id, $marker);
}
$course = course_get_format($course)->get_course();
course_create_sections_if_missing($course, range(0, $course->numsections));
// course_create_sections_if_missing($course, range(0, $course->numsections));
course_create_sections_if_missing($course, 0);
$renderer = $PAGE->get_renderer('format_iena');
if (!empty($displaysection)) {
$renderer->print_single_section_page($course, null, null, null, null, $displaysection);
......
......@@ -99,9 +99,9 @@
if ($PAGE->user_is_editing()) {
$o .= $this->output->heading($sectionname, 3, 'sectionname' . $classes);
}
if ($course->showdefaultsectionname) {
$o .= $this->output->heading($sectionname, 3, 'sectionname' . $classes);
}
// if ($course->showdefaultsectionname) {
// $o .= $this->output->heading($sectionname, 3, 'sectionname' . $classes);
// }
// if (!$iena) { $o .= $sectionname; }
$context = context_course::instance($course->id);
......@@ -744,7 +744,7 @@ public function print_iena_section_pages($course)
$sectionvisible = 1;
}
$htmlsection = false;
$nameSection = false;
$nameSection = [];
$idSection = false;
$introSection = false;
//var_dump($modinfo->get_section_info_all());die;
......@@ -763,10 +763,10 @@ public function print_iena_section_pages($course)
$numsections = course_get_format($course)->get_last_section_number();
// var_dump($numsections);
if ($section > numsections) {
// if ($section > $course->numsections) {
// continue;
}
// if ($section > $numsections) {
// // if ($section > $course->numsections) {
// // continue;
// }
/* if is not editing verify the rules to display the sections */
if (!$PAGE->user_is_editing() && (!has_capability('moodle/course:viewhiddensections', $context = context_course::instance($course->id), $USER->id))) {
if ($course->hiddensections && !(int)$thissection->visible) {
......@@ -785,13 +785,14 @@ public function print_iena_section_pages($course)
//Affiche le nom de la section en mode propre sans lien
$idSection[$section] = $thissection->id;
$nameSection[$section] .= $this->section_title_without_link($thissection, $course);
// $nameSection[$section] .= $this->section_title_without_link($thissection, $course);
$nameSection[$section] = $this->section_title_without_link($thissection, $course);
if ($PAGE->user_is_editing()) {
$htmlsection[$section] .= $this->section_header($thissection, $course, false, 0);
}
//$htmlsection[$section] .= $this->section_title($thissection,$course);
//$introSection[$section] .= $this->section_header($thissection, $course, false, 0);
$introSection[$section] .= $this->section_header($thissection, $course, false, 0, true);
$introSection[$section] = $this->section_header($thissection, $course, false, 0, true);
if ($thissection->uservisible) {
/* Ne pas enlever sinon le activity chooser ne fonctionne pas en JS */
$htmlsection[$section] .= "<div class='content'>";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment