From 22a619a45e798449b399fd93b8dbb345d09f13ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Tue, 2 May 2017 10:24:47 +0200 Subject: [PATCH] Version 16.200 --- swad_action.c | 3 + swad_action.h | 111 ++++++++++----------- swad_assignment.c | 240 +++++++++++++++++++++++++++------------------- swad_assignment.h | 2 + swad_attendance.c | 2 +- swad_changelog.h | 9 +- swad_survey.c | 2 +- 7 files changed, 214 insertions(+), 155 deletions(-) diff --git a/swad_action.c b/swad_action.c index 54a01d6c..0a7e73c1 100644 --- a/swad_action.c +++ b/swad_action.c @@ -437,6 +437,7 @@ Assessment: 312. ActRcvRchTxtAss Receive and change the rich text of the assessment system 313. ActFrmNewAsg Form to create a new assignment 314. ActEdiOneAsg Edit one assignment + NEW. ActPrnOneAsg Print one assignment 315. ActNewAsg Create new assignment 316. ActChgAsg Modify data of an existing assignment 317. ActReqRemAsg Request the removal of an assignment @@ -1883,6 +1884,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] = /* ActFrmNewAsg */{ 812,-1,TabUnk,ActSeeAsg ,0x110,0x100, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Asg_RequestCreatOrEditAsg ,NULL}, /* ActEdiOneAsg */{ 814,-1,TabUnk,ActSeeAsg ,0x110,0x100, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Asg_RequestCreatOrEditAsg ,NULL}, + /* ActPrnOneAsg */{1637,-1,TabUnk,ActSeeAsg ,0x1F8,0x100, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BLNK_WINDOW,NULL ,Asg_PrintOneAssignment ,NULL}, /* ActNewAsg */{ 803,-1,TabUnk,ActSeeAsg ,0x110,0x100, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Asg_RecFormAssignment ,NULL}, /* ActChgAsg */{ 815,-1,TabUnk,ActSeeAsg ,0x110,0x100, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Asg_RecFormAssignment ,NULL}, /* ActReqRemAsg */{ 813,-1,TabUnk,ActSeeAsg ,0x110,0x100, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Asg_ReqRemAssignment ,NULL}, @@ -4621,6 +4623,7 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un ActSeeCalDeg, // #1634 ActPrnCalDeg, // #1635 ActChgCalDeg1stDay, // #1636 + ActPrnOneAsg, // #1637 }; /*****************************************************************************/ diff --git a/swad_action.h b/swad_action.h index fc6b8f79..f98cc0a7 100644 --- a/swad_action.h +++ b/swad_action.h @@ -57,9 +57,9 @@ typedef enum typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to indicate obsolete action -#define Act_NUM_ACTIONS (1 + 9 + 43 + 17 + 47 + 32 + 24 + 115 + 71 + 416 + 159 + 172 + 42 + 14 + 96) +#define Act_NUM_ACTIONS (1 + 9 + 43 + 17 + 47 + 32 + 24 + 115 + 72 + 416 + 159 + 172 + 42 + 14 + 96) -#define Act_MAX_ACTION_COD 1636 +#define Act_MAX_ACTION_COD 1637 #define Act_MAX_OPTIONS_IN_MENU_PER_TAB 12 @@ -451,63 +451,64 @@ typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to #define ActFrmNewAsg (ActChgCalCrs1stDay + 17) #define ActEdiOneAsg (ActChgCalCrs1stDay + 18) -#define ActNewAsg (ActChgCalCrs1stDay + 19) -#define ActChgAsg (ActChgCalCrs1stDay + 20) -#define ActReqRemAsg (ActChgCalCrs1stDay + 21) -#define ActRemAsg (ActChgCalCrs1stDay + 22) -#define ActHidAsg (ActChgCalCrs1stDay + 23) -#define ActShoAsg (ActChgCalCrs1stDay + 24) +#define ActPrnOneAsg (ActChgCalCrs1stDay + 19) +#define ActNewAsg (ActChgCalCrs1stDay + 20) +#define ActChgAsg (ActChgCalCrs1stDay + 21) +#define ActReqRemAsg (ActChgCalCrs1stDay + 22) +#define ActRemAsg (ActChgCalCrs1stDay + 23) +#define ActHidAsg (ActChgCalCrs1stDay + 24) +#define ActShoAsg (ActChgCalCrs1stDay + 25) -#define ActSeeTst (ActChgCalCrs1stDay + 25) -#define ActAssTst (ActChgCalCrs1stDay + 26) -#define ActEdiTstQst (ActChgCalCrs1stDay + 27) -#define ActEdiOneTstQst (ActChgCalCrs1stDay + 28) -#define ActReqImpTstQst (ActChgCalCrs1stDay + 29) -#define ActImpTstQst (ActChgCalCrs1stDay + 30) -#define ActLstTstQst (ActChgCalCrs1stDay + 31) -#define ActRcvTstQst (ActChgCalCrs1stDay + 32) -#define ActReqRemTstQst (ActChgCalCrs1stDay + 33) -#define ActRemTstQst (ActChgCalCrs1stDay + 34) -#define ActShfTstQst (ActChgCalCrs1stDay + 35) -#define ActCfgTst (ActChgCalCrs1stDay + 36) -#define ActEnableTag (ActChgCalCrs1stDay + 37) -#define ActDisableTag (ActChgCalCrs1stDay + 38) -#define ActRenTag (ActChgCalCrs1stDay + 39) -#define ActRcvCfgTst (ActChgCalCrs1stDay + 40) +#define ActSeeTst (ActChgCalCrs1stDay + 26) +#define ActAssTst (ActChgCalCrs1stDay + 27) +#define ActEdiTstQst (ActChgCalCrs1stDay + 28) +#define ActEdiOneTstQst (ActChgCalCrs1stDay + 29) +#define ActReqImpTstQst (ActChgCalCrs1stDay + 30) +#define ActImpTstQst (ActChgCalCrs1stDay + 31) +#define ActLstTstQst (ActChgCalCrs1stDay + 32) +#define ActRcvTstQst (ActChgCalCrs1stDay + 33) +#define ActReqRemTstQst (ActChgCalCrs1stDay + 34) +#define ActRemTstQst (ActChgCalCrs1stDay + 35) +#define ActShfTstQst (ActChgCalCrs1stDay + 36) +#define ActCfgTst (ActChgCalCrs1stDay + 37) +#define ActEnableTag (ActChgCalCrs1stDay + 38) +#define ActDisableTag (ActChgCalCrs1stDay + 39) +#define ActRenTag (ActChgCalCrs1stDay + 40) +#define ActRcvCfgTst (ActChgCalCrs1stDay + 41) -#define ActReqSeeMyTstRes (ActChgCalCrs1stDay + 41) -#define ActSeeMyTstRes (ActChgCalCrs1stDay + 42) -#define ActSeeOneTstResMe (ActChgCalCrs1stDay + 43) -#define ActReqSeeUsrTstRes (ActChgCalCrs1stDay + 44) -#define ActSeeUsrTstRes (ActChgCalCrs1stDay + 45) -#define ActSeeOneTstResOth (ActChgCalCrs1stDay + 46) +#define ActReqSeeMyTstRes (ActChgCalCrs1stDay + 42) +#define ActSeeMyTstRes (ActChgCalCrs1stDay + 43) +#define ActSeeOneTstResMe (ActChgCalCrs1stDay + 44) +#define ActReqSeeUsrTstRes (ActChgCalCrs1stDay + 45) +#define ActSeeUsrTstRes (ActChgCalCrs1stDay + 46) +#define ActSeeOneTstResOth (ActChgCalCrs1stDay + 47) -#define ActSeeOneSvy (ActChgCalCrs1stDay + 47) -#define ActAnsSvy (ActChgCalCrs1stDay + 48) -#define ActFrmNewSvy (ActChgCalCrs1stDay + 49) -#define ActEdiOneSvy (ActChgCalCrs1stDay + 50) -#define ActNewSvy (ActChgCalCrs1stDay + 51) -#define ActChgSvy (ActChgCalCrs1stDay + 52) -#define ActReqRemSvy (ActChgCalCrs1stDay + 53) -#define ActRemSvy (ActChgCalCrs1stDay + 54) -#define ActReqRstSvy (ActChgCalCrs1stDay + 55) -#define ActRstSvy (ActChgCalCrs1stDay + 56) -#define ActHidSvy (ActChgCalCrs1stDay + 57) -#define ActShoSvy (ActChgCalCrs1stDay + 58) -#define ActEdiOneSvyQst (ActChgCalCrs1stDay + 59) -#define ActRcvSvyQst (ActChgCalCrs1stDay + 60) -#define ActReqRemSvyQst (ActChgCalCrs1stDay + 61) -#define ActRemSvyQst (ActChgCalCrs1stDay + 62) +#define ActSeeOneSvy (ActChgCalCrs1stDay + 48) +#define ActAnsSvy (ActChgCalCrs1stDay + 49) +#define ActFrmNewSvy (ActChgCalCrs1stDay + 50) +#define ActEdiOneSvy (ActChgCalCrs1stDay + 51) +#define ActNewSvy (ActChgCalCrs1stDay + 52) +#define ActChgSvy (ActChgCalCrs1stDay + 53) +#define ActReqRemSvy (ActChgCalCrs1stDay + 54) +#define ActRemSvy (ActChgCalCrs1stDay + 55) +#define ActReqRstSvy (ActChgCalCrs1stDay + 56) +#define ActRstSvy (ActChgCalCrs1stDay + 57) +#define ActHidSvy (ActChgCalCrs1stDay + 58) +#define ActShoSvy (ActChgCalCrs1stDay + 59) +#define ActEdiOneSvyQst (ActChgCalCrs1stDay + 60) +#define ActRcvSvyQst (ActChgCalCrs1stDay + 61) +#define ActReqRemSvyQst (ActChgCalCrs1stDay + 62) +#define ActRemSvyQst (ActChgCalCrs1stDay + 63) -#define ActSeeOneExaAnn (ActChgCalCrs1stDay + 63) -#define ActSeeDatExaAnn (ActChgCalCrs1stDay + 64) -#define ActEdiExaAnn (ActChgCalCrs1stDay + 65) -#define ActRcvExaAnn (ActChgCalCrs1stDay + 66) -#define ActPrnExaAnn (ActChgCalCrs1stDay + 67) -#define ActReqRemExaAnn (ActChgCalCrs1stDay + 68) -#define ActRemExaAnn (ActChgCalCrs1stDay + 69) -#define ActHidExaAnn (ActChgCalCrs1stDay + 70) -#define ActShoExaAnn (ActChgCalCrs1stDay + 71) +#define ActSeeOneExaAnn (ActChgCalCrs1stDay + 64) +#define ActSeeDatExaAnn (ActChgCalCrs1stDay + 65) +#define ActEdiExaAnn (ActChgCalCrs1stDay + 66) +#define ActRcvExaAnn (ActChgCalCrs1stDay + 67) +#define ActPrnExaAnn (ActChgCalCrs1stDay + 68) +#define ActReqRemExaAnn (ActChgCalCrs1stDay + 69) +#define ActRemExaAnn (ActChgCalCrs1stDay + 70) +#define ActHidExaAnn (ActChgCalCrs1stDay + 71) +#define ActShoExaAnn (ActChgCalCrs1stDay + 72) /*****************************************************************************/ /******************************** Files tab **********************************/ diff --git a/swad_assignment.c b/swad_assignment.c index a785c894..9935d424 100644 --- a/swad_assignment.c +++ b/swad_assignment.c @@ -63,15 +63,16 @@ extern struct Globals Gbl; /*****************************************************************************/ static void Asg_ShowAllAssignments (void); +static void Asg_PutHeadForSeeing (void); static bool Asg_CheckIfICanCreateAssignments (void); static void Asg_PutIconsListAssignments (void); static void Asg_PutIconToCreateNewAsg (void); static void Asg_PutButtonToCreateNewAsg (void); static void Asg_PutFormToSelectWhichGroupsToShow (void); static void Asg_ParamsWhichGroupsToShow (void); -static void Asg_ShowOneAssignment (long AsgCod); +static void Asg_ShowOneAssignment (long AsgCod,bool PrintView); static void Asg_WriteAsgAuthor (struct Assignment *Asg); -static void Asg_WriteAssignmentFolder (struct Assignment *Asg); +static void Asg_WriteAssignmentFolder (struct Assignment *Asg,bool PrintView); static void Asg_GetParamAsgOrder (void); static void Asg_PutFormsToRemEditOneAsg (long AsgCod,bool Hidden); @@ -114,13 +115,7 @@ static void Asg_ShowAllAssignments (void) { extern const char *Hlp_ASSESSMENT_Assignments; extern const char *Txt_Assignments; - extern const char *Txt_START_END_TIME_HELP[Dat_NUM_START_END_TIME]; - extern const char *Txt_START_END_TIME[Dat_NUM_START_END_TIME]; - extern const char *Txt_Assignment; - extern const char *Txt_Upload_files_QUESTION; - extern const char *Txt_Folder; extern const char *Txt_No_assignments; - Dat_StartEndTime_t Order; struct Pagination Pagination; unsigned NumAsg; @@ -151,45 +146,14 @@ static void Asg_ShowAllAssignments (void) { /***** Table head *****/ Lay_StartTableWideMargin (2); - fprintf (Gbl.F.Out,""); - for (Order = Dat_START_TIME; - Order <= Dat_END_TIME; - Order++) - { - fprintf (Gbl.F.Out,""); - Act_FormStart (ActSeeAsg); - Grp_PutParamWhichGrps (); - Pag_PutHiddenParamPagNum (Pag_ASSIGNMENTS,Gbl.Asgs.CurrentPage); - Par_PutHiddenParamUnsigned ("Order",(unsigned) Order); - Act_LinkFormSubmit (Txt_START_END_TIME_HELP[Order],"TIT_TBL",NULL); - if (Order == Gbl.Asgs.SelectedOrder) - fprintf (Gbl.F.Out,""); - fprintf (Gbl.F.Out,"%s",Txt_START_END_TIME[Order]); - if (Order == Gbl.Asgs.SelectedOrder) - fprintf (Gbl.F.Out,""); - fprintf (Gbl.F.Out,""); - Act_FormEnd (); - fprintf (Gbl.F.Out,""); - } - fprintf (Gbl.F.Out,"" - "%s" - "" - "" - "%s" - "" - "" - "%s" - "" - "", - Txt_Assignment, - Txt_Upload_files_QUESTION, - Txt_Folder); + Asg_PutHeadForSeeing (); /***** Write all the assignments *****/ for (NumAsg = Pagination.FirstItemVisible; NumAsg <= Pagination.LastItemVisible; NumAsg++) - Asg_ShowOneAssignment (Gbl.Asgs.LstAsgCods[NumAsg - 1]); + Asg_ShowOneAssignment (Gbl.Asgs.LstAsgCods[NumAsg - 1], + false); // Not print view /***** End table *****/ Lay_EndTable (); @@ -214,6 +178,54 @@ static void Asg_ShowAllAssignments (void) Asg_FreeListAssignments (); } +/*****************************************************************************/ +/***************** Write header with fields of an assignment *****************/ +/*****************************************************************************/ + +static void Asg_PutHeadForSeeing (void) + { + extern const char *Txt_START_END_TIME_HELP[Dat_NUM_START_END_TIME]; + extern const char *Txt_START_END_TIME[Dat_NUM_START_END_TIME]; + extern const char *Txt_Assignment; + extern const char *Txt_Upload_files_QUESTION; + extern const char *Txt_Folder; + Dat_StartEndTime_t Order; + + fprintf (Gbl.F.Out,""); + for (Order = Dat_START_TIME; + Order <= Dat_END_TIME; + Order++) + { + fprintf (Gbl.F.Out,""); + Act_FormStart (ActSeeAsg); + Grp_PutParamWhichGrps (); + Pag_PutHiddenParamPagNum (Pag_ASSIGNMENTS,Gbl.Asgs.CurrentPage); + Par_PutHiddenParamUnsigned ("Order",(unsigned) Order); + Act_LinkFormSubmit (Txt_START_END_TIME_HELP[Order],"TIT_TBL",NULL); + if (Order == Gbl.Asgs.SelectedOrder) + fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,"%s",Txt_START_END_TIME[Order]); + if (Order == Gbl.Asgs.SelectedOrder) + fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,""); + Act_FormEnd (); + fprintf (Gbl.F.Out,""); + } + fprintf (Gbl.F.Out,"" + "%s" + "" + "" + "%s" + "" + "" + "%s" + "" + "", + Txt_Assignment, + Txt_Upload_files_QUESTION, + Txt_Folder); + } + /*****************************************************************************/ /******************** Check if I can create assignments **********************/ /*****************************************************************************/ @@ -287,11 +299,40 @@ static void Asg_ParamsWhichGroupsToShow (void) Pag_PutHiddenParamPagNum (Pag_ASSIGNMENTS,Gbl.Asgs.CurrentPage); } +/*****************************************************************************/ +/******************** Show print view of one assignment **********************/ +/*****************************************************************************/ + +void Asg_PrintOneAssignment (void) + { + long AsgCod; + + /***** Get the code of the assignment *****/ + AsgCod = Asg_GetParamAsgCod (); + + /***** Start frame *****/ + Lay_WriteHeaderClassPhoto (true,false, + Gbl.CurrentIns.Ins.InsCod, + Gbl.CurrentDeg.Deg.DegCod, + Gbl.CurrentCrs.Crs.CrsCod); + + /***** Table head *****/ + Lay_StartTableWideMargin (2); + Asg_PutHeadForSeeing (); + + /***** Write assignment *****/ + Asg_ShowOneAssignment (AsgCod, + true); // Print view + + /***** End table *****/ + Lay_EndTable (); + } + /*****************************************************************************/ /*************************** Show one assignment *****************************/ /*****************************************************************************/ -static void Asg_ShowOneAssignment (long AsgCod) +static void Asg_ShowOneAssignment (long AsgCod,bool PrintView) { extern const char *Txt_Today; extern const char *Txt_ASSIGNMENT_TYPES[Asg_NUM_TYPES_SEND_WORK]; @@ -368,7 +409,8 @@ static void Asg_ShowOneAssignment (long AsgCod) /* Assignment folder */ fprintf (Gbl.F.Out,"", Gbl.RowEvenOdd); - Asg_WriteAssignmentFolder (&Asg); + if (Asg.SendWork == Asg_SEND_WORK) + Asg_WriteAssignmentFolder (&Asg,PrintView); fprintf (Gbl.F.Out,"" ""); @@ -381,15 +423,9 @@ static void Asg_ShowOneAssignment (long AsgCod) Asg_WriteAsgAuthor (&Asg); /* Forms to remove/edit this assignment */ - switch (Gbl.Usrs.Me.LoggedRole) - { - case Rol_TEACHER: - case Rol_SYS_ADM: - Asg_PutFormsToRemEditOneAsg (Asg.AsgCod,Asg.Hidden); - break; - default: - break; - } + if (!PrintView) + Asg_PutFormsToRemEditOneAsg (Asg.AsgCod,Asg.Hidden); + fprintf (Gbl.F.Out,""); /* Text of the assignment */ @@ -433,45 +469,45 @@ static void Asg_WriteAsgAuthor (struct Assignment *Asg) /********************* Write the folder of an assignment *********************/ /*****************************************************************************/ -static void Asg_WriteAssignmentFolder (struct Assignment *Asg) +static void Asg_WriteAssignmentFolder (struct Assignment *Asg,bool PrintView) { extern const char *Txt_Upload_file_or_create_folder_in_FOLDER; extern const char *Txt_Folder; + bool ICanSendFiles = !Asg->Hidden && // It's visible (not hidden) + Asg->Open && // It's open (inside dates) + Asg->IBelongToCrsOrGrps && // I belong to course or groups + Gbl.Usrs.Me.LoggedRole == Rol_STUDENT; // I am a student - if (Asg->SendWork == Asg_SEND_WORK) + /***** Folder icon *****/ + if (!PrintView && // Not print view + ICanSendFiles) // I can send files to this assignment folder { - /***** Folder icon *****/ - if (!Asg->Hidden && // It's visible (not hidden) - Asg->Open && // It's open (inside dates) - Asg->IBelongToCrsOrGrps && // I belong to course or groups - Gbl.Usrs.Me.LoggedRole == Rol_STUDENT) // I am a student - // I can send files to this assignment folder - { - /* Form to create a new file or folder */ - Act_FormStart (ActFrmCreAsgUsr); - Brw_PutParamsFileBrowser (ActUnk, - Brw_INTERNAL_NAME_ROOT_FOLDER_ASSIGNMENTS, - Asg->Folder, - Brw_IS_FOLDER,-1L); - sprintf (Gbl.Title,Txt_Upload_file_or_create_folder_in_FOLDER, - Asg->Folder); - fprintf (Gbl.F.Out,"", - Gbl.Prefs.IconsURL, - Gbl.Title, - Gbl.Title); - Act_FormEnd (); - } - else // I can't send files to this assignment folder - fprintf (Gbl.F.Out,"\"%s\"", - Gbl.Prefs.IconsURL, - Txt_Folder,Txt_Folder); - - /***** Folder name *****/ - fprintf (Gbl.F.Out,"%s",Asg->Folder); + /* Form to create a new file or folder */ + Act_FormStart (ActFrmCreAsgUsr); + Brw_PutParamsFileBrowser (ActUnk, + Brw_INTERNAL_NAME_ROOT_FOLDER_ASSIGNMENTS, + Asg->Folder, + Brw_IS_FOLDER,-1L); + sprintf (Gbl.Title,Txt_Upload_file_or_create_folder_in_FOLDER, + Asg->Folder); + fprintf (Gbl.F.Out,"", + Gbl.Prefs.IconsURL, + Gbl.Title, + Gbl.Title); + Act_FormEnd (); } + else // I can't send files to this assignment folder + fprintf (Gbl.F.Out,"\"%s\"", + Gbl.Prefs.IconsURL, + ICanSendFiles ? "folder-open16x16.gif" : + "folder-closed16x16.gif", + Txt_Folder,Txt_Folder); + + /***** Folder name *****/ + fprintf (Gbl.F.Out,"%s",Asg->Folder); } /*****************************************************************************/ @@ -502,21 +538,33 @@ void Asg_PutHiddenParamAsgOrder (void) static void Asg_PutFormsToRemEditOneAsg (long AsgCod,bool Hidden) { - fprintf (Gbl.F.Out,"
"); + fprintf (Gbl.F.Out,"
"); Gbl.Asgs.AsgCodToEdit = AsgCod; // Used as parameter in contextual links - /***** Put form to remove assignment *****/ - Lay_PutContextualIconToRemove (ActReqRemAsg,Asg_PutParams); + switch (Gbl.Usrs.Me.LoggedRole) + { + case Rol_TEACHER: + case Rol_SYS_ADM: + /***** Put form to remove assignment *****/ + Lay_PutContextualIconToRemove (ActReqRemAsg,Asg_PutParams); - /***** Put form to hide/show assignment *****/ - if (Hidden) - Lay_PutContextualIconToUnhide (ActShoAsg,Asg_PutParams); - else - Lay_PutContextualIconToHide (ActHidAsg,Asg_PutParams); + /***** Put form to hide/show assignment *****/ + if (Hidden) + Lay_PutContextualIconToUnhide (ActShoAsg,Asg_PutParams); + else + Lay_PutContextualIconToHide (ActHidAsg,Asg_PutParams); - /***** Put form to edit assignment *****/ - Lay_PutContextualIconToEdit (ActEdiOneAsg,Asg_PutParams); + /***** Put form to edit assignment *****/ + Lay_PutContextualIconToEdit (ActEdiOneAsg,Asg_PutParams); + // no break + case Rol_STUDENT: + /***** Put form to print assignment *****/ + Lay_PutContextualIconToPrint (ActPrnOneAsg,Asg_PutParams); + break; + default: + break; + } fprintf (Gbl.F.Out,"
"); } diff --git a/swad_assignment.h b/swad_assignment.h index 98dc0f86..1e617a15 100644 --- a/swad_assignment.h +++ b/swad_assignment.h @@ -69,6 +69,8 @@ struct Assignment /*****************************************************************************/ void Asg_SeeAssignments (void); +void Asg_PrintOneAssignment (void); + void Asg_PutHiddenParamAsgOrder (void); void Asg_RequestCreatOrEditAsg (void); void Asg_GetListAssignments (void); diff --git a/swad_attendance.c b/swad_attendance.c index f0e67d3b..15abf0d0 100644 --- a/swad_attendance.c +++ b/swad_attendance.c @@ -542,7 +542,7 @@ static void Att_PutFormToListStdsParams (void) static void Att_PutFormsToRemEditOneAttEvent (long AttCod,bool Hidden) { - fprintf (Gbl.F.Out,"
"); + fprintf (Gbl.F.Out,"
"); Gbl.AttEvents.AttCodToEdit = AttCod; // Used as parameters in contextual links diff --git a/swad_changelog.h b/swad_changelog.h index 1fef5817..cddbe5fa 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -217,19 +217,24 @@ // TODO: Change numbers of notifications in program and database to match order in tabs // TODO: Icon to view en "Fuente de información" -// TODO: Print view of an assignment (suggested by Sandra Daniela Tazzioli Barroso). +// TODO: Change layout of contextual icons in assignments, surveys and attendance +// TODO: Fix problem printing view of students, teachers, etc. /*****************************************************************************/ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.199 (2017-05-02)" +#define Log_PLATFORM_VERSION "SWAD 16.200 (2017-05-02)" #define CSS_FILE "swad16.195.8.css" #define JS_FILE "swad16.181.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.200: May 02, 2017 Print view of an assignment, suggested by Sandra Daniela Tazzioli Barroso. (218337 lines) + 1 change necessary in database: +INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1637','es','N','Imprimir actividad'); + Version 16.199: May 02, 2017 Code refactoring related to message author. (218291 lines) Version 16.198.9: May 02, 2017 Code refactoring related to message author. (218345 lines) Version 16.198.8: May 01, 2017 Code refactoring related to tables. (218323 lines) diff --git a/swad_survey.c b/swad_survey.c index e98cb491..c1d12d4e 100644 --- a/swad_survey.c +++ b/swad_survey.c @@ -783,7 +783,7 @@ static void Svy_PutFormsToRemEditOneSvy (long SvyCod,bool Visible) { extern const char *Txt_Reset; - fprintf (Gbl.F.Out,"
"); + fprintf (Gbl.F.Out,"
"); Gbl.Svys.SvyCodToEdit = SvyCod; // Used as parameters in contextual links