Ejemplo n.º 1
0
    public async Task PrintActiveQuestion()
    {
        MoodleQuestion printQuestion = myListofCourses [activeCourseId].myQuizzes [activeQuizId].myListOfQuestions [myActiveGame.questionNr];

        Debug.Log(printQuestion.quizQuestion);
        foreach (string answerItem in printQuestion.quizAnswers)
        {
            Debug.Log(answerItem);
        }
    }
Ejemplo n.º 2
0
    public async Task AddQuestionsToQuiz(int courseId, int quizId, MoodleQuestion newQuestion)
    {
        //Debug.Log ("no i add question to quiz");
        //Debug.Log ("course: "+courseId+" quizid "+quizId);

        foreach (MoodleCourse courseItem in myListofCourses)
        {
            if (courseItem.courseId == courseId)
            {
                foreach (MoodleQuiz quizItem in courseItem.myQuizzes)
                {
                    if (quizItem.quizID == quizId)
                    {
                        quizItem.AddQuestion(newQuestion);
                    }
                }
            }
        }
    }
Ejemplo n.º 3
0
 public void AddQuestion(MoodleQuestion newQuestion)
 {
     myListOfQuestions.Add(newQuestion);
 }