You are here

function course_quiz_quiz_version in Course 7

Same name and namespace in other branches
  1. 7.2 modules/course_quiz/course_quiz.module \course_quiz_quiz_version()

What major version of Quiz are we running?

Return value

int 4 or 5.

5 calls to course_quiz_quiz_version()
CourseObjectQuiz::getOptionsSummary in modules/course_quiz/course_quiz.classes.inc
Get core options summary.
CourseObjectQuiz::getReport in modules/course_quiz/course_quiz.classes.inc
Let the course object provide its own reports.
CourseObjectQuiz::getWarnings in modules/course_quiz/course_quiz.classes.inc
Let the user know if they have a Quiz without questions.
CourseObjectQuiz::unenroll in modules/course_quiz/course_quiz.classes.inc
Remove all quiz attempts associated with this fulfillment.
CourseObjectQuizTestCase::testQuizCourseObject in modules/course_quiz/course_quiz.test

File

modules/course_quiz/course_quiz.module, line 57

Code

function course_quiz_quiz_version() {
  $schema_version = db_query("SELECT schema_version FROM {system} WHERE name = 'quiz'")
    ->fetchField();
  return $schema_version >= 7500 ? 5 : 4;
}