mirror of https://github.com/acanas/swad-core.git
Version 16.251.12
This commit is contained in:
parent
c8129ec0ee
commit
86d61be943
11
Makefile
11
Makefile
|
@ -35,10 +35,10 @@ OBJS = swad_account.o swad_action.o swad_agenda.o swad_alert.o \
|
||||||
swad_department.o swad_duplicate.o \
|
swad_department.o swad_duplicate.o \
|
||||||
swad_enrolment.o swad_exam.o \
|
swad_enrolment.o swad_exam.o \
|
||||||
swad_file.o swad_file_browser.o swad_follow.o swad_forum.o \
|
swad_file.o swad_file_browser.o swad_follow.o swad_forum.o \
|
||||||
swad_global.o swad_group.o \
|
swad_game.o swad_global.o swad_group.o \
|
||||||
swad_help.o swad_hierarchy.o swad_holiday.o \
|
swad_help.o swad_hierarchy.o swad_holiday.o \
|
||||||
swad_icon.o swad_ID.o swad_image.o swad_indicator.o \
|
swad_icon.o swad_ID.o swad_image.o swad_indicator.o swad_info.o \
|
||||||
swad_info.o swad_institution.o \
|
swad_institution.o \
|
||||||
swad_language.o swad_layout.o swad_link.o swad_logo.o \
|
swad_language.o swad_layout.o swad_link.o swad_logo.o \
|
||||||
swad_mail.o swad_main.o swad_mark.o swad_menu.o swad_message.o \
|
swad_mail.o swad_main.o swad_mark.o swad_menu.o swad_message.o \
|
||||||
swad_MFU.o \
|
swad_MFU.o \
|
||||||
|
@ -47,10 +47,11 @@ OBJS = swad_account.o swad_action.o swad_agenda.o swad_alert.o \
|
||||||
swad_place.o swad_plugin.o swad_preference.o swad_privacy.o \
|
swad_place.o swad_plugin.o swad_preference.o swad_privacy.o \
|
||||||
swad_profile.o \
|
swad_profile.o \
|
||||||
swad_QR.o \
|
swad_QR.o \
|
||||||
swad_record.o swad_remote_control.o swad_report.o swad_role.o swad_RSS.o \
|
swad_record.o swad_report.o swad_role.o swad_RSS.o \
|
||||||
swad_scope.o swad_search.o swad_session.o swad_setup.o swad_social.o \
|
swad_scope.o swad_search.o swad_session.o swad_setup.o swad_social.o \
|
||||||
swad_statistic.o swad_string.o swad_survey.o swad_syllabus.o \
|
swad_statistic.o swad_string.o swad_survey.o swad_syllabus.o \
|
||||||
swad_tab.o swad_table.o swad_test.o swad_test_import.o swad_theme.o swad_timetable.o \
|
swad_tab.o swad_table.o swad_test.o swad_test_import.o swad_theme.o \
|
||||||
|
swad_timetable.o \
|
||||||
swad_user.o \
|
swad_user.o \
|
||||||
swad_web_service.o \
|
swad_web_service.o \
|
||||||
swad_xml.o \
|
swad_xml.o \
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
#include "swad_exam.h"
|
#include "swad_exam.h"
|
||||||
#include "swad_enrolment.h"
|
#include "swad_enrolment.h"
|
||||||
#include "swad_follow.h"
|
#include "swad_follow.h"
|
||||||
|
#include "swad_game.h"
|
||||||
#include "swad_global.h"
|
#include "swad_global.h"
|
||||||
#include "swad_ID.h"
|
#include "swad_ID.h"
|
||||||
#include "swad_indicator.h"
|
#include "swad_indicator.h"
|
||||||
|
@ -65,7 +66,6 @@
|
||||||
#include "swad_privacy.h"
|
#include "swad_privacy.h"
|
||||||
#include "swad_profile.h"
|
#include "swad_profile.h"
|
||||||
#include "swad_QR.h"
|
#include "swad_QR.h"
|
||||||
#include "swad_remote_control.h"
|
|
||||||
#include "swad_report.h"
|
#include "swad_report.h"
|
||||||
#include "swad_role.h"
|
#include "swad_role.h"
|
||||||
#include "swad_search.h"
|
#include "swad_search.h"
|
||||||
|
@ -1898,7 +1898,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
||||||
/* ActSeeAsg */{ 801, 1,TabAss,ActSeeAsg ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Asg_SeeAssignments ,"desk64x64.gif" },
|
/* ActSeeAsg */{ 801, 1,TabAss,ActSeeAsg ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Asg_SeeAssignments ,"desk64x64.gif" },
|
||||||
/* ActReqTst */{ 103, 2,TabAss,ActReqTst ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Tst_ShowFormAskTst ,"test64x64.gif" },
|
/* ActReqTst */{ 103, 2,TabAss,ActReqTst ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Tst_ShowFormAskTst ,"test64x64.gif" },
|
||||||
/* ActSeeAllSvy */{ 966, 3,TabAss,ActSeeAllSvy ,0x3F8,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Svy_SeeAllSurveys ,"survey64x64.gif" },
|
/* ActSeeAllSvy */{ 966, 3,TabAss,ActSeeAllSvy ,0x3F8,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Svy_SeeAllSurveys ,"survey64x64.gif" },
|
||||||
/* ActSeeAllGam */{1649, 4,TabAss,ActSeeAllGam ,0x200,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Rmt_SeeAllGames ,"remote64x64.png" },
|
/* ActSeeAllGam */{1649, 4,TabAss,ActSeeAllGam ,0x200,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Gam_SeeAllGames ,"remote64x64.png" },
|
||||||
/* ActSeeAllExaAnn */{ 85, 5,TabAss,ActSeeAllExaAnn ,0x3F8,0x3C7, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Exa_ListExamAnnouncementsSee ,"announce64x64.gif" },
|
/* ActSeeAllExaAnn */{ 85, 5,TabAss,ActSeeAllExaAnn ,0x3F8,0x3C7, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Exa_ListExamAnnouncementsSee ,"announce64x64.gif" },
|
||||||
|
|
||||||
// Actions not in menu:
|
// Actions not in menu:
|
||||||
|
@ -1967,23 +1967,23 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
||||||
/* ActReqRemSvyQst */{1524,-1,TabUnk,ActSeeAllSvy ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Svy_RequestRemoveQst ,NULL},
|
/* ActReqRemSvyQst */{1524,-1,TabUnk,ActSeeAllSvy ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Svy_RequestRemoveQst ,NULL},
|
||||||
/* ActRemSvyQst */{ 981,-1,TabUnk,ActSeeAllSvy ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Svy_RemoveQst ,NULL},
|
/* ActRemSvyQst */{ 981,-1,TabUnk,ActSeeAllSvy ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Svy_RemoveQst ,NULL},
|
||||||
|
|
||||||
/* ActSeeOneGam */{1650,-1,TabUnk,ActSeeAllGam ,0x3F8,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Rmt_SeeOneGame ,NULL},
|
/* ActSeeOneGam */{1650,-1,TabUnk,ActSeeAllGam ,0x3F8,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Gam_SeeOneGame ,NULL},
|
||||||
/* ActAnsGam */{1651,-1,TabUnk,ActSeeAllGam ,0x3F8,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Rmt_ReceiveGameAnswers ,NULL},
|
/* ActAnsGam */{1651,-1,TabUnk,ActSeeAllGam ,0x3F8,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Gam_ReceiveGameAnswers ,NULL},
|
||||||
/* ActFrmNewGam */{1652,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Rmt_RequestCreatOrEditGame ,NULL},
|
/* ActFrmNewGam */{1652,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Gam_RequestCreatOrEditGame ,NULL},
|
||||||
/* ActEdiOneGam */{1653,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Rmt_RequestCreatOrEditGame ,NULL},
|
/* ActEdiOneGam */{1653,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Gam_RequestCreatOrEditGame ,NULL},
|
||||||
/* ActNewGam */{1654,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Rmt_RecFormGame ,NULL},
|
/* ActNewGam */{1654,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Gam_RecFormGame ,NULL},
|
||||||
/* ActChgGam */{1655,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Rmt_RecFormGame ,NULL},
|
/* ActChgGam */{1655,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Gam_RecFormGame ,NULL},
|
||||||
/* ActReqRemGam */{1656,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Rmt_AskRemGame ,NULL},
|
/* ActReqRemGam */{1656,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Gam_AskRemGame ,NULL},
|
||||||
/* ActRemGam */{1657,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Rmt_RemoveGame ,NULL},
|
/* ActRemGam */{1657,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Gam_RemoveGame ,NULL},
|
||||||
/* ActReqRstGam */{1658,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Rmt_AskResetGame ,NULL},
|
/* ActReqRstGam */{1658,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Gam_AskResetGame ,NULL},
|
||||||
/* ActRstGam */{1659,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Rmt_ResetGame ,NULL},
|
/* ActRstGam */{1659,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Gam_ResetGame ,NULL},
|
||||||
/* ActHidGam */{1660,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Rmt_HideGame ,NULL},
|
/* ActHidGam */{1660,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Gam_HideGame ,NULL},
|
||||||
/* ActShoGam */{1661,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Rmt_UnhideGame ,NULL},
|
/* ActShoGam */{1661,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Gam_UnhideGame ,NULL},
|
||||||
/* ActAddOneGamQst */{1662,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Rmt_RequestNewQuestion ,NULL},
|
/* ActAddOneGamQst */{1662,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Gam_RequestNewQuestion ,NULL},
|
||||||
/* ActGamLstTstQst */{1666,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Tst_ListQuestionsToSelect ,NULL},
|
/* ActGamLstTstQst */{1666,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Tst_ListQuestionsToSelect ,NULL},
|
||||||
/* ActAddTstQstToGam */{1667,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Rmt_AddTstQuestionsToGame ,NULL},
|
/* ActAddTstQstToGam */{1667,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Gam_AddTstQuestionsToGame ,NULL},
|
||||||
/* ActReqRemGamQst */{1664,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Rmt_RequestRemoveQst ,NULL},
|
/* ActReqRemGamQst */{1664,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Gam_RequestRemoveQst ,NULL},
|
||||||
/* ActRemGamQst */{1665,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Rmt_RemoveQst ,NULL},
|
/* ActRemGamQst */{1665,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Gam_RemoveQst ,NULL},
|
||||||
|
|
||||||
/* ActSeeOneExaAnn */{1572,-1,TabUnk,ActSeeAllExaAnn ,0x3F8,0x3C7, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,Exa_GetExaCodToHighlight ,Exa_ListExamAnnouncementsSee ,NULL},
|
/* ActSeeOneExaAnn */{1572,-1,TabUnk,ActSeeAllExaAnn ,0x3F8,0x3C7, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,Exa_GetExaCodToHighlight ,Exa_ListExamAnnouncementsSee ,NULL},
|
||||||
/* ActSeeDatExaAnn */{1571,-1,TabUnk,ActSeeAllExaAnn ,0x3F8,0x3C7, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,Exa_GetDateToHighlight ,Exa_ListExamAnnouncementsSee ,NULL},
|
/* ActSeeDatExaAnn */{1571,-1,TabUnk,ActSeeAllExaAnn ,0x3F8,0x3C7, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,Exa_GetDateToHighlight ,Exa_ListExamAnnouncementsSee ,NULL},
|
||||||
|
|
|
@ -238,13 +238,14 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 16.251.11 (2017-09-06)"
|
#define Log_PLATFORM_VERSION "SWAD 16.251.12 (2017-09-06)"
|
||||||
#define CSS_FILE "swad16.251.8.css"
|
#define CSS_FILE "swad16.251.8.css"
|
||||||
#define JS_FILE "swad16.206.3.js"
|
#define JS_FILE "swad16.206.3.js"
|
||||||
|
|
||||||
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
||||||
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1
|
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1
|
||||||
/*
|
/*
|
||||||
|
Version 16.251.12:Sep 07, 2017 Module swad_game is renamed swad_game. (226872 lines)
|
||||||
Version 16.251.11:Sep 07, 2017 Listing games for remote control. Not finished. (226868 lines)
|
Version 16.251.11:Sep 07, 2017 Listing games for remote control. Not finished. (226868 lines)
|
||||||
Version 16.251.10:Sep 06, 2017 Listing games for remote control. Not finished. (226913 lines)
|
Version 16.251.10:Sep 06, 2017 Listing games for remote control. Not finished. (226913 lines)
|
||||||
2 changes necessary in database:
|
2 changes necessary in database:
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,7 +1,7 @@
|
||||||
// swad_remote_control.h: remote control
|
// swad_game.h: games using remote control
|
||||||
|
|
||||||
#ifndef _SWAD_RMT
|
#ifndef _SWAD_GAM
|
||||||
#define _SWAD_RMT
|
#define _SWAD_GAM
|
||||||
/*
|
/*
|
||||||
SWAD (Shared Workspace At a Distance in Spanish),
|
SWAD (Shared Workspace At a Distance in Spanish),
|
||||||
is a web platform developed at the University of Granada (Spain),
|
is a web platform developed at the University of Granada (Spain),
|
||||||
|
@ -27,19 +27,22 @@
|
||||||
/********************************* Headers ***********************************/
|
/********************************* Headers ***********************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
#include "swad_notification.h"
|
||||||
|
#include "swad_scope.h"
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/************************** Public types and constants ***********************/
|
/************************** Public types and constants ***********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Rmt_MAX_CHARS_SURVEY_TITLE (128 - 1) // 127
|
#define Gam_MAX_CHARS_SURVEY_TITLE (128 - 1) // 127
|
||||||
#define Rmt_MAX_BYTES_SURVEY_TITLE ((Rmt_MAX_CHARS_SURVEY_TITLE + 1) * Str_MAX_BYTES_PER_CHAR - 1) // 2047
|
#define Gam_MAX_BYTES_SURVEY_TITLE ((Gam_MAX_CHARS_SURVEY_TITLE + 1) * Str_MAX_BYTES_PER_CHAR - 1) // 2047
|
||||||
|
|
||||||
#define Rmt_NUM_DATES 2
|
#define Gam_NUM_DATES 2
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
Rmt_START_TIME = 0,
|
Gam_START_TIME = 0,
|
||||||
Rmt_END_TIME = 1,
|
Gam_END_TIME = 1,
|
||||||
} Rmt_StartOrEndTime_t;
|
} Gam_StartOrEndTime_t;
|
||||||
|
|
||||||
struct Game
|
struct Game
|
||||||
{
|
{
|
||||||
|
@ -48,8 +51,8 @@ struct Game
|
||||||
long Cod; // Country, institution, centre, degree or course code
|
long Cod; // Country, institution, centre, degree or course code
|
||||||
unsigned Roles; // Example: if game can be made by students, Roles == (1 << Rol_STD)
|
unsigned Roles; // Example: if game can be made by students, Roles == (1 << Rol_STD)
|
||||||
long UsrCod;
|
long UsrCod;
|
||||||
char Title[Rmt_MAX_BYTES_SURVEY_TITLE + 1];
|
char Title[Gam_MAX_BYTES_SURVEY_TITLE + 1];
|
||||||
time_t TimeUTC[Rmt_NUM_DATES];
|
time_t TimeUTC[Gam_NUM_DATES];
|
||||||
unsigned NumQsts; // Number of questions in the game
|
unsigned NumQsts; // Number of questions in the game
|
||||||
unsigned NumUsrs; // Number of distinct users who have already answered the game
|
unsigned NumUsrs; // Number of distinct users who have already answered the game
|
||||||
struct
|
struct
|
||||||
|
@ -65,64 +68,64 @@ struct Game
|
||||||
} Status;
|
} Status;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define Rmt_NUM_ORDERS 2
|
#define Gam_NUM_ORDERS 2
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
Rmt_ORDER_BY_START_DATE = 0,
|
Gam_ORDER_BY_START_DATE = 0,
|
||||||
Rmt_ORDER_BY_END_DATE = 1,
|
Gam_ORDER_BY_END_DATE = 1,
|
||||||
} Rmt_Order_t;
|
} Gam_Order_t;
|
||||||
#define Rmt_ORDER_DEFAULT Rmt_ORDER_BY_START_DATE
|
#define Gam_ORDER_DEFAULT Gam_ORDER_BY_START_DATE
|
||||||
|
|
||||||
#define Rmt_NUM_ANS_TYPES 2
|
#define Gam_NUM_ANS_TYPES 2
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
Rmt_ANS_UNIQUE_CHOICE = 0,
|
Gam_ANS_UNIQUE_CHOICE = 0,
|
||||||
Rmt_ANS_MULTIPLE_CHOICE = 1,
|
Gam_ANS_MULTIPLE_CHOICE = 1,
|
||||||
} Rmt_AnswerType_t;
|
} Gam_AnswerType_t;
|
||||||
#define Rmt_ANSWER_TYPE_DEFAULT Rmt_ANS_UNIQUE_CHOICE
|
#define Gam_ANSWER_TYPE_DEFAULT Gam_ANS_UNIQUE_CHOICE
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/***************************** Public prototypes *****************************/
|
/***************************** Public prototypes *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Rmt_SeeAllGames (void);
|
void Gam_SeeAllGames (void);
|
||||||
void Rmt_SeeOneGame (void);
|
void Gam_SeeOneGame (void);
|
||||||
void Rmt_PutHiddenParamGameOrder (void);
|
void Gam_PutHiddenParamGameOrder (void);
|
||||||
void Rmt_RequestCreatOrEditGame (void);
|
void Gam_RequestCreatOrEditGame (void);
|
||||||
void Rmt_GetListGames (void);
|
void Gam_GetListGames (void);
|
||||||
void Rmt_GetDataOfGameByCod (struct Game *Gam);
|
void Gam_GetDataOfGameByCod (struct Game *Gam);
|
||||||
void Rmt_GetDataOfGameByFolder (struct Game *Gam);
|
void Gam_GetDataOfGameByFolder (struct Game *Gam);
|
||||||
void Rmt_FreeListGames (void);
|
void Gam_FreeListGames (void);
|
||||||
void Rmt_GetNotifGame (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
|
void Gam_GetNotifGame (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
|
||||||
char **ContentStr,
|
char **ContentStr,
|
||||||
long GamCod,bool GetContent);
|
long GamCod,bool GetContent);
|
||||||
void Rmt_PutParamGameCod (long GamCod);
|
void Gam_PutParamGameCod (long GamCod);
|
||||||
long Rmt_GetParamGameCod (void);
|
long Gam_GetParamGameCod (void);
|
||||||
void Rmt_AskRemGame (void);
|
void Gam_AskRemGame (void);
|
||||||
void Rmt_RemoveGame (void);
|
void Gam_RemoveGame (void);
|
||||||
void Rmt_AskResetGame (void);
|
void Gam_AskResetGame (void);
|
||||||
void Rmt_ResetGame (void);
|
void Gam_ResetGame (void);
|
||||||
void Rmt_HideGame (void);
|
void Gam_HideGame (void);
|
||||||
void Rmt_UnhideGame (void);
|
void Gam_UnhideGame (void);
|
||||||
void Rmt_RecFormGame (void);
|
void Gam_RecFormGame (void);
|
||||||
bool Rmt_CheckIfGamIsAssociatedToGrp (long GamCod,long GrpCod);
|
bool Gam_CheckIfGamIsAssociatedToGrp (long GamCod,long GrpCod);
|
||||||
void Rmt_RemoveGroup (long GrpCod);
|
void Gam_RemoveGroup (long GrpCod);
|
||||||
void Rmt_RemoveGroupsOfType (long GrpTypCod);
|
void Gam_RemoveGroupsOfType (long GrpTypCod);
|
||||||
void Rmt_RemoveGames (Sco_Scope_t Scope,long Cod);
|
void Gam_RemoveGames (Sco_Scope_t Scope,long Cod);
|
||||||
|
|
||||||
void Rmt_RequestNewQuestion (void);
|
void Gam_RequestNewQuestion (void);
|
||||||
|
|
||||||
void Rmt_GetAndDrawBarNumUsrsWhoAnswered (struct Game *Game,long QstCod,unsigned AnsInd);
|
void Gam_GetAndDrawBarNumUsrsWhoAnswered (struct Game *Game,long QstCod,unsigned AnsInd);
|
||||||
|
|
||||||
void Rmt_AddTstQuestionsToGame (void);
|
void Gam_AddTstQuestionsToGame (void);
|
||||||
|
|
||||||
void Rmt_RequestRemoveQst (void);
|
void Gam_RequestRemoveQst (void);
|
||||||
void Rmt_RemoveQst (void);
|
void Gam_RemoveQst (void);
|
||||||
|
|
||||||
void Rmt_ReceiveGameAnswers (void);
|
void Gam_ReceiveGameAnswers (void);
|
||||||
|
|
||||||
unsigned Rmt_GetNumCoursesWithCrsGames (Sco_Scope_t Scope);
|
unsigned Gam_GetNumCoursesWithCrsGames (Sco_Scope_t Scope);
|
||||||
unsigned Rmt_GetNumCrsGames (Sco_Scope_t Scope,unsigned *NumNotif);
|
unsigned Gam_GetNumCrsGames (Sco_Scope_t Scope,unsigned *NumNotif);
|
||||||
float Rmt_GetNumQstsPerCrsGame (Sco_Scope_t Scope);
|
float Gam_GetNumQstsPerCrsGame (Sco_Scope_t Scope);
|
||||||
|
|
||||||
#endif
|
#endif
|
|
@ -50,6 +50,7 @@
|
||||||
#include "swad_file.h"
|
#include "swad_file.h"
|
||||||
#include "swad_file_browser.h"
|
#include "swad_file_browser.h"
|
||||||
#include "swad_forum.h"
|
#include "swad_forum.h"
|
||||||
|
#include "swad_game.h"
|
||||||
#include "swad_holiday.h"
|
#include "swad_holiday.h"
|
||||||
#include "swad_image.h"
|
#include "swad_image.h"
|
||||||
#include "swad_icon.h"
|
#include "swad_icon.h"
|
||||||
|
@ -67,7 +68,6 @@
|
||||||
#include "swad_place.h"
|
#include "swad_place.h"
|
||||||
#include "swad_plugin.h"
|
#include "swad_plugin.h"
|
||||||
#include "swad_record.h"
|
#include "swad_record.h"
|
||||||
#include "swad_remote_control.h"
|
|
||||||
#include "swad_search.h"
|
#include "swad_search.h"
|
||||||
#include "swad_session.h"
|
#include "swad_session.h"
|
||||||
#include "swad_social.h"
|
#include "swad_social.h"
|
||||||
|
@ -715,7 +715,7 @@ struct Globals
|
||||||
bool LstIsRead; // Is the list already read from database, or it needs to be read?
|
bool LstIsRead; // Is the list already read from database, or it needs to be read?
|
||||||
unsigned Num; // Number of surveys
|
unsigned Num; // Number of surveys
|
||||||
long *LstGamCods; // List of game codes
|
long *LstGamCods; // List of game codes
|
||||||
Rmt_Order_t SelectedOrder;
|
Gam_Order_t SelectedOrder;
|
||||||
long CurrentGamCod; // Used as parameter in contextual links
|
long CurrentGamCod; // Used as parameter in contextual links
|
||||||
long CurrentQstCod; // Used as parameter in contextual links
|
long CurrentQstCod; // Used as parameter in contextual links
|
||||||
unsigned CurrentPage;
|
unsigned CurrentPage;
|
||||||
|
|
|
@ -32,11 +32,11 @@
|
||||||
#include "swad_action.h"
|
#include "swad_action.h"
|
||||||
#include "swad_box.h"
|
#include "swad_box.h"
|
||||||
#include "swad_database.h"
|
#include "swad_database.h"
|
||||||
|
#include "swad_game.h"
|
||||||
#include "swad_global.h"
|
#include "swad_global.h"
|
||||||
#include "swad_group.h"
|
#include "swad_group.h"
|
||||||
#include "swad_notification.h"
|
#include "swad_notification.h"
|
||||||
#include "swad_parameter.h"
|
#include "swad_parameter.h"
|
||||||
#include "swad_remote_control.h"
|
|
||||||
#include "swad_table.h"
|
#include "swad_table.h"
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -1698,7 +1698,7 @@ void Grp_ListGrpsToEditAsgAttSvyGam (struct GroupType *GrpTyp,long Cod,
|
||||||
AssociatedToGrp = Svy_CheckIfSvyIsAssociatedToGrp (Cod,Grp->GrpCod);
|
AssociatedToGrp = Svy_CheckIfSvyIsAssociatedToGrp (Cod,Grp->GrpCod);
|
||||||
break;
|
break;
|
||||||
case Grp_GAME:
|
case Grp_GAME:
|
||||||
AssociatedToGrp = Rmt_CheckIfGamIsAssociatedToGrp (Cod,Grp->GrpCod);
|
AssociatedToGrp = Gam_CheckIfGamIsAssociatedToGrp (Cod,Grp->GrpCod);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (AssociatedToGrp)
|
if (AssociatedToGrp)
|
||||||
|
|
|
@ -1367,7 +1367,7 @@ void Tst_ShowFormAskSelectTstsForGame (long GamCod)
|
||||||
if ((NumRows = Tst_GetAllTagsFromCurrentCrs (&mysql_res)))
|
if ((NumRows = Tst_GetAllTagsFromCurrentCrs (&mysql_res)))
|
||||||
{
|
{
|
||||||
Act_FormStart (ActGamLstTstQst);
|
Act_FormStart (ActGamLstTstQst);
|
||||||
Rmt_PutParamGameCod (GamCod);
|
Gam_PutParamGameCod (GamCod);
|
||||||
|
|
||||||
Tbl_StartTable (2);
|
Tbl_StartTable (2);
|
||||||
|
|
||||||
|
@ -2439,7 +2439,7 @@ void Tst_ListQuestionsToSelect (void)
|
||||||
unsigned long NumRows;
|
unsigned long NumRows;
|
||||||
|
|
||||||
/***** Get game code *****/
|
/***** Get game code *****/
|
||||||
if ((GamCod = Rmt_GetParamGameCod ()) == -1L)
|
if ((GamCod = Gam_GetParamGameCod ()) == -1L)
|
||||||
Lay_ShowErrorAndExit ("Code of game is missing.");
|
Lay_ShowErrorAndExit ("Code of game is missing.");
|
||||||
|
|
||||||
/***** Get parameters, query the database and list the questions *****/
|
/***** Get parameters, query the database and list the questions *****/
|
||||||
|
@ -3122,7 +3122,7 @@ static void Tst_ListOneOrMoreQuestionsForSelection (long GamCod,
|
||||||
|
|
||||||
/***** Start form *****/
|
/***** Start form *****/
|
||||||
Act_FormStart (ActAddTstQstToGam);
|
Act_FormStart (ActAddTstQstToGam);
|
||||||
Rmt_PutParamGameCod (GamCod);
|
Gam_PutParamGameCod (GamCod);
|
||||||
|
|
||||||
/***** Write the heading *****/
|
/***** Write the heading *****/
|
||||||
Tbl_StartTableWideMargin (2);
|
Tbl_StartTableWideMargin (2);
|
||||||
|
@ -4127,7 +4127,7 @@ static void Tst_WriteChoiceAnsViewGame (struct Game *Game,unsigned NumQst,long Q
|
||||||
fprintf (Gbl.F.Out,"</td>");
|
fprintf (Gbl.F.Out,"</td>");
|
||||||
|
|
||||||
/* Get number of users who selected this answer and draw proportional bar */
|
/* Get number of users who selected this answer and draw proportional bar */
|
||||||
Rmt_GetAndDrawBarNumUsrsWhoAnswered (Game,QstCod,AnsInd);
|
Gam_GetAndDrawBarNumUsrsWhoAnswered (Game,QstCod,AnsInd);
|
||||||
fprintf (Gbl.F.Out,"</tr>");
|
fprintf (Gbl.F.Out,"</tr>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
/********************************* Headers ***********************************/
|
/********************************* Headers ***********************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#include "swad_remote_control.h"
|
#include "swad_game.h"
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/***************************** Public constants ******************************/
|
/***************************** Public constants ******************************/
|
||||||
|
|
Loading…
Reference in New Issue