diff --git a/core/class/layout.class.php b/core/class/layout.class.php index 595852c..f70c31d 100644 --- a/core/class/layout.class.php +++ b/core/class/layout.class.php @@ -904,7 +904,7 @@ class layout extends common $leftItems .= '
'; } diff --git a/core/module/course/course.php b/core/module/course/course.php index c963284..3681be4 100644 --- a/core/module/course/course.php +++ b/core/module/course/course.php @@ -70,7 +70,7 @@ class course extends common public function index() { - $courseIdShortTitle = helper::arrayColumn($this->getData(['course']), 'shortTitle'); + $courseIdShortTitle = helper::arrayColumn($this->getData(['course']), 'title'); ksort($courseIdShortTitle); foreach ($courseIdShortTitle as $courseId => $courseTitle) { $categorieUrl = helper::baseUrl(!helper::checkRewrite()) . 'course/swap/' . $courseId; @@ -146,7 +146,7 @@ class course extends common $courseId, [ 'title' => $this->getInput('courseAddTitle', helper::FILTER_STRING_SHORT, true), - 'shortTitle' => $this->getInput('courseAddShortTitle', helper::FILTER_STRING_SHORT, true), + 'title' => $this->getInput('courseAddShortTitle', helper::FILTER_STRING_SHORT, true), 'author' => $this->getInput('courseAddAuthor'), 'homePageId' => 'accueil', 'category' => $this->getInput('courseAddCategories'), @@ -201,8 +201,7 @@ class course extends common 'course', $courseId, [ - 'title' => $this->getInput('courseEditTitle', helper::FILTER_STRING_SHORT, true), - 'shortTitle' => $this->getInput('courseEditShortTitle', helper::FILTER_STRING_SHORT, true), + 'title' => $this->getInput('courseEditShortTitle', helper::FILTER_STRING_SHORT, true), 'author' => $this->getInput('courseEditAuthor'), 'homePageId' => $this->getInput('courseEditHomePageId'), 'category' => $this->getInput('courseEditCategories'), @@ -601,7 +600,7 @@ class course extends common $to = helper::dateUTF8('%d %B %Y', $this->getData(['course', $courseId, 'closingDate']), self::$i18nUI) . helper::translate(' à ') . helper::dateUTF8('%H:%M', $this->getData(['course', $courseId, 'closingDate']), self::$i18nUI); $message = sprintf(helper::translate('Ce cours ferme le %s'), $to); } else { - $message = sprintf(helper::translate('Bienvenue dans le cours %s'), $this->getData(['course', $courseId, 'shortTitle'])); + $message = sprintf(helper::translate('Bienvenue dans le cours %s'), $this->getData(['course', $courseId, 'title'])); } $_SESSION['ZWII_SITE_CONTENT'] = $courseId; } @@ -676,7 +675,7 @@ class course extends common foreach ($history['history'] as $pageId => $time) { self::$userHistory[$pageId] = [ helper::dateUTF8('%d %B %Y - %H:%M:%S', $time), - $pages['page'][$pageId]['shortTitle'], + $pages['page'][$pageId]['title'], ]; } @@ -764,7 +763,7 @@ class course extends common } // Valeurs en sortie $this->addOutput([ - 'title' => sprintf(helper::translate('Accéder au cours %s'), $this->getData(['course', $this->getUrl(2), 'shortTitle'])), + 'title' => sprintf(helper::translate('Accéder au cours %s'), $this->getData(['course', $this->getUrl(2), 'title'])), 'view' => 'enrol', 'display' => self::DISPLAY_LAYOUT_LIGHT, ]); diff --git a/core/module/course/view/edit/edit.php b/core/module/course/view/edit/edit.php index dd8b74c..73ad481 100644 --- a/core/module/course/view/edit/edit.php +++ b/core/module/course/view/edit/edit.php @@ -17,19 +17,11 @@- signature($courseValue['author']); ?> + signature($courseValue['author'])); ?>
- getData(['module', $this->getUrl(0), 'config', 'author']) === true): ?> + getData(['module', $this->getUrl(0), 'config', 'access']) === true): ?>- - + getData(['module', $this->getUrl(0), 'config', 'openingdate']) === true): ?> +
+ +
+ getData(['module', $this->getUrl(0), 'config', 'closingdate']) === true): ?> ++ +
+ + diff --git a/module/courses/courses.php b/module/workshop/workshop.php similarity index 91% rename from module/courses/courses.php rename to module/workshop/workshop.php index 5a1ee18..69495e0 100644 --- a/module/courses/courses.php +++ b/module/workshop/workshop.php @@ -13,7 +13,7 @@ * @link http://zwiicms.fr/ */ -class courses extends common +class workshop extends common { const VERSION = '1.0'; const REALNAME = 'Liste des cours'; @@ -68,12 +68,11 @@ class courses extends common [ 'category' => $this->getInput('coursesConfigCategories'), 'title' => $this->getInput('coursesConfigShowTitle', helper::FILTER_BOOLEAN), - 'shortTitle' => $this->getInput('coursesConfigShowShortTitle', helper::FILTER_BOOLEAN), 'author' => $this->getInput('coursesConfigShowAuthor', helper::FILTER_BOOLEAN), 'description' => $this->getInput('coursesConfigShowDescription', helper::FILTER_BOOLEAN), 'access' => $this->getInput('coursesConfigShowAccess', helper::FILTER_BOOLEAN), - 'opening' => $this->getInput('coursesConfigShowOpening', helper::FILTER_BOOLEAN), - 'closing' => $this->getInput('coursesConfigShowClosing', helper::FILTER_BOOLEAN), + 'openingdate' => $this->getInput('coursesConfigShowOpeningDate', helper::FILTER_BOOLEAN), + 'closingdate' => $this->getInput('coursesConfigShowClosingDate', helper::FILTER_BOOLEAN), 'enrolment' => $this->getInput('coursesConfigShowEnrolment', helper::FILTER_BOOLEAN), 'urlText' => $this->getInput('coursesConfigUrlText', helper::FILTER_STRING_SHORT), 'layout' => $this->getInput('coursesConfigLayout', helper::FILTER_INT),