diff --git a/main/admin/course_list.php b/main/admin/course_list.php
index 139dd33493..7c2d23e01a 100644
--- a/main/admin/course_list.php
+++ b/main/admin/course_list.php
@@ -231,7 +231,7 @@ if (isset ($_GET['search']) && $_GET['search'] == 'advanced') {
break;
}
}
- if (isset ($_GET['delete_course'])) {
+ if (isset($_GET['delete_course'])) {
CourseManager::delete_course($_GET['delete_course']);
$obj_cat = new Category();
$obj_cat->update_category_delete($_GET['delete_course']);
diff --git a/main/exercice/exercise.class.php b/main/exercice/exercise.class.php
index f909d3e1d4..14ea17240a 100644
--- a/main/exercice/exercise.class.php
+++ b/main/exercice/exercise.class.php
@@ -4975,6 +4975,8 @@ class Exercise
/**
* Returns an array with this form
+ * @example
+ *
* array (size=3)
999 =>
array (size=3)
@@ -4988,6 +4990,7 @@ class Exercise
101 =>
array (size=1)
0 => int 3482
+ *
* The array inside the key 999 means the question list that belongs to the media id = 999,
* this case is special because 999 means "no media".
* @return array
@@ -4998,7 +5001,7 @@ class Exercise
}
/**
- *Is media question activated
+ * Is media question activated
* @return bool
*/
public function mediaIsActivated()
@@ -5023,25 +5026,56 @@ class Exercise
/**
* Gets question list from the exercise
* (true show all questions, false show media question id instead of the question ids)
+ * @return array
*/
public function getQuestionList()
{
return $this->questionList;
}
+ /**
+ * Question list with medias compressed like this
+ * @example
+ *
+ * array(
+ * question_id,
+ * question_id,
+ * media_id, <- this media id contains question ids
+ * question_id,
+ * )
+ *
+ * @return array
+ */
public function getQuestionListWithMediasCompressed()
{
return $this->questionList;
}
+ /**
+ * Question list with medias uncompressed like this
+ * @example
+ *
+ * array(
+ * question_id,
+ * question_id,
+ * question_id, <- belongs to a media id
+ * question_id, <- belongs to a media id
+ * question_id,
+ * )
+ *
+ * @return array
+ */
public function getQuestionListWithMediasUncompressed()
{
return $this->questionListUncompressed;
}
+ /**
+ * Sets the question list when the exercise->read() is executed created depending of a parameter
+ */
public function setQuestionList()
{
- //Getting question list
+ // Getting question list.
$questionList = $this->selectQuestionList(true);
$this->setMediaList($questionList);
diff --git a/main/exercice/question_list_admin.inc.php b/main/exercice/question_list_admin.inc.php
index d220b8a59c..8f5d54e5cc 100644
--- a/main/exercice/question_list_admin.inc.php
+++ b/main/exercice/question_list_admin.inc.php
@@ -109,6 +109,7 @@ echo Question::getMediaLabels();
// If we are in a test.
$inATest = isset($exerciseId) && $exerciseId > 0;
+
if (!$inATest) {
echo "