mirror of https://github.com/acanas/swad-core.git
Version 22.81.1: Mar 26, 2023 Changes in resources.
This commit is contained in:
parent
f7ca97a096
commit
d39490308a
|
@ -629,10 +629,18 @@ TODO: Emilce Barrera Mesa: Podr
|
||||||
TODO: Emilce Barrera Mesa: Mis estudiantes presentan muchas dificultades a la hora de poner la foto porque la plataforma es muy exigente respecto al fondo de la imagen.
|
TODO: Emilce Barrera Mesa: Mis estudiantes presentan muchas dificultades a la hora de poner la foto porque la plataforma es muy exigente respecto al fondo de la imagen.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
#define Log_PLATFORM_VERSION "SWAD 22.81 (2023-03-26)"
|
#define Log_PLATFORM_VERSION "SWAD 22.81.1 (2023-03-26)"
|
||||||
#define CSS_FILE "swad22.78.15.css"
|
#define CSS_FILE "swad22.78.15.css"
|
||||||
#define JS_FILE "swad22.49.js"
|
#define JS_FILE "swad22.49.js"
|
||||||
/*
|
/*
|
||||||
|
Version 22.81.1: Mar 26, 2023 Changes in resources. (338012 lines)
|
||||||
|
5 changes necessary in database:
|
||||||
|
ALTER TABLE prg_clipboards CHANGE COLUMN Type Type ENUM('non','asg','prj','cfe','exa','ses','gam','mch','rub','doc','mrk','att','for','svy') NOT NULL DEFAULT 'non';
|
||||||
|
ALTER TABLE prg_resources CHANGE COLUMN Type Type ENUM('non','asg','prj','cfe','exa','ses','gam','mch','rub','doc','mrk','att','for','svy') NOT NULL DEFAULT 'non';
|
||||||
|
ALTER TABLE rub_criteria ADD COLUMN Type ENUM('non','asg','prj','cfe','exa','ses','gam','mch','rub','doc','mrk','att','for','svy') NOT NULL DEFAULT 'non' AFTER CriInd;
|
||||||
|
ALTER TABLE rub_criteria DROP INDEX Source;
|
||||||
|
ALTER TABLE rub_criteria DROP COLUMN Source;
|
||||||
|
|
||||||
Version 22.81: Mar 26, 2023 New module swad_resource. (337946 lines)
|
Version 22.81: Mar 26, 2023 New module swad_resource. (337946 lines)
|
||||||
Version 22.80: Mar 25, 2023 Resources in rubric criteria. Not finished. (338110 lines)
|
Version 22.80: Mar 25, 2023 Resources in rubric criteria. Not finished. (338110 lines)
|
||||||
Version 22.79.3: Mar 24, 2023 Translation of some actions. (337938 lines)
|
Version 22.79.3: Mar 24, 2023 Translation of some actions. (337938 lines)
|
||||||
|
|
|
@ -2474,32 +2474,21 @@ mysql> DESCRIBE plg_plugins;
|
||||||
/***** Table prg_clipboards *****/
|
/***** Table prg_clipboards *****/
|
||||||
/*
|
/*
|
||||||
mysql> DESCRIBE prg_clipboards;
|
mysql> DESCRIBE prg_clipboards;
|
||||||
+----------+-------------------------------------------------------------------------+------+-----+---------+-------+
|
+----------+-------------------------------------------------------------------------------------------+------+-----+---------+-------+
|
||||||
| Field | Type | Null | Key | Default | Extra |
|
| Field | Type | Null | Key | Default | Extra |
|
||||||
+----------+-------------------------------------------------------------------------+------+-----+---------+-------+
|
+----------+-------------------------------------------------------------------------------------------+------+-----+---------+-------+
|
||||||
| UsrCod | int | NO | PRI | NULL | |
|
| UsrCod | int | NO | PRI | NULL | |
|
||||||
| CrsCod | int | NO | PRI | NULL | |
|
| CrsCod | int | NO | PRI | NULL | |
|
||||||
| Type | enum('non','asg','prj','cfe','exa','gam','svy','doc','mrk','att','for') | NO | PRI | non | |
|
| Type | enum('non','asg','prj','cfe','exa','ses','gam','mch','rub','doc','mrk','att','for','svy') | NO | PRI | non | |
|
||||||
| Cod | int | NO | PRI | -1 | |
|
| Cod | int | NO | PRI | -1 | |
|
||||||
| CopyTime | timestamp | YES | MUL | NULL | |
|
| CopyTime | timestamp | YES | MUL | NULL | |
|
||||||
+----------+-------------------------------------------------------------------------+------+-----+---------+-------+
|
+----------+-------------------------------------------------------------------------------------------+------+-----+---------+-------+
|
||||||
5 rows in set (0,00 sec)
|
5 rows in set (0,00 sec)
|
||||||
*/
|
*/
|
||||||
DB_CreateTable ("CREATE TABLE IF NOT EXISTS prg_clipboards ("
|
DB_CreateTable ("CREATE TABLE IF NOT EXISTS prg_clipboards ("
|
||||||
"UsrCod INT NOT NULL,"
|
"UsrCod INT NOT NULL,"
|
||||||
"CrsCod INT NOT NULL,"
|
"CrsCod INT NOT NULL,"
|
||||||
"Type ENUM("
|
"Type ENUM('non','asg','prj','cfe','exa','ses','gam','mch','rub','doc','mrk','att','for','svy') NOT NULL DEFAULT 'non',"
|
||||||
"'non',"
|
|
||||||
"'asg',"
|
|
||||||
"'prj',"
|
|
||||||
"'cfe',"
|
|
||||||
"'exa',"
|
|
||||||
"'gam',"
|
|
||||||
"'svy',"
|
|
||||||
"'doc',"
|
|
||||||
"'mrk',"
|
|
||||||
"'att',"
|
|
||||||
"'for') NOT NULL DEFAULT 'non',"
|
|
||||||
"Cod INT NOT NULL DEFAULT -1,"
|
"Cod INT NOT NULL DEFAULT -1,"
|
||||||
"CopyTime TIMESTAMP,"
|
"CopyTime TIMESTAMP,"
|
||||||
"UNIQUE INDEX(UsrCod,CrsCod,Type,Cod),"
|
"UNIQUE INDEX(UsrCod,CrsCod,Type,Cod),"
|
||||||
|
@ -2563,17 +2552,17 @@ mysql> DESCRIBE prg_items;
|
||||||
/***** Table prg_resources *****/
|
/***** Table prg_resources *****/
|
||||||
/*
|
/*
|
||||||
mysql> DESCRIBE prg_resources;
|
mysql> DESCRIBE prg_resources;
|
||||||
+--------+-------------------------------------------------------------------------+------+-----+---------+----------------+
|
+--------+-------------------------------------------------------------------------------------------+------+-----+---------+----------------+
|
||||||
| Field | Type | Null | Key | Default | Extra |
|
| Field | Type | Null | Key | Default | Extra |
|
||||||
+--------+-------------------------------------------------------------------------+------+-----+---------+----------------+
|
+--------+-------------------------------------------------------------------------------------------+------+-----+---------+----------------+
|
||||||
| RscCod | int | NO | PRI | NULL | auto_increment |
|
| RscCod | int | NO | PRI | NULL | auto_increment |
|
||||||
| ItmCod | int | NO | MUL | -1 | |
|
| ItmCod | int | NO | MUL | -1 | |
|
||||||
| RscInd | int | NO | | 0 | |
|
| RscInd | int | NO | | 0 | |
|
||||||
| Hidden | enum('N','Y') | NO | | N | |
|
| Hidden | enum('N','Y') | NO | | N | |
|
||||||
| Type | enum('non','asg','prj','cfe','exa','gam','svy','doc','mrk','att','for') | NO | | non | |
|
| Type | enum('non','asg','prj','cfe','exa','ses','gam','mch','rub','doc','mrk','att','for','svy') | NO | | non | |
|
||||||
| Cod | int | NO | | -1 | |
|
| Cod | int | NO | | -1 | |
|
||||||
| Title | varchar(2047) | NO | | NULL | |
|
| Title | varchar(2047) | NO | | NULL | |
|
||||||
+--------+-------------------------------------------------------------------------+------+-----+---------+----------------+
|
+--------+-------------------------------------------------------------------------------------------+------+-----+---------+----------------+
|
||||||
7 rows in set (0,00 sec)
|
7 rows in set (0,00 sec)
|
||||||
*/
|
*/
|
||||||
DB_CreateTable ("CREATE TABLE IF NOT EXISTS prg_resources ("
|
DB_CreateTable ("CREATE TABLE IF NOT EXISTS prg_resources ("
|
||||||
|
@ -2581,18 +2570,7 @@ mysql> DESCRIBE prg_resources;
|
||||||
"ItmCod INT NOT NULL DEFAULT -1,"
|
"ItmCod INT NOT NULL DEFAULT -1,"
|
||||||
"RscInd INT NOT NULL DEFAULT 0,"
|
"RscInd INT NOT NULL DEFAULT 0,"
|
||||||
"Hidden ENUM('N','Y') NOT NULL DEFAULT 'N',"
|
"Hidden ENUM('N','Y') NOT NULL DEFAULT 'N',"
|
||||||
"Type ENUM("
|
"Type ENUM('non','asg','prj','cfe','exa','ses','gam','mch','rub','doc','mrk','att','for','svy') NOT NULL DEFAULT 'non',"
|
||||||
"'non',"
|
|
||||||
"'asg',"
|
|
||||||
"'prj',"
|
|
||||||
"'cfe',"
|
|
||||||
"'exa',"
|
|
||||||
"'gam',"
|
|
||||||
"'svy',"
|
|
||||||
"'doc',"
|
|
||||||
"'mrk',"
|
|
||||||
"'att',"
|
|
||||||
"'for') NOT NULL DEFAULT 'non',"
|
|
||||||
"Title VARCHAR(2047) NOT NULL," // Rsc_MAX_BYTES_RESOURCE_TITLE
|
"Title VARCHAR(2047) NOT NULL," // Rsc_MAX_BYTES_RESOURCE_TITLE
|
||||||
"UNIQUE INDEX(RscCod),"
|
"UNIQUE INDEX(RscCod),"
|
||||||
"UNIQUE INDEX(ItmCod,RscInd))");
|
"UNIQUE INDEX(ItmCod,RscInd))");
|
||||||
|
@ -2801,34 +2779,33 @@ mysql> DESCRIBE roo_check_in;
|
||||||
/***** Table rub_criteria *****/
|
/***** Table rub_criteria *****/
|
||||||
/*
|
/*
|
||||||
mysql> DESCRIBE rub_criteria;
|
mysql> DESCRIBE rub_criteria;
|
||||||
+--------+----------------------------------------+------+-----+---------+----------------+
|
+--------+-------------------------------------------------------------------------------------------+------+-----+---------+----------------+
|
||||||
| Field | Type | Null | Key | Default | Extra |
|
| Field | Type | Null | Key | Default | Extra |
|
||||||
+--------+----------------------------------------+------+-----+---------+----------------+
|
+--------+-------------------------------------------------------------------------------------------+------+-----+---------+----------------+
|
||||||
| CriCod | int | NO | PRI | NULL | auto_increment |
|
| CriCod | int | NO | PRI | NULL | auto_increment |
|
||||||
| RubCod | int | NO | MUL | NULL | |
|
| RubCod | int | NO | MUL | NULL | |
|
||||||
| CriInd | int | NO | | NULL | |
|
| CriInd | int | NO | | NULL | |
|
||||||
| Source | enum('teacher','rubric','exam','game') | NO | MUL | teacher | |
|
| Type | enum('non','asg','prj','cfe','exa','ses','gam','mch','rub','doc','mrk','att','for','svy') | NO | | non | |
|
||||||
| Cod | int | NO | | -1 | |
|
| Cod | int | NO | | -1 | |
|
||||||
| MinVal | double | NO | | 0 | |
|
| MinVal | double | NO | | 0 | |
|
||||||
| MaxVal | double | NO | | 1 | |
|
| MaxVal | double | NO | | 1 | |
|
||||||
| Weight | double | NO | | 1 | |
|
| Weight | double | NO | | 1 | |
|
||||||
| Title | varchar(2047) | NO | | NULL | |
|
| Title | varchar(2047) | NO | | NULL | |
|
||||||
+--------+----------------------------------------+------+-----+---------+----------------+
|
+--------+-------------------------------------------------------------------------------------------+------+-----+---------+----------------+
|
||||||
9 rows in set (0,00 sec)
|
9 rows in set (0,00 sec)
|
||||||
*/
|
*/
|
||||||
DB_CreateTable ("CREATE TABLE IF NOT EXISTS rub_criteria ("
|
DB_CreateTable ("CREATE TABLE IF NOT EXISTS rub_criteria ("
|
||||||
"CriCod INT NOT NULL AUTO_INCREMENT,"
|
"CriCod INT NOT NULL AUTO_INCREMENT,"
|
||||||
"RubCod INT NOT NULL,"
|
"RubCod INT NOT NULL,"
|
||||||
"CriInd INT NOT NULL,"
|
"CriInd INT NOT NULL,"
|
||||||
"Source ENUM('teacher','rubric','exam','game') NOT NULL DEFAULT 'teacher',"
|
"Type ENUM('non','asg','prj','cfe','exa','ses','gam','mch','rub','doc','mrk','att','for','svy'),"
|
||||||
"Cod INT NOT NULL DEFAULT -1,"
|
"Cod INT NOT NULL DEFAULT -1,"
|
||||||
"MinVal DOUBLE PRECISION NOT NULL DEFAULT 0,"
|
"MinVal DOUBLE PRECISION NOT NULL DEFAULT 0,"
|
||||||
"MaxVal DOUBLE PRECISION NOT NULL DEFAULT 1,"
|
"MaxVal DOUBLE PRECISION NOT NULL DEFAULT 1,"
|
||||||
"Weight DOUBLE PRECISION NOT NULL DEFAULT 1,"
|
"Weight DOUBLE PRECISION NOT NULL DEFAULT 1,"
|
||||||
"Title VARCHAR(2047) NOT NULL,"
|
"Title VARCHAR(2047) NOT NULL,"
|
||||||
"UNIQUE INDEX(CriCod),"
|
"UNIQUE INDEX(CriCod),"
|
||||||
"UNIQUE INDEX(RubCod,CriInd),"
|
"UNIQUE INDEX(RubCod,CriInd))");
|
||||||
"INDEX(Source,Cod))");
|
|
||||||
|
|
||||||
/***** Table rub_rubrics *****/
|
/***** Table rub_rubrics *****/
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -30,32 +30,6 @@
|
||||||
#include "swad_program.h"
|
#include "swad_program.h"
|
||||||
#include "swad_program_resource.h"
|
#include "swad_program_resource.h"
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
/**************************** Private constants ******************************/
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
const char *Rsc_ResourceTypesDB[Rsc_NUM_TYPES] =
|
|
||||||
{
|
|
||||||
[Rsc_NONE ] = "non",
|
|
||||||
// gui TEACHING_GUIDE // Link to teaching guide
|
|
||||||
// bib BIBLIOGRAPHY // Link to bibliography
|
|
||||||
// faq FAQ // Link to FAQ
|
|
||||||
// lnk LINKS // Link to links
|
|
||||||
// tmt TIMETABLE // Link to timetable
|
|
||||||
[Rsc_ASSIGNMENT ] = "asg",
|
|
||||||
[Rsc_PROJECT ] = "prj",
|
|
||||||
[Rsc_CALL_FOR_EXAM ] = "cfe",
|
|
||||||
// tst TEST // User selects tags, teacher should select
|
|
||||||
[Rsc_EXAM ] = "exa",
|
|
||||||
[Rsc_GAME ] = "gam",
|
|
||||||
[Rsc_SURVEY ] = "svy",
|
|
||||||
[Rsc_DOCUMENT ] = "doc",
|
|
||||||
[Rsc_MARKS ] = "mrk",
|
|
||||||
// grp GROUPS // ??? User select groups
|
|
||||||
[Rsc_ATTENDANCE_EVENT] = "att",
|
|
||||||
[Rsc_FORUM_THREAD ] = "for",
|
|
||||||
};
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/************** External global variables from others modules ****************/
|
/************** External global variables from others modules ****************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -658,6 +632,8 @@ void Prg_DB_UpdateRscInd (long RscCod,int RscInd)
|
||||||
|
|
||||||
void Prg_DB_UpdateRscLink (const struct Prg_Item *Item)
|
void Prg_DB_UpdateRscLink (const struct Prg_Item *Item)
|
||||||
{
|
{
|
||||||
|
extern const char *Rsc_ResourceTypesDB[Rsc_NUM_TYPES];
|
||||||
|
|
||||||
DB_QueryUPDATE ("can not update link of resource",
|
DB_QueryUPDATE ("can not update link of resource",
|
||||||
"UPDATE prg_resources"
|
"UPDATE prg_resources"
|
||||||
" SET Type='%s',"
|
" SET Type='%s',"
|
||||||
|
@ -674,6 +650,8 @@ void Prg_DB_UpdateRscLink (const struct Prg_Item *Item)
|
||||||
|
|
||||||
void Prg_DB_CopyToClipboard (Rsc_Type_t Type,long Cod)
|
void Prg_DB_CopyToClipboard (Rsc_Type_t Type,long Cod)
|
||||||
{
|
{
|
||||||
|
extern const char *Rsc_ResourceTypesDB[Rsc_NUM_TYPES];
|
||||||
|
|
||||||
DB_QueryREPLACE ("can not copy link to resource clipboard",
|
DB_QueryREPLACE ("can not copy link to resource clipboard",
|
||||||
"REPLACE INTO prg_clipboards"
|
"REPLACE INTO prg_clipboards"
|
||||||
" (UsrCod,CrsCod,Type,Cod,CopyTime)"
|
" (UsrCod,CrsCod,Type,Cod,CopyTime)"
|
||||||
|
@ -709,6 +687,8 @@ unsigned Prg_DB_GetClipboard (MYSQL_RES **mysql_res)
|
||||||
|
|
||||||
void Prg_DB_RemoveLinkFromClipboard (struct Rsc_Link *Link)
|
void Prg_DB_RemoveLinkFromClipboard (struct Rsc_Link *Link)
|
||||||
{
|
{
|
||||||
|
extern const char *Rsc_ResourceTypesDB[Rsc_NUM_TYPES];
|
||||||
|
|
||||||
DB_QueryDELETE ("can not remove link from clipboard",
|
DB_QueryDELETE ("can not remove link from clipboard",
|
||||||
"DELETE FROM prg_clipboards"
|
"DELETE FROM prg_clipboards"
|
||||||
" WHERE UsrCod=%ld"
|
" WHERE UsrCod=%ld"
|
||||||
|
|
|
@ -48,6 +48,31 @@
|
||||||
/***************************** Public constants ******************************/
|
/***************************** Public constants ******************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
const char *Rsc_ResourceTypesDB[Rsc_NUM_TYPES] =
|
||||||
|
{
|
||||||
|
[Rsc_NONE ] = "non",
|
||||||
|
// gui TEACHING_GUIDE // Link to teaching guide
|
||||||
|
// bib BIBLIOGRAPHY // Link to bibliography
|
||||||
|
// faq FAQ // Link to FAQ
|
||||||
|
// lnk LINKS // Link to links
|
||||||
|
// tmt TIMETABLE // Link to timetable
|
||||||
|
[Rsc_ASSIGNMENT ] = "asg",
|
||||||
|
[Rsc_PROJECT ] = "prj",
|
||||||
|
[Rsc_CALL_FOR_EXAM ] = "cfe",
|
||||||
|
// tst TEST // User selects tags, teacher should select
|
||||||
|
[Rsc_EXAM ] = "exa",
|
||||||
|
[Rsc_EXAM_SESSION ] = "ses",
|
||||||
|
[Rsc_GAME ] = "gam",
|
||||||
|
[Rsc_GAME_MATCH ] = "mch",
|
||||||
|
[Rsc_RUBRIC ] = "rub",
|
||||||
|
[Rsc_DOCUMENT ] = "doc",
|
||||||
|
[Rsc_MARKS ] = "mrk",
|
||||||
|
// grp GROUPS // ??? User select groups
|
||||||
|
[Rsc_ATTENDANCE_EVENT] = "att",
|
||||||
|
[Rsc_FORUM_THREAD ] = "for",
|
||||||
|
[Rsc_SURVEY ] = "svy",
|
||||||
|
};
|
||||||
|
|
||||||
const char *Rsc_ResourceTypesIcons[Rsc_NUM_TYPES] =
|
const char *Rsc_ResourceTypesIcons[Rsc_NUM_TYPES] =
|
||||||
{
|
{
|
||||||
[Rsc_NONE ] = "link-slash.svg",
|
[Rsc_NONE ] = "link-slash.svg",
|
||||||
|
@ -61,13 +86,16 @@ const char *Rsc_ResourceTypesIcons[Rsc_NUM_TYPES] =
|
||||||
[Rsc_CALL_FOR_EXAM ] = "bullhorn.svg",
|
[Rsc_CALL_FOR_EXAM ] = "bullhorn.svg",
|
||||||
// tst TEST // User selects tags, teacher should select
|
// tst TEST // User selects tags, teacher should select
|
||||||
[Rsc_EXAM ] = "file-signature.svg",
|
[Rsc_EXAM ] = "file-signature.svg",
|
||||||
|
[Rsc_EXAM_SESSION ] = "file-signature.svg",
|
||||||
[Rsc_GAME ] = "gamepad.svg",
|
[Rsc_GAME ] = "gamepad.svg",
|
||||||
[Rsc_SURVEY ] = "poll.svg",
|
[Rsc_GAME_MATCH ] = "gamepad.svg",
|
||||||
|
[Rsc_RUBRIC ] = "tasks.svg",
|
||||||
[Rsc_DOCUMENT ] = "folder-open.svg",
|
[Rsc_DOCUMENT ] = "folder-open.svg",
|
||||||
[Rsc_MARKS ] = "list-alt.svg",
|
[Rsc_MARKS ] = "list-alt.svg",
|
||||||
// grp GROUPS // ??? User select groups
|
// grp GROUPS // ??? User select groups
|
||||||
[Rsc_ATTENDANCE_EVENT] = "calendar-check.svg",
|
[Rsc_ATTENDANCE_EVENT] = "calendar-check.svg",
|
||||||
[Rsc_FORUM_THREAD ] = "comments.svg",
|
[Rsc_FORUM_THREAD ] = "comments.svg",
|
||||||
|
[Rsc_SURVEY ] = "poll.svg",
|
||||||
};
|
};
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -82,7 +110,6 @@ extern struct Globals Gbl;
|
||||||
|
|
||||||
void Rsc_WriteRowClipboard (bool SubmitOnClick,const struct Rsc_Link *Link)
|
void Rsc_WriteRowClipboard (bool SubmitOnClick,const struct Rsc_Link *Link)
|
||||||
{
|
{
|
||||||
extern const char *Rsc_ResourceTypesDB[Rsc_NUM_TYPES];
|
|
||||||
extern const char *Txt_RESOURCE_TYPES[Rsc_NUM_TYPES];
|
extern const char *Txt_RESOURCE_TYPES[Rsc_NUM_TYPES];
|
||||||
|
|
||||||
HTM_LI_Begin ("class=\"PRG_RSC_%s\"",The_GetSuffix ());
|
HTM_LI_Begin ("class=\"PRG_RSC_%s\"",The_GetSuffix ());
|
||||||
|
@ -121,12 +148,15 @@ void Rsc_WriteLinkName (const struct Rsc_Link *Link,bool PutFormToGo,
|
||||||
[Rsc_PROJECT ] = PrjRsc_WriteResourceProject,
|
[Rsc_PROJECT ] = PrjRsc_WriteResourceProject,
|
||||||
[Rsc_CALL_FOR_EXAM ] = CfeRsc_WriteResourceCallForExam,
|
[Rsc_CALL_FOR_EXAM ] = CfeRsc_WriteResourceCallForExam,
|
||||||
[Rsc_EXAM ] = ExaRsc_WriteResourceExam,
|
[Rsc_EXAM ] = ExaRsc_WriteResourceExam,
|
||||||
|
[Rsc_EXAM_SESSION ] = ExaRsc_WriteResourceExam, // TODO
|
||||||
[Rsc_GAME ] = GamRsc_WriteResourceGame,
|
[Rsc_GAME ] = GamRsc_WriteResourceGame,
|
||||||
[Rsc_SURVEY ] = SvyRsc_WriteResourceSurvey,
|
[Rsc_GAME_MATCH ] = GamRsc_WriteResourceGame, // TODO
|
||||||
|
[Rsc_RUBRIC ] = Rsc_WriteResourceEmpty, // TODO
|
||||||
[Rsc_DOCUMENT ] = BrwRsc_WriteResourceDocument,
|
[Rsc_DOCUMENT ] = BrwRsc_WriteResourceDocument,
|
||||||
[Rsc_MARKS ] = BrwRsc_WriteResourceMarksFile,
|
[Rsc_MARKS ] = BrwRsc_WriteResourceMarksFile,
|
||||||
[Rsc_ATTENDANCE_EVENT] = AttRsc_WriteResourceEvent,
|
[Rsc_ATTENDANCE_EVENT] = AttRsc_WriteResourceEvent,
|
||||||
[Rsc_FORUM_THREAD ] = ForRsc_WriteResourceThread,
|
[Rsc_FORUM_THREAD ] = ForRsc_WriteResourceThread,
|
||||||
|
[Rsc_SURVEY ] = SvyRsc_WriteResourceSurvey,
|
||||||
};
|
};
|
||||||
|
|
||||||
/***** Write link name *****/
|
/***** Write link name *****/
|
||||||
|
@ -167,12 +197,15 @@ void Rsc_GetResourceTitleFromLink (struct Rsc_Link *Link,
|
||||||
[Rsc_PROJECT ] = PrjRsc_GetTitleFromPrjCod,
|
[Rsc_PROJECT ] = PrjRsc_GetTitleFromPrjCod,
|
||||||
[Rsc_CALL_FOR_EXAM ] = CfeRsc_GetTitleFromExaCod,
|
[Rsc_CALL_FOR_EXAM ] = CfeRsc_GetTitleFromExaCod,
|
||||||
[Rsc_EXAM ] = ExaRsc_GetTitleFromExaCod,
|
[Rsc_EXAM ] = ExaRsc_GetTitleFromExaCod,
|
||||||
|
[Rsc_EXAM_SESSION ] = ExaRsc_GetTitleFromExaCod, // TODO
|
||||||
[Rsc_GAME ] = GamRsc_GetTitleFromGamCod,
|
[Rsc_GAME ] = GamRsc_GetTitleFromGamCod,
|
||||||
[Rsc_SURVEY ] = SvyRsc_GetTitleFromSvyCod,
|
[Rsc_GAME_MATCH ] = GamRsc_GetTitleFromGamCod, // TODO
|
||||||
|
[Rsc_RUBRIC ] = NULL, // TODO
|
||||||
[Rsc_DOCUMENT ] = BrwRsc_GetTitleFromDocFilCod,
|
[Rsc_DOCUMENT ] = BrwRsc_GetTitleFromDocFilCod,
|
||||||
[Rsc_MARKS ] = BrwRsc_GetTitleFromMrkFilCod,
|
[Rsc_MARKS ] = BrwRsc_GetTitleFromMrkFilCod,
|
||||||
[Rsc_ATTENDANCE_EVENT] = AttRsc_GetTitleFromAttCod,
|
[Rsc_ATTENDANCE_EVENT] = AttRsc_GetTitleFromAttCod,
|
||||||
[Rsc_FORUM_THREAD ] = ForRsc_GetTitleFromThrCod,
|
[Rsc_FORUM_THREAD ] = ForRsc_GetTitleFromThrCod,
|
||||||
|
[Rsc_SURVEY ] = SvyRsc_GetTitleFromSvyCod,
|
||||||
};
|
};
|
||||||
|
|
||||||
/***** Reset title *****/
|
/***** Reset title *****/
|
||||||
|
@ -212,7 +245,6 @@ void Rsc_GetLinkDataFromRow (MYSQL_RES *mysql_res,struct Rsc_Link *Link)
|
||||||
|
|
||||||
Rsc_Type_t Rsc_GetTypeFromString (const char *Str)
|
Rsc_Type_t Rsc_GetTypeFromString (const char *Str)
|
||||||
{
|
{
|
||||||
extern const char *Rsc_ResourceTypesDB[Rsc_NUM_TYPES];
|
|
||||||
Rsc_Type_t Type;
|
Rsc_Type_t Type;
|
||||||
|
|
||||||
/***** Compare string with all string types *****/
|
/***** Compare string with all string types *****/
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
#define Rsc_MAX_CHARS_RESOURCE_TITLE (128 - 1) // 127
|
#define Rsc_MAX_CHARS_RESOURCE_TITLE (128 - 1) // 127
|
||||||
#define Rsc_MAX_BYTES_RESOURCE_TITLE ((Rsc_MAX_CHARS_RESOURCE_TITLE + 1) * Str_MAX_BYTES_PER_CHAR - 1) // 2047
|
#define Rsc_MAX_BYTES_RESOURCE_TITLE ((Rsc_MAX_CHARS_RESOURCE_TITLE + 1) * Str_MAX_BYTES_PER_CHAR - 1) // 2047
|
||||||
|
|
||||||
#define Rsc_NUM_TYPES 11
|
#define Rsc_NUM_TYPES 14
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
Rsc_NONE,
|
Rsc_NONE,
|
||||||
|
@ -52,13 +52,16 @@ typedef enum
|
||||||
Rsc_CALL_FOR_EXAM,
|
Rsc_CALL_FOR_EXAM,
|
||||||
// tst TEST // User selects tags, teacher should select
|
// tst TEST // User selects tags, teacher should select
|
||||||
Rsc_EXAM,
|
Rsc_EXAM,
|
||||||
|
Rsc_EXAM_SESSION,
|
||||||
Rsc_GAME,
|
Rsc_GAME,
|
||||||
Rsc_SURVEY,
|
Rsc_GAME_MATCH,
|
||||||
|
Rsc_RUBRIC,
|
||||||
Rsc_DOCUMENT,
|
Rsc_DOCUMENT,
|
||||||
Rsc_MARKS,
|
Rsc_MARKS,
|
||||||
// grp GROUPS // ??? User select groups
|
// grp GROUPS // ??? User select groups
|
||||||
Rsc_ATTENDANCE_EVENT,
|
Rsc_ATTENDANCE_EVENT,
|
||||||
Rsc_FORUM_THREAD,
|
Rsc_FORUM_THREAD,
|
||||||
|
Rsc_SURVEY,
|
||||||
} Rsc_Type_t;
|
} Rsc_Type_t;
|
||||||
|
|
||||||
struct Rsc_Link
|
struct Rsc_Link
|
||||||
|
|
95
swad_text.c
95
swad_text.c
|
@ -20692,7 +20692,7 @@ const char *Txt_Match = // of a game
|
||||||
#elif L==5 // fr
|
#elif L==5 // fr
|
||||||
"Match";
|
"Match";
|
||||||
#elif L==6 // gn
|
#elif L==6 // gn
|
||||||
"Partida"; // Okoteve traducción
|
"Ñes&etilde;ha";
|
||||||
#elif L==7 // it
|
#elif L==7 // it
|
||||||
"Partita";
|
"Partita";
|
||||||
#elif L==8 // pl
|
#elif L==8 // pl
|
||||||
|
@ -20700,7 +20700,7 @@ const char *Txt_Match = // of a game
|
||||||
#elif L==9 // pt
|
#elif L==9 // pt
|
||||||
"Jogo";
|
"Jogo";
|
||||||
#elif L==10 // tr
|
#elif L==10 // tr
|
||||||
"Match"; // Çeviri lazim!
|
"Maç";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *Txt_MATCH_End =
|
const char *Txt_MATCH_End =
|
||||||
|
@ -36522,6 +36522,29 @@ const char *Txt_RESOURCE_TYPES[Rsc_NUM_TYPES] =
|
||||||
"Exame"
|
"Exame"
|
||||||
#elif L==10 // tr
|
#elif L==10 // tr
|
||||||
"Sınav"
|
"Sınav"
|
||||||
|
#endif
|
||||||
|
,
|
||||||
|
[Rsc_EXAM_SESSION] =
|
||||||
|
#if L==1 // ca
|
||||||
|
"Sessió d'examen"
|
||||||
|
#elif L==2 // de
|
||||||
|
"Prüfungssitzung"
|
||||||
|
#elif L==3 // en
|
||||||
|
"Exam session"
|
||||||
|
#elif L==4 // es
|
||||||
|
"Sesión de examen"
|
||||||
|
#elif L==5 // fr
|
||||||
|
"Session d'examen"
|
||||||
|
#elif L==6 // gn
|
||||||
|
"Sesión de examen" // Okoteve traducción
|
||||||
|
#elif L==7 // it
|
||||||
|
"Sessione d'esame"
|
||||||
|
#elif L==8 // pl
|
||||||
|
"Sesja egzaminacyjna"
|
||||||
|
#elif L==9 // pt
|
||||||
|
"Sessão de exame"
|
||||||
|
#elif L==10 // tr
|
||||||
|
"Sınav oturumu"
|
||||||
#endif
|
#endif
|
||||||
,
|
,
|
||||||
[Rsc_GAME] =
|
[Rsc_GAME] =
|
||||||
|
@ -36547,27 +36570,50 @@ const char *Txt_RESOURCE_TYPES[Rsc_NUM_TYPES] =
|
||||||
"Oyun"
|
"Oyun"
|
||||||
#endif
|
#endif
|
||||||
,
|
,
|
||||||
[Rsc_SURVEY] =
|
[Rsc_GAME_MATCH] =
|
||||||
#if L==1 // ca
|
#if L==1 // ca
|
||||||
"Enquesta"
|
"Partida"
|
||||||
#elif L==2 // de
|
#elif L==2 // de
|
||||||
"Umfrage"
|
"Spiel"
|
||||||
#elif L==3 // en
|
#elif L==3 // en
|
||||||
"Survey"
|
"Match"
|
||||||
#elif L==4 // es
|
#elif L==4 // es
|
||||||
"Encuesta"
|
"Partida"
|
||||||
#elif L==5 // fr
|
#elif L==5 // fr
|
||||||
"Sondage"
|
"Match"
|
||||||
#elif L==6 // gn
|
#elif L==6 // gn
|
||||||
"Encuesta" // Okoteve traducción
|
"Ñes&etilde;ha"
|
||||||
#elif L==7 // it
|
#elif L==7 // it
|
||||||
"Sondaggio"
|
"Partita"
|
||||||
#elif L==8 // pl
|
#elif L==8 // pl
|
||||||
"Ankieta"
|
"Mecz"
|
||||||
#elif L==9 // pt
|
#elif L==9 // pt
|
||||||
"Inquérito"
|
"Jogo"
|
||||||
#elif L==10 // tr
|
#elif L==10 // tr
|
||||||
"Anket"
|
"Maç"
|
||||||
|
#endif
|
||||||
|
,
|
||||||
|
[Rsc_RUBRIC] =
|
||||||
|
#if L==1 // ca
|
||||||
|
"Rúbrica"
|
||||||
|
#elif L==2 // de
|
||||||
|
"Rubrik"
|
||||||
|
#elif L==3 // en
|
||||||
|
"Rubric"
|
||||||
|
#elif L==4 // es
|
||||||
|
"Rúbrica"
|
||||||
|
#elif L==5 // fr
|
||||||
|
"Rubrique"
|
||||||
|
#elif L==6 // gn
|
||||||
|
"Rúbrica" // Okoteve traducción
|
||||||
|
#elif L==7 // it
|
||||||
|
"Rubriche"
|
||||||
|
#elif L==8 // pl
|
||||||
|
"Rubryki"
|
||||||
|
#elif L==9 // pt
|
||||||
|
"Rubrica"
|
||||||
|
#elif L==10 // tr
|
||||||
|
"Değerlendirme"
|
||||||
#endif
|
#endif
|
||||||
,
|
,
|
||||||
[Rsc_DOCUMENT] =
|
[Rsc_DOCUMENT] =
|
||||||
|
@ -36660,6 +36706,29 @@ const char *Txt_RESOURCE_TYPES[Rsc_NUM_TYPES] =
|
||||||
"Tópico do fórum"
|
"Tópico do fórum"
|
||||||
#elif L==10 // tr
|
#elif L==10 // tr
|
||||||
"Forum başlığı"
|
"Forum başlığı"
|
||||||
|
#endif
|
||||||
|
,
|
||||||
|
[Rsc_SURVEY] =
|
||||||
|
#if L==1 // ca
|
||||||
|
"Enquesta"
|
||||||
|
#elif L==2 // de
|
||||||
|
"Umfrage"
|
||||||
|
#elif L==3 // en
|
||||||
|
"Survey"
|
||||||
|
#elif L==4 // es
|
||||||
|
"Encuesta"
|
||||||
|
#elif L==5 // fr
|
||||||
|
"Sondage"
|
||||||
|
#elif L==6 // gn
|
||||||
|
"Encuesta" // Okoteve traducción
|
||||||
|
#elif L==7 // it
|
||||||
|
"Sondaggio"
|
||||||
|
#elif L==8 // pl
|
||||||
|
"Ankieta"
|
||||||
|
#elif L==9 // pt
|
||||||
|
"Inquérito"
|
||||||
|
#elif L==10 // tr
|
||||||
|
"Anket"
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue