You are here

function question_make_name_prefix in Quiz 6.5

Same name and namespace in other branches
  1. 6.6 includes/moodle/lib/questionlib.php \question_make_name_prefix()

Construct name prefixes for question form element names

Construct the name prefix that should be used for example in the names of form elements created by questions. This is called by {@link get_question_options()} to set $question->name_prefix. This name prefix includes the question id which can be extracted from it with {@link question_get_id_from_name_prefix()}.


integer $id The question id:

Return value


1 call to question_make_name_prefix()
_tidy_question in includes/moodle/lib/questionlib.php
Private function to factor common code out of get_question_options().


includes/moodle/lib/questionlib.php, line 1621


function question_make_name_prefix($id) {
  return 'resp' . $id . '_';