2020-02-18 09:19:33 +01:00
|
|
|
|
// swad_test_visibility.h: visibility of test results
|
|
|
|
|
|
2020-04-02 03:28:08 +02:00
|
|
|
|
#ifndef _SWAD_TST_VIS
|
|
|
|
|
#define _SWAD_TST_VIS
|
2020-02-18 09:19:33 +01:00
|
|
|
|
/*
|
|
|
|
|
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.
|
2021-02-09 12:43:45 +01:00
|
|
|
|
Copyright (C) 1999-2021 Antonio Ca<EFBFBD>as Vargas
|
2020-02-18 09:19:33 +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 ***********************************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
#include "swad_user.h"
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/***************************** Public constants ******************************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/******************************* Public types ********************************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
2020-04-02 03:28:08 +02:00
|
|
|
|
#define TstVis_NUM_ITEMS_VISIBILITY 5
|
2020-02-18 09:19:33 +01:00
|
|
|
|
typedef enum
|
|
|
|
|
{
|
2020-04-02 03:28:08 +02:00
|
|
|
|
TstVis_VISIBLE_QST_ANS_TXT = 0, // Questions and answers text
|
|
|
|
|
TstVis_VISIBLE_FEEDBACK_TXT = 1, // Feedback text
|
|
|
|
|
TstVis_VISIBLE_CORRECT_ANSWER = 2, // Correct answers
|
|
|
|
|
TstVis_VISIBLE_EACH_QST_SCORE = 3, // Score of each question
|
|
|
|
|
TstVis_VISIBLE_TOTAL_SCORE = 4, // Total score
|
|
|
|
|
} TstVis_Visibility_t;
|
|
|
|
|
#define TstVis_MIN_VISIBILITY 0 // Nothing visible
|
|
|
|
|
#define TstVis_MAX_VISIBILITY ((1 << TstVis_NUM_ITEMS_VISIBILITY) - 1) // All visible
|
|
|
|
|
#define TstVis_VISIBILITY_DEFAULT TstVis_MAX_VISIBILITY
|
2020-02-18 09:19:33 +01:00
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/***************************** Public prototypes *****************************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
2020-04-02 03:28:08 +02:00
|
|
|
|
void TstVis_ShowVisibilityIcons (unsigned SelectedVisibility,bool Hidden);
|
|
|
|
|
void TstVis_PutVisibilityCheckboxes (unsigned SelectedVisibility);
|
|
|
|
|
unsigned TstVis_GetVisibilityFromForm (void);
|
|
|
|
|
unsigned TstVis_GetVisibilityFromStr (const char *Str);
|
2020-02-18 09:19:33 +01:00
|
|
|
|
|
2020-04-02 03:28:08 +02:00
|
|
|
|
bool TstVis_IsVisibleQstAndAnsTxt (unsigned Visibility);
|
|
|
|
|
bool TstVis_IsVisibleFeedbackTxt (unsigned Visibility);
|
|
|
|
|
bool TstVis_IsVisibleCorrectAns (unsigned Visibility);
|
|
|
|
|
bool TstVis_IsVisibleEachQstScore (unsigned Visibility);
|
|
|
|
|
bool TstVis_IsVisibleTotalScore (unsigned Visibility);
|
2020-02-18 09:19:33 +01:00
|
|
|
|
|
|
|
|
|
#endif
|