From c118fb8dcc6d90016c0493178393f92c89f732e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Fri, 18 Mar 2016 10:32:13 +0100 Subject: [PATCH] Version 15.149.1 --- swad_changelog.h | 10 ++++++- swad_file_browser.c | 4 +-- swad_info.c | 11 ++----- swad_syllabus.c | 51 ++++++++++++++++---------------- swad_text.c | 72 +++++++++++++-------------------------------- 5 files changed, 59 insertions(+), 89 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index a5241eead..ea0687326 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -125,17 +125,25 @@ // TODO: Fix bug in marks reported by Francisco Ocaña // TODO: When a new user (a guest not registered in any course) creates a new course ==> register him/her automatically as a teacher in the course just created +// TODO: Show tagline at top, near logo +// TODO: Show big header h1 when no country specified +// TODO: Integrate "Print" link +// TODO: Remove "View" link from course info + /*****************************************************************************/ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.149 (2016-03-17)" +#define Log_PLATFORM_VERSION "SWAD 15.149.1 (2016-03-18)" #define CSS_FILE "swad15.146.css" #define JS_FILE "swad15.131.3.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.149.1: Mar 18, 2016 Button Done after internal editor of syllabus. + Focus on new item in internal editor of syllabus. + Removed links to view course info. (195920 lines) Version 15.149: Mar 17, 2016 Icon to edit course info integrated in frame. Code refacgtoring related to course info. (195949 lines) Version 15.148: Mar 17, 2016 Icon to see/edit file browser integrated in frame. (195914 lines) diff --git a/swad_file_browser.c b/swad_file_browser.c index 467404667..91e8d477f 100644 --- a/swad_file_browser.c +++ b/swad_file_browser.c @@ -7879,7 +7879,7 @@ static void Brw_PutFormToUploadFilesUsingDropzone (const char *FileNameToShow) extern const char *Txt_or_you_can_upload_new_files_to_the_folder_X; extern const char *Txt_Select_one_or_more_files_from_your_computer_or_drag_and_drop_here; extern const char *Txt_STR_LANG_ID[1+Txt_NUM_LANGUAGES]; - extern const char *Txt_FILE_UPLOAD_Done; + extern const char *Txt_Done; extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS]; /***** Start frame *****/ @@ -7949,7 +7949,7 @@ static void Brw_PutFormToUploadFilesUsingDropzone (const char *FileNameToShow) Par_PutHiddenParamChar ("FullTree",'Y'); /***** Button to send *****/ - Lay_PutConfirmButton (Txt_FILE_UPLOAD_Done); + Lay_PutConfirmButton (Txt_Done); /***** End form *****/ Act_FormEnd (); diff --git a/swad_info.c b/swad_info.c index 4b3204185..9329920cf 100644 --- a/swad_info.c +++ b/swad_info.c @@ -920,23 +920,16 @@ void Inf_SetInfoSrc (void) void Inf_FormsToSelSendInfo (void) { - extern const char *Txt_View; extern const char *Txt_Source_of_information; extern const char *Txt_INFO_SRC_FULL_TEXT[Inf_NUM_INFO_SOURCES]; extern const char *Txt_INFO_SRC_HELP[Inf_NUM_INFO_SOURCES]; - Inf_InfoSrc_t InfoSrc,InfoSrcSelected; + Inf_InfoSrc_t InfoSrc; + Inf_InfoSrc_t InfoSrcSelected; bool MustBeRead; /***** Set info type *****/ Gbl.CurrentCrs.Info.Type = Inf_AsignInfoType (); - /***** Put link to view *****/ - fprintf (Gbl.F.Out,"
"); - Lay_PutContextualLink (Inf_ActionsSeeInfo[Gbl.CurrentCrs.Info.Type],NULL, - "eye-on64x64.png", - Txt_View,Txt_View); - fprintf (Gbl.F.Out,"
"); - /***** Get info source from database *****/ Inf_GetInfoSrcFromDB (Gbl.CurrentCrs.Crs.CrsCod,Gbl.CurrentCrs.Info.Type,&InfoSrcSelected,&MustBeRead); diff --git a/swad_syllabus.c b/swad_syllabus.c index 55ecd72cd..9ab228ac0 100644 --- a/swad_syllabus.c +++ b/swad_syllabus.c @@ -180,13 +180,12 @@ void Syl_GetParamItemNumber (void) void Syl_EditSyllabus (void) { extern const Act_Action_t Inf_ActionsSeeInfo[Inf_NUM_INFO_TYPES]; - extern const char *Txt_View; extern const char *Txt_INFO_TITLE[Inf_NUM_INFO_TYPES]; - extern const char *Txt_This_syllabus_has_been_edited_by_teachers_of_the_course_; + extern const char *Txt_Done; extern const char *Txt_The_syllabus_lectures_of_the_course_X_is_not_available; extern const char *Txt_The_syllabus_practicals_of_the_course_X_is_not_available; - bool ICanEdit = (Gbl.Usrs.Me.LoggedRole == Rol_TEACHER || - Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM); + bool ICanEdit; + bool PutIconToEdit; /***** Set syllabus type and load syllabus from XML file to memory *****/ Syl_SetSyllabusTypeAndLoadToMemory (); @@ -197,21 +196,14 @@ void Syl_EditSyllabus (void) if (Gbl.CurrentCrs.Syllabus.EditionIsActive || LstItemsSyllabus.NumItems) { - if (Gbl.CurrentCrs.Syllabus.EditionIsActive) - { - /***** Put link to view *****/ - fprintf (Gbl.F.Out,"
"); - Lay_PutContextualLink (Inf_ActionsSeeInfo[Gbl.CurrentCrs.Info.Type],NULL, - "eye-on64x64.png", - Txt_View,Txt_View); - fprintf (Gbl.F.Out,"
"); - } - - /***** Start of table *****/ + /***** Start frame *****/ + ICanEdit = Gbl.Usrs.Me.LoggedRole == Rol_TEACHER || + Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM; + PutIconToEdit = ICanEdit && !Gbl.CurrentCrs.Syllabus.EditionIsActive; Lay_StartRoundFrame (NULL,Txt_INFO_TITLE[Gbl.CurrentCrs.Info.Type], - ICanEdit ? Inf_PutIconToEditInfo : - NULL); - fprintf (Gbl.F.Out,""); + PutIconToEdit ? Inf_PutIconToEditInfo : + NULL); + fprintf (Gbl.F.Out,"
"); /***** Write the current syllabus *****/ Syl_ShowSyllabus (); @@ -220,14 +212,19 @@ void Syl_EditSyllabus (void) if (Gbl.CurrentCrs.Syllabus.EditionIsActive && LstItemsSyllabus.NumItems == 0) Syl_ShowRowSyllabus (0,1,LstItemsSyllabus.Lst[0].CodItem,"",true); - /***** End of table *****/ + /***** End table *****/ fprintf (Gbl.F.Out,"
"); - Lay_EndRoundFrame (); - if (!Gbl.CurrentCrs.Syllabus.EditionIsActive) - fprintf (Gbl.F.Out,"
" - "
%s
", - Txt_This_syllabus_has_been_edited_by_teachers_of_the_course_); + if (Gbl.CurrentCrs.Syllabus.EditionIsActive) + { + /***** Button to view *****/ + Act_FormStart (Inf_ActionsSeeInfo[Gbl.CurrentCrs.Info.Type]); + Lay_PutConfirmButton (Txt_Done); + Act_FormEnd (); + } + + /***** End frame *****/ + Lay_EndRoundFrame (); } else { @@ -914,8 +911,10 @@ static void Syl_PutFormItemSyllabus (bool NewItem,unsigned NumItem,int Level,int (Gbl.CurrentCrs.Info.Type == Inf_LECTURES ? ActModIteSylLec : ActModIteSylPra)); Syl_PutParamNumItem (NumItem); - fprintf (Gbl.F.Out,"", Syl_MAX_LENGTH_TEXT_ITEM,Text, diff --git a/swad_text.c b/swad_text.c index 26d7ca6a9..4be5c0fc5 100644 --- a/swad_text.c +++ b/swad_text.c @@ -9251,6 +9251,27 @@ const char *Txt_documents_management_area = "zona de gestão de documentos"; #endif +const char *Txt_Done = +#if L==1 + "Fet"; +#elif L==2 + "Gemacht"; +#elif L==3 + "Done"; +#elif L==4 + "Hecho"; +#elif L==5 + "Terminé"; +#elif L==6 + "Hecho"; // Okoteve traducción +#elif L==7 + "Fatto"; +#elif L==8 + "Gotowe"; +#elif L==9 + "Feito"; +#endif + const char *Txt_Done_assess_exam = #if L==1 "He acabat; corregir examen"; @@ -11380,27 +11401,6 @@ const char *Txt_File_size = "Tamanho do arquivo"; #endif -const char *Txt_FILE_UPLOAD_Done = -#if L==1 - "Fet"; -#elif L==2 - "Gemacht"; -#elif L==3 - "Done"; -#elif L==4 - "Hecho"; -#elif L==5 - "Terminé"; -#elif L==6 - "Hecho"; // Okoteve traducción -#elif L==7 - "Fatto"; -#elif L==8 - "Gotowe"; -#elif L==9 - "Feito"; -#endif - const char *Txt_File_with_the_logo = #if L==1 "Fitxer amb el logo"; @@ -45684,36 +45684,6 @@ const char *Txt_This_post_has_been_banned_probably_for_not_satisfy_the_rules_of_ " probably for not satisfy the rules of the forums."; // Necessita de tradução #endif -const char *Txt_This_syllabus_has_been_edited_by_teachers_of_the_course_ = -#if L==1 - "Aquest programa ha estat editat pels professors de l'assignatura" - " i podria no coincidir amb el programa oficial."; -#elif L==2 - "This syllabus has been edited by teachers of the course" - " and may not match the official syllabus."; // Need Übersetzung -#elif L==3 - "This syllabus has been edited by teachers of the course" - " and may not match the official syllabus."; -#elif L==4 - "Este programa ha sido editado por los profesores de la asignatura" - " y podría no coincidir con el programa oficial."; -#elif L==5 - "This syllabus has been edited by teachers of the course" - " and may not match the official syllabus."; // Besoin de traduction -#elif L==6 - "Este programa ha sido editado por los profesores de la asignatura" - " y podría no coincidir con el programa oficial."; // Okoteve traducción -#elif L==7 - "Questo programma è stato editato per i professori del corso" - " e potrebbe non corrispondere al programma ufficiale."; -#elif L==8 - "This syllabus has been edited by teachers of the course" - " and may not match the official syllabus."; // Potrzebujesz tlumaczenie -#elif L==9 - "This syllabus has been edited by teachers of the course" - " and may not match the official syllabus."; // Necessita de tradução -#endif - const char *Txt_This_survey_has_no_questions = #if L==1 "Aquesta enquesta no té preguntes";