mirror of https://github.com/acanas/swad-core.git
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: 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: 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: 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: 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: 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 *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#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 JS_FILE "swad15.216.js"
|
||||
|
||||
// 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
|
||||
/*
|
||||
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.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)
|
||||
|
|
|
@ -9236,7 +9236,6 @@ void Brw_ShowFileMetadata (void)
|
|||
bool ICanView = false;
|
||||
bool ICanEdit;
|
||||
bool ICanChangePublic = false;
|
||||
bool ICanChangeLicense = false;
|
||||
bool FileHasPublisher;
|
||||
bool ShowPhoto;
|
||||
char PhotoURL[PATH_MAX+1];
|
||||
|
@ -9326,6 +9325,8 @@ void Brw_ShowFileMetadata (void)
|
|||
if (ICanEdit) // I can edit file properties
|
||||
{
|
||||
Act_FormStart (Brw_ActRecDatFile[Gbl.FileBrowser.Type]);
|
||||
|
||||
/* Can the file be public? */
|
||||
switch (Gbl.FileBrowser.Type)
|
||||
{
|
||||
case Brw_ADMI_DOCUM_INS:
|
||||
|
@ -9336,40 +9337,27 @@ void Brw_ShowFileMetadata (void)
|
|||
case Brw_ADMI_SHARE_DEG:
|
||||
case Brw_ADMI_DOCUM_CRS:
|
||||
case Brw_ADMI_SHARE_CRS:
|
||||
ICanChangePublic = true;
|
||||
ICanChangeLicense = true;
|
||||
ICanChangePublic = true;
|
||||
break;
|
||||
case Brw_ADMI_TEACH_CRS:
|
||||
ICanChangePublic = false; // A file in teachers' zones can not be public...
|
||||
ICanChangeLicense = true; // ...but I can change its license
|
||||
default:
|
||||
ICanChangePublic = false;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Put extra parameters */
|
||||
switch (Gbl.FileBrowser.Type)
|
||||
{
|
||||
case Brw_ADMI_DOCUM_GRP:
|
||||
case Brw_ADMI_TEACH_GRP:
|
||||
case Brw_ADMI_SHARE_GRP:
|
||||
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;
|
||||
case Brw_ADMI_ASSIG_CRS:
|
||||
case Brw_ADMI_WORKS_CRS:
|
||||
Usr_PutHiddenParUsrCodAll (Brw_ActRecDatFile[Gbl.FileBrowser.Type],Gbl.Usrs.Select.All);
|
||||
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;
|
||||
default:
|
||||
ICanChangePublic = false;
|
||||
ICanChangeLicense = false;
|
||||
break;
|
||||
}
|
||||
Brw_ParamListFiles (FileMetadata.FileType,
|
||||
|
@ -9492,7 +9480,7 @@ void Brw_ShowFileMetadata (void)
|
|||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">",
|
||||
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\">");
|
||||
|
||||
|
@ -9833,9 +9821,6 @@ static bool Brw_CheckIfICanEditFileMetadata (long PublisherUsrCod)
|
|||
case ActReqDatWrkCrs: case ActChgDatWrkCrs:
|
||||
case ActReqDatWrkUsr: case ActChgDatWrkUsr:
|
||||
|
||||
case ActReqDatAdmMrkCrs: case ActChgDatAdmMrkCrs:
|
||||
case ActReqDatAdmMrkGrp: case ActChgDatAdmMrkGrp:
|
||||
|
||||
case ActReqDatBrf: case ActChgDatBrf:
|
||||
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 *****/
|
||||
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())",
|
||||
(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");
|
||||
|
||||
/***** Publish social note in timeline *****/
|
||||
|
@ -4613,7 +4613,7 @@ static void Soc_AddNotesJustRetrievedToTimelineThisSession (void)
|
|||
sprintf (Query,"INSERT IGNORE INTO social_timelines (SessionId,NotCod)"
|
||||
" SELECT DISTINCTROW '%s',NotCod FROM not_codes",
|
||||
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