|
|
@ -1,4 +1,5 @@ |
|
|
|
<?php |
|
|
|
<?php |
|
|
|
|
|
|
|
|
|
|
|
/* For licensing terms, see /license.txt */ |
|
|
|
/* For licensing terms, see /license.txt */ |
|
|
|
|
|
|
|
|
|
|
|
use Chamilo\CourseBundle\Entity\CExerciseCategory; |
|
|
|
use Chamilo\CourseBundle\Entity\CExerciseCategory; |
|
|
@ -103,7 +104,7 @@ class ExerciseCategoryManager extends Model |
|
|
|
$table = Database::get_course_table(TABLE_QUIZ_TEST); |
|
|
|
$table = Database::get_course_table(TABLE_QUIZ_TEST); |
|
|
|
$id = (int) $id; |
|
|
|
$id = (int) $id; |
|
|
|
|
|
|
|
|
|
|
|
$sql = "UPDATE $table SET exercise_category_id = 0 |
|
|
|
$sql = "UPDATE $table SET exercise_category_id = 0 |
|
|
|
WHERE c_id = $courseId AND exercise_category_id = $id"; |
|
|
|
WHERE c_id = $courseId AND exercise_category_id = $id"; |
|
|
|
Database::query($sql); |
|
|
|
Database::query($sql); |
|
|
|
} |
|
|
|
} |
|
|
@ -117,7 +118,6 @@ class ExerciseCategoryManager extends Model |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public function save($params, $showQuery = false) |
|
|
|
public function save($params, $showQuery = false) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$courseId = api_get_course_int_id(); |
|
|
|
|
|
|
|
$em = Database::getManager(); |
|
|
|
$em = Database::getManager(); |
|
|
|
$category = new CExerciseCategory(); |
|
|
|
$category = new CExerciseCategory(); |
|
|
|
$category |
|
|
|
$category |
|
|
@ -176,7 +176,7 @@ JAVASCRIPT; |
|
|
|
</a> |
|
|
|
</a> |
|
|
|
JAVASCRIPT; |
|
|
|
JAVASCRIPT; |
|
|
|
|
|
|
|
|
|
|
|
return "function action_formatter(cellvalue, options, rowObject) { |
|
|
|
return "function action_formatter(cellvalue, options, rowObject) { |
|
|
|
return '$editButton $deleteButton'; |
|
|
|
return '$editButton $deleteButton'; |
|
|
|
}"; |
|
|
|
}"; |
|
|
|
} |
|
|
|
} |
|
|
|