Portfolio: Fix lang var + set null on delete - refs BT#14560

pull/2585/head
Angel Fernando Quiroz Campos 7 years ago
parent daea8c6eb7
commit 83840528ca
  1. 2
      main/install/configuration.dist.php
  2. 2
      main/portfolio/edit_item.php
  3. 4
      main/portfolio/index.php
  4. 2
      src/Chamilo/CoreBundle/Entity/Portfolio.php

@ -820,7 +820,7 @@ CREATE TABLE portfolio_category (id INT AUTO_INCREMENT NOT NULL, user_id INT NOT
ALTER TABLE portfolio ADD CONSTRAINT FK_A9ED1062A76ED395 FOREIGN KEY (user_id) REFERENCES user (id);
ALTER TABLE portfolio ADD CONSTRAINT FK_A9ED106291D79BD3 FOREIGN KEY (c_id) REFERENCES course (id);
ALTER TABLE portfolio ADD CONSTRAINT FK_A9ED1062613FECDF FOREIGN KEY (session_id) REFERENCES session (id);
ALTER TABLE portfolio ADD CONSTRAINT FK_A9ED106212469DE2 FOREIGN KEY (category_id) REFERENCES portfolio_category (id);
ALTER TABLE portfolio ADD CONSTRAINT FK_A9ED106212469DE2 FOREIGN KEY (category_id) REFERENCES portfolio_category (id) ON DELETE SET NULL;
ALTER TABLE portfolio_category ADD CONSTRAINT FK_7AC64359A76ED395 FOREIGN KEY (user_id) REFERENCES user (id);
INSERT INTO settings_current(variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES('course_create_active_tools','portfolio','checkbox','Tools','true','CourseCreateActiveToolsTitle','CourseCreateActiveToolsComment',NULL,'Portfolio', 0);
*/

@ -39,7 +39,7 @@ if ($form->validate()) {
$em->flush();
Display::addFlash(
Display::return_message(get_lang('Updated'), 'success')
Display::return_message(get_lang('ItemUpdated'), 'success')
);
header("Location: $baseUrl");

@ -133,7 +133,7 @@ switch ($action) {
$em->flush();
Display::addFlash(
Display::return_message(get_lang('PortfolioItemDeleted'), 'success')
Display::return_message(get_lang('CategoryDeleted'), 'success')
);
header("Location: $baseUrl");
@ -201,7 +201,7 @@ switch ($action) {
$em->flush();
Display::addFlash(
Display::return_message(get_lang('PortfolioItemDeleted'), 'success')
Display::return_message(get_lang('ItemDeleted'), 'success')
);
header("Location: $baseUrl");

@ -96,7 +96,7 @@ class Portfolio
* @var \Chamilo\CoreBundle\Entity\PortfolioCategory
*
* @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\PortfolioCategory", inversedBy="items")
* @ORM\JoinColumn(name="category_id", referencedColumnName="id")
* @ORM\JoinColumn(name="category_id", referencedColumnName="id", onDelete="SET NULL")
*/
private $category;

Loading…
Cancel
Save