mirror of https://github.com/acanas/swad-core.git
Version 16.68.5
This commit is contained in:
parent
9c490f279c
commit
faa0c5c44f
|
@ -172,13 +172,14 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 16.68.4 (2016-11-22)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 16.68.5 (2016-11-22)"
|
||||
#define CSS_FILE "swad16.68.css"
|
||||
#define JS_FILE "swad16.46.1.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 16.68.5: Nov 22, 2016 Code refactoring and change in layout of file browser and contextual links. (207443 lines)
|
||||
Version 16.68.4: Nov 22, 2016 Code refactoring in file browser. (207447 lines)
|
||||
Version 16.68.3: Nov 22, 2016 Change in layout of contextual links in file browsers. (207436 lines)
|
||||
Version 16.68.2: Nov 22, 2016 Code refactoring related to file browser and contextual checkbox. (207438 lines)
|
||||
|
|
|
@ -1450,7 +1450,6 @@ static bool Brw_CheckIfQuotaExceded (void);
|
|||
|
||||
static void Brw_ShowFileBrowserNormal (void);
|
||||
static void Brw_ShowFileBrowsersAsgWrkCrs (void);
|
||||
static void Brw_PutLinkZIPAsgWrk (void);
|
||||
static void Brw_ShowFileBrowsersAsgWrkUsr (void);
|
||||
|
||||
static void Brw_FormToChangeCrsGrpZone (void);
|
||||
|
@ -3131,8 +3130,9 @@ static void Brw_ShowFileBrowsersAsgWrkCrs (void)
|
|||
/***** Check the number of users whose works will be shown *****/
|
||||
if (Usr_CountNumUsrsInListOfSelectedUsrs ()) // If some users are selected...
|
||||
{
|
||||
/***** Put link to download / create zip file *****/
|
||||
Brw_PutLinkZIPAsgWrk ();
|
||||
/***** Create the zip file and put a link to download it *****/
|
||||
if (Gbl.FileBrowser.ZIP.CreateZIP)
|
||||
ZIP_CreateZIPAsgWrk ();
|
||||
|
||||
/***** Write top before showing file browser *****/
|
||||
Brw_WriteTopBeforeShowingFileBrowser ();
|
||||
|
@ -3189,23 +3189,6 @@ static void Brw_ShowFileBrowsersAsgWrkCrs (void)
|
|||
Usr_FreeListsSelectedUsrsCods ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******** Put link to download / create zip file in assigments / works *******/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Brw_PutLinkZIPAsgWrk (void)
|
||||
{
|
||||
if (Gbl.FileBrowser.ZIP.CreateZIP)
|
||||
{
|
||||
/* Create the zip file and put a link to download it */
|
||||
ZIP_CreateZIPAsgWrk ();
|
||||
}
|
||||
else
|
||||
/***** Button to create a zip file
|
||||
with all the works of the selected users *****/
|
||||
ZIP_PutButtonToCreateZIPAsgWrk ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************ Show file browsers with works files of one user ****************/
|
||||
/*****************************************************************************/
|
||||
|
@ -3726,10 +3709,22 @@ static void Brw_WriteTopBeforeShowingFileBrowser (void)
|
|||
/* Put checkbox to show the full tree */
|
||||
Brw_PutCheckboxFullTree ();
|
||||
|
||||
/* Put link to remove old files */
|
||||
if (Gbl.FileBrowser.Type == Brw_ADMI_BRIEF_USR &&
|
||||
Gbl.Action.Act != ActReqRemOldBrf)
|
||||
Brw_PutLinkToAskRemOldFiles ();
|
||||
switch (Gbl.FileBrowser.Type)
|
||||
{
|
||||
case Brw_ADMI_ASSIG_CRS:
|
||||
case Brw_ADMI_WORKS_CRS:
|
||||
/* Put link to create a zip file with all the works of the selected users */
|
||||
if (!Gbl.FileBrowser.ZIP.CreateZIP)
|
||||
ZIP_PutLinkToCreateZIPAsgWrk ();
|
||||
break;
|
||||
case Brw_ADMI_BRIEF_USR:
|
||||
/* Put link to remove old files */
|
||||
if (Gbl.Action.Act != ActReqRemOldBrf)
|
||||
Brw_PutLinkToAskRemOldFiles ();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
|
||||
|
|
12
swad_zip.c
12
swad_zip.c
|
@ -102,7 +102,7 @@ extern struct Globals Gbl;
|
|||
/***************************** Internal prototypes ***************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void ZIP_PutButtonToCreateZIPAsgWrkParams (void);
|
||||
static void ZIP_PutLinkToCreateZIPAsgWrkParams (void);
|
||||
|
||||
static void ZIP_CreateTmpDirForCompression (void);
|
||||
static void ZIP_CreateDirCompressionUsr (struct UsrData *UsrDat);
|
||||
|
@ -113,22 +113,20 @@ static void ZIP_ShowLinkToDownloadZIP (const char *FileName,const char *URL,
|
|||
off_t FileSize,unsigned long long UncompressedSize);
|
||||
|
||||
/*****************************************************************************/
|
||||
/********* Put button to create ZIP file of assignments and works ************/
|
||||
/*********** Put link to create ZIP file of assignments and works ************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void ZIP_PutButtonToCreateZIPAsgWrk (void)
|
||||
void ZIP_PutLinkToCreateZIPAsgWrk (void)
|
||||
{
|
||||
extern const char *Txt_Create_ZIP_file;
|
||||
|
||||
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
|
||||
Lay_PutContextualLink (ActAdmAsgWrkCrs,ZIP_PutButtonToCreateZIPAsgWrkParams,
|
||||
Lay_PutContextualLink (ActAdmAsgWrkCrs,ZIP_PutLinkToCreateZIPAsgWrkParams,
|
||||
"download64x64.png",
|
||||
Txt_Create_ZIP_file,Txt_Create_ZIP_file,
|
||||
NULL);
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
|
||||
static void ZIP_PutButtonToCreateZIPAsgWrkParams (void)
|
||||
static void ZIP_PutLinkToCreateZIPAsgWrkParams (void)
|
||||
{
|
||||
Usr_PutHiddenParUsrCodAll (ActAdmAsgWrkCrs,Gbl.Usrs.Select.All);
|
||||
if (Gbl.FileBrowser.FullTree)
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
/***************************** Public prototypes *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void ZIP_PutButtonToCreateZIPAsgWrk (void);
|
||||
void ZIP_PutLinkToCreateZIPAsgWrk (void);
|
||||
bool ZIP_GetCreateZIPFromForm (void);
|
||||
void ZIP_CreateZIPAsgWrk (void);
|
||||
|
||||
|
|
Loading…
Reference in New Issue