swad-core/swad_test.h

76 lines
3.1 KiB
C
Raw Normal View History

2014-12-01 23:55:08 +01:00
// swad_test.h: self-assessment tests
#ifndef _SWAD_TST
#define _SWAD_TST
/*
SWAD (Shared Workspace At a Distance in Spanish),
is a web platform developed at the University of Granada (Spain),
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2023 Antonio Ca<EFBFBD>as Vargas
2014-12-01 23:55:08 +01:00
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*****************************************************************************/
/********************************* Headers ***********************************/
/*****************************************************************************/
2020-04-22 03:15:04 +02:00
#include "swad_exam.h"
2017-09-07 18:38:18 +02:00
#include "swad_game.h"
2020-03-17 13:10:44 +01:00
#include "swad_media.h"
#include "swad_question.h"
#include "swad_question_type.h"
2020-03-21 15:41:25 +01:00
#include "swad_test_config.h"
2020-05-07 18:33:26 +02:00
#include "swad_test_print.h"
2017-09-06 23:17:52 +02:00
2014-12-01 23:55:08 +01:00
/*****************************************************************************/
/***************************** Public constants ******************************/
/*****************************************************************************/
#define Tst_SCORE_MAX 10 // Maximum score of a test (10 in Spain). Must be unsigned! // TODO: Make this configurable by teachers
2017-01-15 18:02:52 +01:00
2014-12-01 23:55:08 +01:00
/*****************************************************************************/
/******************************* Public types ********************************/
/*****************************************************************************/
2017-09-01 14:36:25 +02:00
typedef enum
{
2017-09-04 17:03:49 +02:00
Tst_SHOW_TEST_TO_ANSWER, // Showing a test to a student
2019-09-17 15:42:41 +02:00
Tst_SHOW_TEST_RESULT, // Showing the assessment of a test
Tst_EDIT_QUESTIONS, // Editing test questions
2020-04-27 14:20:21 +02:00
Tst_SELECT_QUESTIONS_FOR_EXAM, // Selecting test questions for a set of questions in an exam
2017-09-01 14:36:25 +02:00
Tst_SELECT_QUESTIONS_FOR_GAME, // Selecting test questions for a game
} Tst_ActionToDoWithQuestions_t;
2014-12-01 23:55:08 +01:00
/*****************************************************************************/
/***************************** Public prototypes *****************************/
/*****************************************************************************/
void Tst_ReqTest (void);
2016-11-21 13:15:08 +01:00
void Tst_ShowNewTest (void);
2020-04-16 21:03:22 +02:00
void Tst_ReceiveTestDraft (void);
2016-11-21 13:15:08 +01:00
void Tst_AssessTest (void);
2019-11-28 09:12:34 +01:00
void Tst_PutIconsTests (__attribute__((unused)) void *Args);
bool Tst_GetParsTst (struct Qst_Questions *Questions,
Tst_ActionToDoWithQuestions_t ActionToDoWithQuestions);
2020-03-21 15:41:25 +01:00
//-------------------------------- Figures ------------------------------------
void Tst_GetAndShowTestsStats (void);
2014-12-01 23:55:08 +01:00
#endif