mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-01 14:25:27 +02:00
Version18.122
This commit is contained in:
parent
3e719c4ef3
commit
f19ee52458
|
@ -634,18 +634,16 @@ CREATE TABLE IF NOT EXISTS gam_users (
|
|||
--
|
||||
CREATE TABLE IF NOT EXISTS games (
|
||||
GamCod INT NOT NULL AUTO_INCREMENT,
|
||||
Scope ENUM('Sys','Cty','Ins','Ctr','Deg','Crs') NOT NULL DEFAULT 'Sys',
|
||||
Cod INT NOT NULL DEFAULT -1,
|
||||
CrsCod INT NOT NULL DEFAULT -1,
|
||||
Hidden ENUM('N','Y') NOT NULL DEFAULT 'N',
|
||||
NumNotif INT NOT NULL DEFAULT 0,
|
||||
Roles INT NOT NULL DEFAULT 0,
|
||||
UsrCod INT NOT NULL,
|
||||
StartTime DATETIME NOT NULL,
|
||||
EndTime DATETIME NOT NULL,
|
||||
Title VARCHAR(2047) NOT NULL,
|
||||
Txt TEXT NOT NULL,
|
||||
UNIQUE INDEX(GamCod),
|
||||
INDEX(Scope,Cod));
|
||||
INDEX(CrsCod));
|
||||
--
|
||||
-- Table hidden_params: stores some hidden parameters passed from a page to another using database instead of forms
|
||||
--
|
||||
|
|
|
@ -588,7 +588,7 @@ Assessment:
|
|||
436. ActSeeOneTstResMe Show one test result of me as student
|
||||
437. ActSeeOneTstResOth Show one test result of other user
|
||||
|
||||
438. ActSeeOneSvy Show one survey
|
||||
438. ActSeeSvy Show one survey
|
||||
439. ActAnsSvy Answer a survey
|
||||
440. ActFrmNewSvy Form to create a new survey
|
||||
441. ActEdiOneSvy Edit one survey
|
||||
|
@ -605,7 +605,7 @@ Assessment:
|
|||
452. ActReqRemSvyQst Request the removal of a question of a survey
|
||||
453. ActRemSvyQst Confirm the removal of a question of a survey
|
||||
|
||||
454. ActSeeOneGam Show one game
|
||||
454. ActSeeGam Show one game
|
||||
455. ActPlyGam Start playing a game
|
||||
456. ActPlyGam1stQst Show first question when playing a game
|
||||
457. ActPlyGamNxtQst Show next question when playing a game
|
||||
|
@ -2012,7 +2012,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_BRW_1ST_TAB,NULL ,Asg_SeeAssignments ,"edit" },
|
||||
/* ActSeePrj */{1674, 2,TabAss,ActSeePrj ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prj_SeeProjects ,"file-alt" },
|
||||
/* ActReqTst */{ 103, 3,TabAss,ActReqTst ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Tst_ShowFormAskTst ,"check" },
|
||||
/* ActSeeAllGam */{1649, 4,TabAss,ActSeeAllGam ,0x200,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_SeeAllGames ,"gamepad" },
|
||||
/* ActSeeAllGam */{1649, 4,TabAss,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_SeeAllGames ,"gamepad" },
|
||||
/* ActSeeAllSvy */{ 966, 5,TabAss,ActSeeAllSvy ,0x3F8,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Svy_SeeAllSurveys ,"poll" },
|
||||
/* ActSeeAllExaAnn */{ 85, 6,TabAss,ActSeeAllExaAnn ,0x3F8,0x3C7, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Exa_ListExamAnnouncementsSee ,"bullhorn" },
|
||||
|
||||
|
@ -2134,31 +2134,31 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
/* ActSeeUsrTstRes */{1081,-1,TabUnk,ActReqTst ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Tst_ShowUsrsTestResults ,NULL},
|
||||
/* ActSeeOneTstResOth*/{1082,-1,TabUnk,ActReqTst ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Tst_ShowOneTestResult ,NULL},
|
||||
|
||||
/* ActSeeOneGam */{1650,-1,TabUnk,ActSeeAllGam ,0x3F8,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_SeeOneGame ,NULL},
|
||||
/* ActPlyGam */{1670,-1,TabUnk,ActSeeAllGam ,0x3F8,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_PlayGame ,NULL},
|
||||
/* ActPlyGam1stQst */{1671,-1,TabUnk,ActSeeAllGam ,0x3F8,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_NEW_TAB,NULL ,Gam_PlayGameNextQuestion ,NULL},
|
||||
/* ActPlyGamNxtQst */{1672,-1,TabUnk,ActSeeAllGam ,0x3F8,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_2ND_TAB,NULL ,Gam_PlayGameNextQuestion ,NULL},
|
||||
/* ActPlyGamAns */{1673,-1,TabUnk,ActSeeAllGam ,0x3F8,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_2ND_TAB,NULL ,Gam_PlayGameShowAnswers ,NULL},
|
||||
/* ActAnsGam */{1651,-1,TabUnk,ActSeeAllGam ,0x3F8,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_ReceiveGameAnswers ,NULL},
|
||||
/* ActFrmNewGam */{1652,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_RequestCreatOrEditGame ,NULL},
|
||||
/* ActEdiOneGam */{1653,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_RequestCreatOrEditGame ,NULL},
|
||||
/* ActNewGam */{1654,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_RecFormGame ,NULL},
|
||||
/* ActChgGam */{1655,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_RecFormGame ,NULL},
|
||||
/* ActReqRemGam */{1656,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_AskRemGame ,NULL},
|
||||
/* ActRemGam */{1657,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_RemoveGame ,NULL},
|
||||
/* ActReqRstGam */{1658,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_AskResetGame ,NULL},
|
||||
/* ActRstGam */{1659,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_ResetGame ,NULL},
|
||||
/* ActHidGam */{1660,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_HideGame ,NULL},
|
||||
/* ActShoGam */{1661,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_UnhideGame ,NULL},
|
||||
/* ActAddOneGamQst */{1662,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_RequestNewQuestion ,NULL},
|
||||
/* ActGamLstTstQst */{1666,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Tst_ListQuestionsToSelect ,NULL},
|
||||
/* ActAddTstQstToGam */{1667,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_AddTstQuestionsToGame ,NULL},
|
||||
/* ActReqRemGamQst */{1664,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_RequestRemoveQst ,NULL},
|
||||
/* ActRemGamQst */{1665,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_RemoveQst ,NULL},
|
||||
/* ActUp_GamQst */{1668,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_MoveUpQst ,NULL},
|
||||
/* ActDwnGamQst */{1669,-1,TabUnk,ActSeeAllGam ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_MoveDownQst ,NULL},
|
||||
/* ActSeeGam */{1650,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_SeeOneGame ,NULL},
|
||||
/* ActPlyGam */{1670,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_PlayGame ,NULL},
|
||||
/* ActPlyGam1stQst */{1671,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_NEW_TAB,NULL ,Gam_PlayGameNextQuestion ,NULL},
|
||||
/* ActPlyGamNxtQst */{1672,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_2ND_TAB,NULL ,Gam_PlayGameNextQuestion ,NULL},
|
||||
/* ActPlyGamAns */{1673,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_2ND_TAB,NULL ,Gam_PlayGameShowAnswers ,NULL},
|
||||
/* ActAnsGam */{1651,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_ReceiveGameAnswers ,NULL},
|
||||
/* ActFrmNewGam */{1652,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_RequestCreatOrEditGame ,NULL},
|
||||
/* ActEdiOneGam */{1653,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_RequestCreatOrEditGame ,NULL},
|
||||
/* ActNewGam */{1654,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_RecFormGame ,NULL},
|
||||
/* ActChgGam */{1655,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_RecFormGame ,NULL},
|
||||
/* ActReqRemGam */{1656,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_AskRemGame ,NULL},
|
||||
/* ActRemGam */{1657,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_RemoveGame ,NULL},
|
||||
/* ActReqRstGam */{1658,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_AskResetGame ,NULL},
|
||||
/* ActRstGam */{1659,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_ResetGame ,NULL},
|
||||
/* ActHidGam */{1660,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_HideGame ,NULL},
|
||||
/* ActShoGam */{1661,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_UnhideGame ,NULL},
|
||||
/* ActAddOneGamQst */{1662,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_RequestNewQuestion ,NULL},
|
||||
/* ActGamLstTstQst */{1666,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Tst_ListQuestionsToSelect ,NULL},
|
||||
/* ActAddTstQstToGam */{1667,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_AddTstQuestionsToGame ,NULL},
|
||||
/* ActReqRemGamQst */{1664,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_RequestRemoveQst ,NULL},
|
||||
/* ActRemGamQst */{1665,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_RemoveQst ,NULL},
|
||||
/* ActUp_GamQst */{1668,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_MoveUpQst ,NULL},
|
||||
/* ActDwnGamQst */{1669,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_MoveDownQst ,NULL},
|
||||
|
||||
/* ActSeeOneSvy */{ 982,-1,TabUnk,ActSeeAllSvy ,0x3F8,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Svy_SeeOneSurvey ,NULL},
|
||||
/* ActSeeSvy */{ 982,-1,TabUnk,ActSeeAllSvy ,0x3F8,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Svy_SeeOneSurvey ,NULL},
|
||||
/* ActAnsSvy */{ 983,-1,TabUnk,ActSeeAllSvy ,0x3F8,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Svy_ReceiveSurveyAnswers ,NULL},
|
||||
/* ActFrmNewSvy */{ 973,-1,TabUnk,ActSeeAllSvy ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Svy_RequestCreatOrEditSvy ,NULL},
|
||||
/* ActEdiOneSvy */{ 974,-1,TabUnk,ActSeeAllSvy ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Svy_RequestCreatOrEditSvy ,NULL},
|
||||
|
@ -4170,7 +4170,7 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un
|
|||
ActEdiOneSvyQst, // #979
|
||||
ActRcvSvyQst, // #980
|
||||
ActRemSvyQst, // #981
|
||||
ActSeeOneSvy, // #982
|
||||
ActSeeSvy, // #982
|
||||
ActAnsSvy, // #983
|
||||
ActReqRstSvy, // #984
|
||||
ActRstSvy, // #985
|
||||
|
@ -4838,7 +4838,7 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un
|
|||
ActRemNETCrs, // #1647
|
||||
ActChgCtrPlcCfg, // #1648
|
||||
ActSeeAllGam, // #1649
|
||||
ActSeeOneGam, // #1650
|
||||
ActSeeGam, // #1650
|
||||
ActAnsGam, // #1651
|
||||
ActFrmNewGam, // #1652
|
||||
ActEdiOneGam, // #1653
|
||||
|
|
|
@ -608,7 +608,7 @@ typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to
|
|||
#define ActSeeUsrTstRes (ActChgCrsTT1stDay + 114)
|
||||
#define ActSeeOneTstResOth (ActChgCrsTT1stDay + 115)
|
||||
|
||||
#define ActSeeOneGam (ActChgCrsTT1stDay + 116)
|
||||
#define ActSeeGam (ActChgCrsTT1stDay + 116)
|
||||
#define ActPlyGam (ActChgCrsTT1stDay + 117)
|
||||
#define ActPlyGam1stQst (ActChgCrsTT1stDay + 118)
|
||||
#define ActPlyGamNxtQst (ActChgCrsTT1stDay + 119)
|
||||
|
@ -632,7 +632,7 @@ typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to
|
|||
#define ActUp_GamQst (ActChgCrsTT1stDay + 137)
|
||||
#define ActDwnGamQst (ActChgCrsTT1stDay + 138)
|
||||
|
||||
#define ActSeeOneSvy (ActChgCrsTT1stDay + 139)
|
||||
#define ActSeeSvy (ActChgCrsTT1stDay + 139)
|
||||
#define ActAnsSvy (ActChgCrsTT1stDay + 140)
|
||||
#define ActFrmNewSvy (ActChgCrsTT1stDay + 141)
|
||||
#define ActEdiOneSvy (ActChgCrsTT1stDay + 142)
|
||||
|
|
|
@ -448,10 +448,17 @@ En OpenSWAD:
|
|||
ps2pdf source.ps destination.pdf
|
||||
*/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 18.121.2 (2019-05-17)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 18.122 (2019-05-18)"
|
||||
#define CSS_FILE "swad18.112.1.css"
|
||||
#define JS_FILE "swad18.116.5.js"
|
||||
/*
|
||||
Version 18.122: May 18, 2019 Games available for students.
|
||||
Scope and roles removed from games. (242145 lines)
|
||||
3 changes necessary in database:
|
||||
ALTER TABLE games DROP INDEX Scope;
|
||||
ALTER TABLE games DROP COLUMN Scope,DROP COLUMN Roles;
|
||||
ALTER TABLE games CHANGE COLUMN Cod CrsCod INT NOT NULL DEFAULT -1,ADD INDEX (CrsCod);
|
||||
|
||||
Version 18.121.2: May 17, 2019 Fixed bug in exporting tests. (242700 lines)
|
||||
Version 18.121.1: May 16, 2019 Fixed bug in renaming of institution. (242697 lines)
|
||||
Version 18.121: May 13, 2019 Module swad_web_service is renamed as swad_API.
|
||||
|
|
|
@ -1306,39 +1306,33 @@ mysql> DESCRIBE forum_thread;
|
|||
/***** Table games *****/
|
||||
/*
|
||||
mysql> DESCRIBE games;
|
||||
+-----------+-------------------------------------------+------+-----+---------+----------------+
|
||||
| Field | Type | Null | Key | Default | Extra |
|
||||
+-----------+-------------------------------------------+------+-----+---------+----------------+
|
||||
| GamCod | int(11) | NO | PRI | NULL | auto_increment |
|
||||
| Scope | enum('Sys','Cty','Ins','Ctr','Deg','Crs') | NO | MUL | Sys | |
|
||||
| Cod | int(11) | NO | | -1 | |
|
||||
| DegCod | int(11) | NO | | -1 | |
|
||||
| CrsCod | int(11) | NO | | -1 | |
|
||||
| Hidden | enum('N','Y') | NO | | N | |
|
||||
| NumNotif | int(11) | NO | | 0 | |
|
||||
| Roles | int(11) | NO | | 0 | |
|
||||
| UsrCod | int(11) | NO | | NULL | |
|
||||
| StartTime | datetime | NO | | NULL | |
|
||||
| EndTime | datetime | NO | | NULL | |
|
||||
| Title | varchar(2047) | NO | | NULL | |
|
||||
| Txt | text | NO | | NULL | |
|
||||
+-----------+-------------------------------------------+------+-----+---------+----------------+
|
||||
13 rows in set (0,00 sec)
|
||||
+-----------+---------------+------+-----+---------+----------------+
|
||||
| Field | Type | Null | Key | Default | Extra |
|
||||
+-----------+---------------+------+-----+---------+----------------+
|
||||
| GamCod | int(11) | NO | PRI | NULL | auto_increment |
|
||||
| CrsCod | int(11) | NO | MUL | -1 | |
|
||||
| Hidden | enum('N','Y') | NO | | N | |
|
||||
| NumNotif | int(11) | NO | | 0 | |
|
||||
| UsrCod | int(11) | NO | | NULL | |
|
||||
| StartTime | datetime | NO | | NULL | |
|
||||
| EndTime | datetime | NO | | NULL | |
|
||||
| Title | varchar(2047) | NO | | NULL | |
|
||||
| Txt | text | NO | | NULL | |
|
||||
+-----------+---------------+------+-----+---------+----------------+
|
||||
9 rows in set (0.00 sec)
|
||||
*/
|
||||
DB_CreateTable ("CREATE TABLE IF NOT EXISTS games ("
|
||||
"GamCod INT NOT NULL AUTO_INCREMENT,"
|
||||
"Scope ENUM('Sys','Cty','Ins','Ctr','Deg','Crs') NOT NULL DEFAULT 'Sys',"
|
||||
"Cod INT NOT NULL DEFAULT -1,"
|
||||
"CrsCod INT NOT NULL DEFAULT -1,"
|
||||
"Hidden ENUM('N','Y') NOT NULL DEFAULT 'N',"
|
||||
"NumNotif INT NOT NULL DEFAULT 0,"
|
||||
"Roles INT NOT NULL DEFAULT 0,"
|
||||
"UsrCod INT NOT NULL,"
|
||||
"StartTime DATETIME NOT NULL,"
|
||||
"EndTime DATETIME NOT NULL,"
|
||||
"Title VARCHAR(2047) NOT NULL," // Svy_MAX_BYTES_SURVEY_TITLE
|
||||
"Title VARCHAR(2047) NOT NULL," // Gam_MAX_BYTES_SURVEY_TITLE
|
||||
"Txt TEXT NOT NULL," // Cns_MAX_BYTES_TEXT
|
||||
"UNIQUE INDEX(GamCod),"
|
||||
"INDEX(Scope,Cod))");
|
||||
"INDEX(CrsCod))");
|
||||
|
||||
/***** Table gam_answers *****/
|
||||
/*
|
||||
|
|
961
swad_game.c
961
swad_game.c
File diff suppressed because it is too large
Load Diff
|
@ -45,11 +45,8 @@ typedef enum
|
|||
|
||||
struct Game
|
||||
{
|
||||
long GamCod;
|
||||
Hie_Level_t Scope;
|
||||
long Cod; // Country, institution, centre, degree or course code
|
||||
unsigned Roles; // Example: if game can be made by students, Roles == (1 << Rol_STD)
|
||||
long UsrCod;
|
||||
long GamCod; // Game code
|
||||
long UsrCod; // Author code
|
||||
char Title[Gam_MAX_BYTES_SURVEY_TITLE + 1];
|
||||
time_t TimeUTC[Gam_NUM_DATES];
|
||||
unsigned NumQsts; // Number of questions in the game
|
||||
|
@ -58,7 +55,6 @@ struct Game
|
|||
{
|
||||
bool Visible; // Game is not hidden
|
||||
bool Open; // Start date <= now <= end date
|
||||
bool IAmLoggedWithAValidRoleToAnswer; // I am logged with a valid role to answer this game
|
||||
bool IBelongToScope; // I belong to the scope of this game
|
||||
bool IHaveAnswered; // I have already answered this game
|
||||
bool ICanAnswer;
|
||||
|
|
|
@ -702,8 +702,6 @@ struct Globals
|
|||
unsigned Num; // Number of surveys
|
||||
long *LstGamCods; // List of game codes
|
||||
Gam_Order_t SelectedOrder;
|
||||
long CurrentGamCod; // Used as parameter in contextual links
|
||||
long CurrentQstCod; // Used as parameter in contextual links
|
||||
unsigned CurrentPage;
|
||||
char *ListQuestions;
|
||||
} Games;
|
||||
|
@ -713,8 +711,6 @@ struct Globals
|
|||
unsigned Num; // Number of surveys
|
||||
long *LstSvyCods; // List of survey codes
|
||||
Svy_Order_t SelectedOrder;
|
||||
long SvyCodToEdit; // Used as parameter in contextual links
|
||||
long SvyQstCodToEdit; // Used as parameter in contextual links
|
||||
unsigned CurrentPage;
|
||||
} Svys;
|
||||
struct
|
||||
|
|
|
@ -89,6 +89,9 @@ struct SurveyQuestion // Must be initialized to 0 before using it
|
|||
/***************************** Private variables *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
long Svy_CurrentSvyCod; // Used as parameter in contextual links
|
||||
long Svy_CurrentQstCod; // Used as parameter in contextual links
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************************** Private prototypes ****************************/
|
||||
/*****************************************************************************/
|
||||
|
@ -507,7 +510,7 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,
|
|||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"\">");
|
||||
Lay_StartArticle (Anchor);
|
||||
Frm_StartForm (ActSeeOneSvy);
|
||||
Frm_StartForm (ActSeeSvy);
|
||||
Svy_PutParamSvyCod (SvyCod);
|
||||
Svy_PutHiddenParamSvyOrder ();
|
||||
Grp_PutParamWhichGrps ();
|
||||
|
@ -544,7 +547,7 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,
|
|||
{
|
||||
fprintf (Gbl.F.Out,"<div class=\"BUTTONS_AFTER_ALERT\">");
|
||||
|
||||
Frm_StartForm (ActSeeOneSvy);
|
||||
Frm_StartForm (ActSeeSvy);
|
||||
Svy_PutParamSvyCod (Svy.SvyCod);
|
||||
Svy_PutHiddenParamSvyOrder ();
|
||||
Grp_PutParamWhichGrps ();
|
||||
|
@ -559,7 +562,7 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,
|
|||
{
|
||||
fprintf (Gbl.F.Out,"<div class=\"BUTTONS_AFTER_ALERT\">");
|
||||
|
||||
Frm_StartForm (ActSeeOneSvy);
|
||||
Frm_StartForm (ActSeeSvy);
|
||||
Svy_PutParamSvyCod (Svy.SvyCod);
|
||||
Svy_PutHiddenParamSvyOrder ();
|
||||
Grp_PutParamWhichGrps ();
|
||||
|
@ -807,7 +810,7 @@ static void Svy_PutFormsToRemEditOneSvy (const struct Survey *Svy,
|
|||
{
|
||||
extern const char *Txt_Reset;
|
||||
|
||||
Gbl.Svys.SvyCodToEdit = Svy->SvyCod; // Used as parameters in contextual links
|
||||
Svy_CurrentSvyCod = Svy->SvyCod; // Used as parameters in contextual links
|
||||
|
||||
/***** Put form to remove survey *****/
|
||||
Ico_PutContextualIconToRemove (ActReqRemSvy,Svy_PutParams);
|
||||
|
@ -833,8 +836,8 @@ static void Svy_PutFormsToRemEditOneSvy (const struct Survey *Svy,
|
|||
|
||||
static void Svy_PutParams (void)
|
||||
{
|
||||
if (Gbl.Svys.SvyCodToEdit > 0)
|
||||
Svy_PutParamSvyCod (Gbl.Svys.SvyCodToEdit);
|
||||
if (Svy_CurrentSvyCod > 0)
|
||||
Svy_PutParamSvyCod (Svy_CurrentSvyCod);
|
||||
Att_PutHiddenParamAttOrder ();
|
||||
Grp_PutParamWhichGrps ();
|
||||
Pag_PutHiddenParamPagNum (Pag_SURVEYS,Gbl.Svys.CurrentPage);
|
||||
|
@ -1516,7 +1519,7 @@ void Svy_AskRemSurvey (void)
|
|||
Lay_ShowErrorAndExit ("You can not remove this survey.");
|
||||
|
||||
/***** Show question and button to remove survey *****/
|
||||
Gbl.Svys.SvyCodToEdit = Svy.SvyCod;
|
||||
Svy_CurrentSvyCod = Svy.SvyCod;
|
||||
Ale_ShowAlertAndButton (ActRemSvy,NULL,NULL,Svy_PutParams,
|
||||
Btn_REMOVE_BUTTON,Txt_Remove_survey,
|
||||
Ale_QUESTION,Txt_Do_you_really_want_to_remove_the_survey_X,
|
||||
|
@ -1617,7 +1620,7 @@ void Svy_AskResetSurvey (void)
|
|||
Svy.Title);
|
||||
|
||||
/***** Button of confirmation of reset *****/
|
||||
Gbl.Svys.SvyCodToEdit = Svy.SvyCod;
|
||||
Svy_CurrentSvyCod = Svy.SvyCod;
|
||||
Svy_PutButtonToResetSurvey ();
|
||||
|
||||
/***** Show surveys again *****/
|
||||
|
@ -1825,7 +1828,7 @@ void Svy_RequestCreatOrEditSvy (void)
|
|||
}
|
||||
|
||||
/***** Start form *****/
|
||||
Gbl.Svys.SvyCodToEdit = Svy.SvyCod;
|
||||
Svy_CurrentSvyCod = Svy.SvyCod;
|
||||
Frm_StartForm (ItsANewSurvey ? ActNewSvy :
|
||||
ActChgSvy);
|
||||
Svy_PutParams ();
|
||||
|
@ -2637,8 +2640,8 @@ static void Svy_ShowFormEditOneQst (long SvyCod,struct SurveyQuestion *SvyQst,
|
|||
if (SvyQst->QstCod > 0) // If the question already has assigned a code
|
||||
{
|
||||
/* Parameters for contextual icon */
|
||||
Gbl.Svys.SvyCodToEdit = SvyCod;
|
||||
Gbl.Svys.SvyQstCodToEdit = SvyQst->QstCod;
|
||||
Svy_CurrentSvyCod = SvyCod;
|
||||
Svy_CurrentQstCod = SvyQst->QstCod;
|
||||
|
||||
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
||||
"%s %u",
|
||||
|
@ -3155,7 +3158,7 @@ static void Svy_ListSvyQuestions (struct Survey *Svy,
|
|||
Svy->SvyCod);
|
||||
|
||||
/***** Start box *****/
|
||||
Gbl.Svys.SvyCodToEdit = Svy->SvyCod;
|
||||
Svy_CurrentSvyCod = Svy->SvyCod;
|
||||
Box_StartBox (NULL,Txt_Questions,Svy->Status.ICanEdit ? Svy_PutIconToAddNewQuestion :
|
||||
NULL,
|
||||
Hlp_ASSESSMENT_Surveys_questions,Box_NOT_CLOSABLE);
|
||||
|
@ -3215,8 +3218,8 @@ static void Svy_ListSvyQuestions (struct Survey *Svy,
|
|||
Frm_EndForm ();
|
||||
|
||||
/* Write icon to edit the question */
|
||||
Gbl.Svys.SvyCodToEdit = Svy->SvyCod;
|
||||
Gbl.Svys.SvyQstCodToEdit = SvyQst->QstCod;
|
||||
Svy_CurrentSvyCod = Svy->SvyCod;
|
||||
Svy_CurrentQstCod = SvyQst->QstCod;
|
||||
Ico_PutContextualIconToEdit (ActEdiOneSvyQst,Svy_PutParamsToEditQuestion);
|
||||
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
|
@ -3280,8 +3283,8 @@ static void Svy_ListSvyQuestions (struct Survey *Svy,
|
|||
|
||||
static void Svy_PutParamsToEditQuestion (void)
|
||||
{
|
||||
Svy_PutParamSvyCod (Gbl.Svys.SvyCodToEdit);
|
||||
Svy_PutParamQstCod (Gbl.Svys.SvyQstCodToEdit);
|
||||
Svy_PutParamSvyCod (Svy_CurrentSvyCod);
|
||||
Svy_PutParamQstCod (Svy_CurrentQstCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -3496,8 +3499,8 @@ static void Svy_PutIconToRemoveOneQst (void)
|
|||
|
||||
static void Svy_PutParamsRemoveOneQst (void)
|
||||
{
|
||||
Svy_PutParamSvyCod (Gbl.Svys.SvyCodToEdit);
|
||||
Svy_PutParamQstCod (Gbl.Svys.SvyQstCodToEdit);
|
||||
Svy_PutParamSvyCod (Svy_CurrentSvyCod);
|
||||
Svy_PutParamQstCod (Svy_CurrentQstCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -3527,8 +3530,8 @@ void Svy_RequestRemoveQst (void)
|
|||
SvyQst.QstInd = Svy_GetQstIndFromQstCod (SvyQst.QstCod);
|
||||
|
||||
/***** Show question and button to remove question *****/
|
||||
Gbl.Svys.SvyCodToEdit = SvyCod;
|
||||
Gbl.Svys.SvyQstCodToEdit = SvyQst.QstCod;
|
||||
Svy_CurrentSvyCod = SvyCod;
|
||||
Svy_CurrentQstCod = SvyQst.QstCod;
|
||||
Ale_ShowAlertAndButton (ActRemSvyQst,NULL,NULL,Svy_PutParamsRemoveOneQst,
|
||||
Btn_REMOVE_BUTTON,Txt_Remove_question,
|
||||
Ale_QUESTION,Txt_Do_you_really_want_to_remove_the_question_X,
|
||||
|
|
|
@ -8462,7 +8462,7 @@ const char *Txt_Do_you_really_want_to_remove_the_assignment_X = // Warning: it i
|
|||
|
||||
const char *Txt_Do_you_really_want_to_remove_the_entire_thread =
|
||||
#if L==1 // ca
|
||||
"¿Realmente desea eliminar toda la discusión?"; // Necessita traduccio
|
||||
"De veres voleu eliminar tota la discusió?";
|
||||
#elif L==2 // de
|
||||
"Wollen Sie die gesamten Thread wirklich entfernen?";
|
||||
#elif L==3 // en
|
||||
|
@ -8483,7 +8483,7 @@ const char *Txt_Do_you_really_want_to_remove_the_entire_thread =
|
|||
|
||||
const char *Txt_Do_you_really_want_to_remove_the_entire_thread_X = // Warning: it is very important to include %s in the following sentences
|
||||
#if L==1 // ca
|
||||
"¿Realmente desea eliminar toda la discusión <strong>%s</strong>?"; // Necessita traduccio
|
||||
"De veres voleu eliminar tota la discussió <strong>%s</strong>?";
|
||||
#elif L==2 // de
|
||||
"Wollen Sie die gesamten Thread <strong>%s</strong> wirklich entfernen?";
|
||||
#elif L==3 // en
|
||||
|
@ -8504,7 +8504,7 @@ const char *Txt_Do_you_really_want_to_remove_the_entire_thread_X = // Warning: i
|
|||
|
||||
const char *Txt_Do_you_really_want_to_remove_the_event_X = // Warning: it is very important to include %s in the following sentences
|
||||
#if L==1 // ca
|
||||
"¿Realmente desea eliminar el evento <strong>%s</strong>?"; // Necessita traduccio
|
||||
"De veres voleu eliminar l'esdevenimen <strong>%s</strong>?";
|
||||
#elif L==2 // de
|
||||
"Wollen Sie der Ereignis <strong>%s</strong> wirklich entfernen?";
|
||||
#elif L==3 // en
|
||||
|
@ -8564,7 +8564,7 @@ const char *Txt_Do_you_really_want_to_remove_the_field_X_from_the_records_of_Y_Z
|
|||
|
||||
const char *Txt_Do_you_really_want_to_remove_FILE_OR_LINK_X = // Warning: it is very important to include %s in the following sentences
|
||||
#if L==1 // ca
|
||||
"¿Realmente desea eliminar <strong>%s</strong>?"; // Necessita traduccio
|
||||
"De veres voleu eliminar <strong>%s</strong>?";
|
||||
#elif L==2 // de
|
||||
"Wollen Sie <strong>%s</strong> wirklich entfernen?";
|
||||
#elif L==3 // en
|
||||
|
|
Loading…
Reference in New Issue
Block a user