Table of Contents

Class McqUtilities

Namespace
WitShells.McqUI

Utility class for creating and managing MCQ data sets

public static class McqUtilities
Inheritance
McqUtilities
Inherited Members

Methods

CreateMcqSet(string[], string[], string[][])

Create multiple MCQs from parallel arrays

public static List<McqData> CreateMcqSet(string[] questions, string[] correctAnswers, string[][] wrongAnswersSet)

Parameters

questions string[]
correctAnswers string[]
wrongAnswersSet string[][]

Returns

List<McqData>

CreateSimpleMcq(string, string, params string[])

Create a simple MCQ with one correct and multiple wrong answers

public static McqData CreateSimpleMcq(string question, string correctAnswer, params string[] wrongAnswers)

Parameters

question string
correctAnswer string
wrongAnswers string[]

Returns

McqData

CreateTimedMcq(string, string, float, params string[])

Create an MCQ with time limit

public static McqData CreateTimedMcq(string question, string correctAnswer, float timeLimit, params string[] wrongAnswers)

Parameters

question string
correctAnswer string
timeLimit float
wrongAnswers string[]

Returns

McqData

GetRandomSubset(List<McqData>, int)

Get a random subset of MCQs from a larger set

public static List<McqData> GetRandomSubset(List<McqData> mcqList, int count)

Parameters

mcqList List<McqData>
count int

Returns

List<McqData>

ShuffleMcqList(List<McqData>)

Shuffle a list of MCQ data

public static void ShuffleMcqList(List<McqData> mcqList)

Parameters

mcqList List<McqData>

ValidateMcqSet(List<McqData>, out string)

Validate a list of MCQ data

public static bool ValidateMcqSet(List<McqData> mcqList, out string errorMessage)

Parameters

mcqList List<McqData>
errorMessage string

Returns

bool