Version 15.149.1

This commit is contained in:
Antonio Cañas Vargas 2016-03-18 10:32:13 +01:00
parent e8bb925363
commit c118fb8dcc
5 changed files with 59 additions and 89 deletions

View File

@ -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)

View File

@ -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 ();

View File

@ -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,"<div class=\"CONTEXT_MENU\">");
Lay_PutContextualLink (Inf_ActionsSeeInfo[Gbl.CurrentCrs.Info.Type],NULL,
"eye-on64x64.png",
Txt_View,Txt_View);
fprintf (Gbl.F.Out,"</div>");
/***** Get info source from database *****/
Inf_GetInfoSrcFromDB (Gbl.CurrentCrs.Crs.CrsCod,Gbl.CurrentCrs.Info.Type,&InfoSrcSelected,&MustBeRead);

View File

@ -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,"<div class=\"CONTEXT_MENU\">");
Lay_PutContextualLink (Inf_ActionsSeeInfo[Gbl.CurrentCrs.Info.Type],NULL,
"eye-on64x64.png",
Txt_View,Txt_View);
fprintf (Gbl.F.Out,"</div>");
}
/***** 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,"<table class=\"CELLS_PAD_1\">");
PutIconToEdit ? Inf_PutIconToEditInfo :
NULL);
fprintf (Gbl.F.Out,"<table class=\"CELLS_PAD_1\" style=\"width:100%%\">");
/***** 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,"</table>");
Lay_EndRoundFrame ();
if (!Gbl.CurrentCrs.Syllabus.EditionIsActive)
fprintf (Gbl.F.Out,"<div class=\"DAT_SMALL CENTER_MIDDLE\">"
"<br />%s</div>",
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,"<input type=\"text\" name=\"Txt\""
" size=\"80\" maxlength=\"%u\" value=\"%s\""
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Txt\"");
if (NewItem)
fprintf (Gbl.F.Out," autofocus");
fprintf (Gbl.F.Out," size=\"80\" maxlength=\"%u\" value=\"%s\""
" placeholder=\"%s\""
" onchange=\"document.getElementById('%s').submit();\" />",
Syl_MAX_LENGTH_TEXT_ITEM,Text,

View File

@ -9251,6 +9251,27 @@ const char *Txt_documents_management_area =
"zona de gest&atilde;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&eacute;";
#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&eacute;";
#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&iacute;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&iacute;a no coincidir con el programa oficial."; // Okoteve traducción
#elif L==7
"Questo programma &egrave; 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&eacute; preguntes";