MDL-38792 Update question/type in-line comments to codechecker standards

Correct bad formated infiles in question/type directories
This commit is contained in:
ppichet
2013-04-08 19:59:51 -04:00
parent 422f68fb86
commit 3d9645ae6e
68 changed files with 604 additions and 626 deletions
+15 -15
View File
@@ -333,7 +333,7 @@ class question_type {
// This default implementation is suitable for most
// question types.
// First, save the basic question itself
// First, save the basic question itself.
$question->name = trim($form->name);
$question->parent = isset($form->parent) ? $form->parent : 0;
$question->length = $this->actual_number_of_questions($question);
@@ -372,7 +372,7 @@ class question_type {
// If the question is new, create it.
if (empty($question->id)) {
// Set the unique code
// Set the unique code.
$question->stamp = make_unique_id_code();
$question->createdby = $USER->id;
$question->timecreated = time();
@@ -381,7 +381,7 @@ class question_type {
// Now, whether we are updating a existing question, or creating a new
// one, we have to do the files processing and update the record.
/// Question already exists, update.
// Question already exists, update.
$question->modifiedby = $USER->id;
$question->timemodified = time();
@@ -398,13 +398,13 @@ class question_type {
}
$DB->update_record('question', $question);
// Now to save all the answers and type-specific options
// Now to save all the answers and type-specific options.
$form->id = $question->id;
$form->qtype = $question->qtype;
$form->category = $question->category;
$form->questiontext = $question->questiontext;
$form->questiontextformat = $question->questiontextformat;
// current context
// Current context.
$form->context = $context;
$result = $this->save_question_options($form);
@@ -422,7 +422,7 @@ class question_type {
'$result->noticeyesno no longer supported in save_question.');
}
// Give the question a unique version stamp determined by question_hash()
// Give the question a unique version stamp determined by question_hash().
$DB->set_field('question', 'version', question_hash($question),
array('id' => $question->id));
@@ -679,12 +679,12 @@ class question_type {
$question->createdby = $questiondata->createdby;
$question->modifiedby = $questiondata->modifiedby;
//Fill extra question fields values
// Fill extra question fields values.
$extraquestionfields = $this->extra_question_fields();
if (is_array($extraquestionfields)) {
//omit table name
// Omit table name.
array_shift($extraquestionfields);
foreach($extraquestionfields as $field) {
foreach ($extraquestionfields as $field) {
$question->$field = $questiondata->options->$field;
}
}
@@ -805,7 +805,7 @@ class question_type {
* Question type specific information is included.
*/
public function actual_number_of_questions($question) {
// By default, each question is given one number
// By default, each question is given one number.
return 1;
}
@@ -885,11 +885,11 @@ class question_type {
* @return bool Whether the wizard's last page was submitted or not.
*/
public function finished_edit_wizard($form) {
//In the default case there is only one edit page.
// In the default case there is only one edit page.
return true;
}
/// IMPORT/EXPORT FUNCTIONS /////////////////
// IMPORT/EXPORT FUNCTIONS --------------------------------- .
/*
* Imports question from the Moodle XML format
@@ -908,7 +908,7 @@ class question_type {
return false;
}
//omit table name
// Omit table name.
array_shift($extraquestionfields);
$qo = $format->import_headers($data);
$qo->qtype = $question_type;
@@ -917,7 +917,7 @@ class question_type {
$qo->$field = $format->getpath($data, array('#', $field, 0, '#'), '');
}
// run through the answers
// Run through the answers.
$answers = $data['#']['answer'];
$a_count = 0;
$extraanswersfields = $this->extra_answer_fields();
@@ -956,7 +956,7 @@ class question_type {
return false;
}
//omit table name
// Omit table name.
array_shift($extraquestionfields);
$expout='';
foreach ($extraquestionfields as $field) {