Minor - adding comments

skala
Julio Montoya 13 years ago
parent 3d774d47e4
commit 6dcd20b9bf
  1. 2
      main/admin/course_list.php
  2. 38
      main/exercice/exercise.class.php
  3. 2
      main/exercice/question_list_admin.inc.php
  4. 2
      main/inc/lib/extra_field.lib.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']);

@ -4975,6 +4975,8 @@ class Exercise
/**
* Returns an array with this form
* @example
* <code>
* array (size=3)
999 =>
array (size=3)
@ -4988,6 +4990,7 @@ class Exercise
101 =>
array (size=1)
0 => int 3482
* </code>
* 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
* <code>
* array(
* question_id,
* question_id,
* media_id, <- this media id contains question ids
* question_id,
* )
* </code>
* @return array
*/
public function getQuestionListWithMediasCompressed()
{
return $this->questionList;
}
/**
* Question list with medias uncompressed like this
* @example
* <code>
* array(
* question_id,
* question_id,
* question_id, <- belongs to a media id
* question_id, <- belongs to a media id
* question_id,
* )
* </code>
* @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);

@ -109,6 +109,7 @@ echo Question::getMediaLabels();
// If we are in a test.
$inATest = isset($exerciseId) && $exerciseId > 0;
if (!$inATest) {
echo "<p class='warning-message'>".get_lang("ChoiceQuestionType")."</p>";
} else {
@ -123,6 +124,7 @@ if (!$inATest) {
echo "<div style='clear:both'>&nbsp;</div>";
echo '<div id="question_list">';
if ($nbrQuestions) {
// Always getting list from DB.

@ -698,8 +698,6 @@ class ExtraField extends Model
$field_details['field_display_text'].' '.get_lang('Comment')
);
/*$extraField = new Extrafield($field_details['field_type']);
$link = Display::url();*/
$extraFieldValue = new ExtraFieldValue($this->type);
$repo = $app['orm.em']->getRepository($extraFieldValue->entityName);
$repoLog = $app['orm.em']->getRepository('Gedmo\Loggable\Entity\LogEntry');

Loading…
Cancel
Save