mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-16 13:44:06 +02:00
Version 15.218.5
This commit is contained in:
parent
148d359b6a
commit
6ce573940d
|
@ -120,26 +120,31 @@
|
||||||
// TODO: Move info about number of files to bottom of file browsers
|
// TODO: Move info about number of files to bottom of file browsers
|
||||||
// TODO: To avoid wrong email addresses, when a user fills his/her email address, check if the domain is in the white list of allowed domains. If not, ask for confirmation.
|
// TODO: To avoid wrong email addresses, when a user fills his/her email address, check if the domain is in the white list of allowed domains. If not, ask for confirmation.
|
||||||
// TODO: Filtering email addresses --> an email address can not finish in "."
|
// TODO: Filtering email addresses --> an email address can not finish in "."
|
||||||
// TODO: Upload an image in social posts, in test questions, in forum posts, in private messages, etc.
|
|
||||||
// TODO: Change PhotoAttribution in table centres from TEXT to VARCHAR(255) (check maximum length first)
|
// TODO: Change PhotoAttribution in table centres from TEXT to VARCHAR(255) (check maximum length first)
|
||||||
// TODO: In social refreshing via AJAX, an error occurs when session expirates
|
// TODO: In social refreshing via AJAX, an error occurs when session expirates
|
||||||
// TODO: Messages in msg_content_deleted older than a certain time should be deleted to ensure the protection of personal data
|
// TODO: Messages in msg_content_deleted older than a certain time should be deleted to ensure the protection of personal data
|
||||||
// TODO: Request confirmation to remove user's photo
|
// TODO: Request confirmation to remove user's photo
|
||||||
// TODO: FIX BUG: In Statistics > Indicators, if we select only 5 indicators, the message "The list is too big..." is shown.
|
// TODO: FIX BUG: In Statistics > Indicators, if we select only 5 indicators, the message "The list is too big..." is shown.
|
||||||
// TODO: FIX BUG: A teacher uploads a document in course documents zone, then he/she unregister from course, the he/she search for his/her documents, a document is shown in results but he/she can not view it
|
// TODO: FIX BUG: A teacher uploads a document in course documents zone, then he/she unregister from course, the he/she search for his/her documents, a document is shown in results but he/she can not view it
|
||||||
// TODO: FIX BUG: Txt_Save_file_properties does not have sense in briefcase, because nothing to save (license should be editable in briefcase?)
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 15.218.3 (2016-06-04)"
|
#define Log_PLATFORM_VERSION "SWAD 15.218.5 (2016-06-04)"
|
||||||
#define CSS_FILE "swad15.218.css"
|
#define CSS_FILE "swad15.218.css"
|
||||||
#define JS_FILE "swad15.216.js"
|
#define JS_FILE "swad15.216.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 15.218.5: Jun 04, 2016 Fix bug in social notes, reported by Raymon Moreno Colina. (? lines)
|
||||||
|
2 changes necessary in database:
|
||||||
|
DROP INDEX NoteType ON social_notes;
|
||||||
|
CREATE INDEX NoteType ON social_notes (NoteType,Cod);
|
||||||
|
|
||||||
|
Version 15.218.4: Jun 04, 2016 User can change license of files in briefcase.
|
||||||
|
Code refactoring related to file metadata. (201936 lines)
|
||||||
Version 15.218.3: Jun 04, 2016 Code refactoring related to setlocale. (201952 lines)
|
Version 15.218.3: Jun 04, 2016 Code refactoring related to setlocale. (201952 lines)
|
||||||
Version 15.218.2: Jun 04, 2016 Checked value returned by setlocale in all calls. (201957 lines)
|
Version 15.218.2: Jun 04, 2016 Checked value returned by setlocale in all calls. (201957 lines)
|
||||||
Version 15.218.1: Jun 04, 2016 Change in listing of courses. (201934 lines)
|
Version 15.218.1: Jun 04, 2016 Change in listing of courses. (201934 lines)
|
||||||
|
|
|
@ -9236,7 +9236,6 @@ void Brw_ShowFileMetadata (void)
|
||||||
bool ICanView = false;
|
bool ICanView = false;
|
||||||
bool ICanEdit;
|
bool ICanEdit;
|
||||||
bool ICanChangePublic = false;
|
bool ICanChangePublic = false;
|
||||||
bool ICanChangeLicense = false;
|
|
||||||
bool FileHasPublisher;
|
bool FileHasPublisher;
|
||||||
bool ShowPhoto;
|
bool ShowPhoto;
|
||||||
char PhotoURL[PATH_MAX+1];
|
char PhotoURL[PATH_MAX+1];
|
||||||
|
@ -9326,6 +9325,8 @@ void Brw_ShowFileMetadata (void)
|
||||||
if (ICanEdit) // I can edit file properties
|
if (ICanEdit) // I can edit file properties
|
||||||
{
|
{
|
||||||
Act_FormStart (Brw_ActRecDatFile[Gbl.FileBrowser.Type]);
|
Act_FormStart (Brw_ActRecDatFile[Gbl.FileBrowser.Type]);
|
||||||
|
|
||||||
|
/* Can the file be public? */
|
||||||
switch (Gbl.FileBrowser.Type)
|
switch (Gbl.FileBrowser.Type)
|
||||||
{
|
{
|
||||||
case Brw_ADMI_DOCUM_INS:
|
case Brw_ADMI_DOCUM_INS:
|
||||||
|
@ -9336,40 +9337,27 @@ void Brw_ShowFileMetadata (void)
|
||||||
case Brw_ADMI_SHARE_DEG:
|
case Brw_ADMI_SHARE_DEG:
|
||||||
case Brw_ADMI_DOCUM_CRS:
|
case Brw_ADMI_DOCUM_CRS:
|
||||||
case Brw_ADMI_SHARE_CRS:
|
case Brw_ADMI_SHARE_CRS:
|
||||||
ICanChangePublic = true;
|
ICanChangePublic = true;
|
||||||
ICanChangeLicense = true;
|
|
||||||
break;
|
break;
|
||||||
case Brw_ADMI_TEACH_CRS:
|
default:
|
||||||
ICanChangePublic = false; // A file in teachers' zones can not be public...
|
ICanChangePublic = false;
|
||||||
ICanChangeLicense = true; // ...but I can change its license
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Put extra parameters */
|
||||||
|
switch (Gbl.FileBrowser.Type)
|
||||||
|
{
|
||||||
case Brw_ADMI_DOCUM_GRP:
|
case Brw_ADMI_DOCUM_GRP:
|
||||||
case Brw_ADMI_TEACH_GRP:
|
case Brw_ADMI_TEACH_GRP:
|
||||||
case Brw_ADMI_SHARE_GRP:
|
case Brw_ADMI_SHARE_GRP:
|
||||||
Grp_PutParamGrpCod (Gbl.CurrentCrs.Grps.GrpCod);
|
Grp_PutParamGrpCod (Gbl.CurrentCrs.Grps.GrpCod);
|
||||||
ICanChangePublic = false; // A file in group zones can not be public...
|
|
||||||
ICanChangeLicense = true; // ...but I can change its license
|
|
||||||
break;
|
|
||||||
case Brw_ADMI_ASSIG_USR:
|
|
||||||
case Brw_ADMI_WORKS_USR:
|
|
||||||
ICanChangePublic = false; // A file in assignments or works zones can not be public...
|
|
||||||
ICanChangeLicense = true; // ...but I can change its license
|
|
||||||
break;
|
break;
|
||||||
case Brw_ADMI_ASSIG_CRS:
|
case Brw_ADMI_ASSIG_CRS:
|
||||||
case Brw_ADMI_WORKS_CRS:
|
case Brw_ADMI_WORKS_CRS:
|
||||||
Usr_PutHiddenParUsrCodAll (Brw_ActRecDatFile[Gbl.FileBrowser.Type],Gbl.Usrs.Select.All);
|
Usr_PutHiddenParUsrCodAll (Brw_ActRecDatFile[Gbl.FileBrowser.Type],Gbl.Usrs.Select.All);
|
||||||
Usr_PutParamOtherUsrCodEncrypted ();
|
Usr_PutParamOtherUsrCodEncrypted ();
|
||||||
ICanChangePublic = false; // A file in assignments or works zones can not be public...
|
|
||||||
ICanChangeLicense = true; // ...but I can change its license
|
|
||||||
break;
|
|
||||||
case Brw_ADMI_MARKS_GRP:
|
|
||||||
Grp_PutParamGrpCod (Gbl.CurrentCrs.Grps.GrpCod);
|
|
||||||
ICanChangePublic = false;
|
|
||||||
ICanChangeLicense = false;
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ICanChangePublic = false;
|
|
||||||
ICanChangeLicense = false;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Brw_ParamListFiles (FileMetadata.FileType,
|
Brw_ParamListFiles (FileMetadata.FileType,
|
||||||
|
@ -9492,7 +9480,7 @@ void Brw_ShowFileMetadata (void)
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td class=\"DAT LEFT_MIDDLE\">",
|
"<td class=\"DAT LEFT_MIDDLE\">",
|
||||||
The_ClassForm[Gbl.Prefs.Theme],Txt_License);
|
The_ClassForm[Gbl.Prefs.Theme],Txt_License);
|
||||||
if (ICanChangeLicense) // I can edit file properties
|
if (ICanEdit) // I can edit file properties
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,"<select name=\"License\">");
|
fprintf (Gbl.F.Out,"<select name=\"License\">");
|
||||||
|
|
||||||
|
@ -9833,9 +9821,6 @@ static bool Brw_CheckIfICanEditFileMetadata (long PublisherUsrCod)
|
||||||
case ActReqDatWrkCrs: case ActChgDatWrkCrs:
|
case ActReqDatWrkCrs: case ActChgDatWrkCrs:
|
||||||
case ActReqDatWrkUsr: case ActChgDatWrkUsr:
|
case ActReqDatWrkUsr: case ActChgDatWrkUsr:
|
||||||
|
|
||||||
case ActReqDatAdmMrkCrs: case ActChgDatAdmMrkCrs:
|
|
||||||
case ActReqDatAdmMrkGrp: case ActChgDatAdmMrkGrp:
|
|
||||||
|
|
||||||
case ActReqDatBrf: case ActChgDatBrf:
|
case ActReqDatBrf: case ActChgDatBrf:
|
||||||
if (Gbl.Usrs.Me.Logged) // I am logged
|
if (Gbl.Usrs.Me.Logged) // I am logged
|
||||||
{
|
{
|
||||||
|
|
|
@ -1744,9 +1744,9 @@ void Soc_StoreAndPublishSocialNote (Soc_NoteType_t NoteType,long Cod,struct Soci
|
||||||
|
|
||||||
/***** Store social note *****/
|
/***** Store social note *****/
|
||||||
sprintf (Query,"INSERT INTO social_notes"
|
sprintf (Query,"INSERT INTO social_notes"
|
||||||
" (NoteType,UsrCod,HieCod,Cod,Unavailable,TimeNote)"
|
" (NoteType,Cod,UsrCod,HieCod,Unavailable,TimeNote)"
|
||||||
" VALUES ('%u','%ld','%ld','%ld','N',NOW())",
|
" VALUES ('%u','%ld','%ld','%ld','N',NOW())",
|
||||||
(unsigned) NoteType,Gbl.Usrs.Me.UsrDat.UsrCod,HieCod,Cod);
|
(unsigned) NoteType,Cod,Gbl.Usrs.Me.UsrDat.UsrCod,HieCod);
|
||||||
SocPub->NotCod = DB_QueryINSERTandReturnCode (Query,"can not create new social note");
|
SocPub->NotCod = DB_QueryINSERTandReturnCode (Query,"can not create new social note");
|
||||||
|
|
||||||
/***** Publish social note in timeline *****/
|
/***** Publish social note in timeline *****/
|
||||||
|
@ -4613,7 +4613,7 @@ static void Soc_AddNotesJustRetrievedToTimelineThisSession (void)
|
||||||
sprintf (Query,"INSERT IGNORE INTO social_timelines (SessionId,NotCod)"
|
sprintf (Query,"INSERT IGNORE INTO social_timelines (SessionId,NotCod)"
|
||||||
" SELECT DISTINCTROW '%s',NotCod FROM not_codes",
|
" SELECT DISTINCTROW '%s',NotCod FROM not_codes",
|
||||||
Gbl.Session.Id);
|
Gbl.Session.Id);
|
||||||
DB_QueryREPLACE (Query,"can not insert social notes in timeline");
|
DB_QueryINSERT (Query,"can not insert social notes in timeline");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
Loading…
Reference in New Issue
Block a user