Version 14.45

This commit is contained in:
Antonio Cañas Vargas 2014-12-27 21:09:34 +01:00
parent b19167ba45
commit 350a3a63d6
9 changed files with 181 additions and 72 deletions

View File

@ -35,11 +35,12 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 14.44.3 (2014/12/27)"
#define Log_PLATFORM_VERSION "SWAD 14.45 (2014/12/27)"
// 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 | tail -1
/*
Version 14.45 :Dic 27, 2014 Course syllabus are shown in one unique option (unfinished). (174346 lines)
Version 14.44.3 :Dic 27, 2014 Fixed bugs in layout. (174246 lines)
Version 14.44.2 :Dic 27, 2014 Fixed bugs in layout columns. (174262 lines)
Version 14.44.1 :Dic 27, 2014 Changes in layout columns. (174251 lines)

View File

@ -1675,32 +1675,38 @@ void For_ShowForumList (void)
static void For_PutFormWhichForums (void)
{
extern const char *The_ClassFormul[The_NUM_THEMES];
extern const char *Txt_FORUM_WHICH_FORUM[2];
extern const char *Txt_FORUM_WHICH_FORUM[For_NUM_WHICH_FORUMS];
For_WhichForums_t WhichForums;
/***** Form to select which forums I want to see
(all my forums or only the forums of current institution/degree/course) *****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"%s\" style=\"text-align:center;\">",
The_ClassFormul[Gbl.Prefs.Theme]);
"<td>");
Act_FormStart (ActSeeFor);
For_PutParamForumOrder ();
For_PutParamsForumInsDegCrs ();
fprintf (Gbl.F.Out,"<ul style=\"list-style-type:none;"
" padding:0; margin:10px auto;\">");
for (WhichForums = (For_WhichForums_t) 0;
WhichForums < For_NUM_WHICH_FORUMS;
WhichForums++)
{
fprintf (Gbl.F.Out,"<input type=\"radio\" name=\"WhichForum\" value=\"%u\"",
fprintf (Gbl.F.Out,"<li class=\"DAT\""
" style=\"display:inline; vertical-align:middle;\">"
"<input type=\"radio\" name=\"WhichForum\" value=\"%u\"",
(unsigned) WhichForums);
if (WhichForums == Gbl.Forum.WhichForums)
fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," onclick=\"javascript:document.getElementById('%s').submit();\" />%s",
fprintf (Gbl.F.Out," onclick=\"javascript:document.getElementById('%s').submit();\" />"
"%s"
"</li>",
Gbl.FormId,Txt_FORUM_WHICH_FORUM[WhichForums]);
}
fprintf (Gbl.F.Out,"</form>"
"</td>"
"</tr>");
fprintf (Gbl.F.Out,"</ul>"
"</form>"
"</td>"
"</tr>");
}
/*****************************************************************************/

View File

@ -348,6 +348,7 @@ void Gbl_InitializeGlobals (void)
Gbl.CurrentCrs.Records.LstFields.NestedCalls = 0;
Gbl.CurrentCrs.Syllabus.EditionIsActive = false;
Gbl.CurrentCrs.Syllabus.WhichSyllabus = Syl_LECTURES;
Gbl.Search.WhatToSearch = Sch_SEARCH_ALL;
Gbl.Search.Str[0] = '\0';

View File

@ -442,6 +442,7 @@ struct Globals
char PathDir[PATH_MAX+1];
unsigned NumItem;
bool EditionIsActive;
Syl_WhichSyllabus_t WhichSyllabus;
} Syllabus;
struct
{

View File

@ -307,6 +307,16 @@ void Inf_ShowInfo (void)
/***** Get info source from database *****/
Inf_GetInfoSrcFromDB (Gbl.CurrentCrs.Crs.CrsCod,InfoType,&InfoSrc,&MustBeRead);
switch (InfoType)
{
case Inf_LECTURES:
case Inf_PRACTICALS:
Syl_PutFormWhichSyllabus ();
break;
default:
break;
}
switch (Gbl.Usrs.Me.LoggedRole)
{
case Rol_ROLE_STUDENT:

View File

@ -107,6 +107,40 @@ static void Syl_ShowRowSyllabus (Inf_InfoType_t InfoType,unsigned NumItem,int Le
static void Syl_WriteSyllabusIntoHTMLTmpFile (Inf_InfoType_t InfoType,FILE *FileHTMLTmp);
static void Syl_PutFormItemSyllabus (Inf_InfoType_t InfoType,bool NewItem,unsigned NumItem,int Level,int *CodItem,const char *Text,const char *Color);
/*****************************************************************************/
/************************ Write form to select syllabus **********************/
/*****************************************************************************/
void Syl_PutFormWhichSyllabus (void)
{
extern const char *Txt_SYLLABUS_WHICH_SYLLABUS[Syl_NUM_WHICH_SYLLABUS];
Syl_WhichSyllabus_t WhichSyllabus;
/***** Form to select which forums I want to see
(all my forums or only the forums of current institution/degree/course) *****/
Act_FormStart (ActSeeSylLec);
fprintf (Gbl.F.Out,"<ul style=\"list-style-type:none;"
" padding:0; margin:10px auto;\">");
for (WhichSyllabus = (Syl_WhichSyllabus_t) 0;
WhichSyllabus < For_NUM_WHICH_FORUMS;
WhichSyllabus++)
{
fprintf (Gbl.F.Out,"<li class=\"DAT\""
" style=\"display:inline; vertical-align:middle;\">"
"<input type=\"radio\" name=\"WhichForum\" value=\"%u\"",
(unsigned) WhichSyllabus);
if (WhichSyllabus == Gbl.CurrentCrs.Syllabus.WhichSyllabus)
fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," onclick=\"javascript:document.getElementById('%s').submit();\" />"
"%s"
"</li>",
Gbl.FormId,Txt_SYLLABUS_WHICH_SYLLABUS[WhichSyllabus]);
}
fprintf (Gbl.F.Out,"</ul>"
"</form>");
}
/*****************************************************************************/
/************** Get parameter item number in program edition *****************/
/*****************************************************************************/

View File

@ -28,9 +28,16 @@
/*****************************************************************************/
/*****************************************************************************/
/******************************* Public types ********************************/
/************************ Public constants and types *************************/
/*****************************************************************************/
#define Syl_NUM_WHICH_SYLLABUS 2
typedef enum
{
Syl_LECTURES = 0,
Syl_PRACTICALS = 1,
} Syl_WhichSyllabus_t; // Which syllabus I want to see
typedef enum
{
Syl_GET_UP,
@ -57,6 +64,8 @@ struct MoveSubtrees
/***************************** Public prototypes *****************************/
/*****************************************************************************/
void Syl_PutFormWhichSyllabus (void);
void Syl_GetParamItemNumber (void);
void Syl_EditSyllabus (void);
void Syl_FreeListItemsSyllabus (void);

View File

@ -81,6 +81,7 @@
#include "swad_record.h"
#include "swad_statistic.h"
#include "swad_survey.h"
#include "swad_syllabus.h"
#include "swad_test.h"
#include "swad_text.h"
#include "swad_timetable.h"
@ -4413,27 +4414,6 @@ const char *Txt_Comments =
"Coment&aacute;rios";
#endif
const char *Txt_Student_comment =
#if L==0
"Comentari de l'estudiant";
#elif L==1
"Student-Kommentar";
#elif L==2
"Student's comment";
#elif L==3
"Comentario del estudiante";
#elif L==4
"Commentaire de l'&eacute;tudiant";
#elif L==5
"Comentario del estudiante"; // Okoteve traducción
#elif L==6
"Commento di student";
#elif L==7
"Komentarz studenta";
#elif L==8
"Coment&aacute;rio do estudante";
#endif
const char *Txt_Teachers_comment =
#if L==0
"Comentari de professors";
@ -35514,43 +35494,43 @@ const char *Txt_Show_right_column =
const char *Txt_Show_WHICH_groups[2] =
{
#if L==0
"Mostrar nom&eacute;s els meus grups"
"Nom&eacute;s els meus grups"
#elif L==1
"Zeige nur meine Gruppen"
"Nur meine Gruppen"
#elif L==2
"Show only my groups"
"Only my groups"
#elif L==3
"Mostrar s&oacute;lo mis grupos"
"S&oacute;lo mis grupos"
#elif L==4
"Afficher uniquement mes groupes"
"Uniquement mes groupes"
#elif L==5
"Mostrar s&oacute;lo mis grupos" // Okoteve traducción
"S&oacute;lo mis grupos" // Okoteve traducción
#elif L==6
"Mostra solo i miei gruppi"
"Solo i miei gruppi"
#elif L==7
"Show only my groups" // Potrzebujesz tlumaczenie
"Only my groups" // Potrzebujesz tlumaczenie
#elif L==8
"Mostrar apenas os meus grupos"
"Apenas os meus grupos"
#endif
,
#if L==0
"Mostrar tots els grups"
"Tots els grups"
#elif L==1
"Zeige alle Gruppen"
"Alle Gruppen"
#elif L==2
"Show all groups"
"All groups"
#elif L==3
"Mostrar todos los grupos"
"Todos los grupos"
#elif L==4
"Afficher tous les groupes"
"Tous les groupes"
#elif L==5
"Mostrar todos los grupos" // Okoteve traducción
"Todos los grupos" // Okoteve traducción
#elif L==6
"Mostra tutti i gruppi"
"Tutti i gruppi"
#elif L==7
"Show all groups" // Potrzebujesz tlumaczenie
"All groups" // Potrzebujesz tlumaczenie
#elif L==8
"Mostrar todos os grupos"
"Todos os grupos"
#endif
};
@ -37400,6 +37380,27 @@ const char *Txt_Status =
"Status";
#endif
const char *Txt_Stay_connected_with_SWADroid =
#if L==0
"Seguiu connectat/da amb <strong>SWADroid</strong>.";
#elif L==1
"Stay connected with <strong>SWADroid</strong>."; // Need Übersetzung
#elif L==2
"Stay connected with <strong>SWADroid</strong>.";
#elif L==3
"Siga conectado/a con <strong>SWADroid</strong>.";
#elif L==4
"Stay connected with <strong>SWADroid</strong>."; // Besoin de traduction
#elif L==5
"Siga conectado/a con <strong>SWADroid</strong>."; // Okoteve traducción
#elif L==6
"Resta in contatto con <strong>SWADroid</strong>.";
#elif L==7
"Stay connected with <strong>SWADroid</strong>."; // Potrzebujesz tlumaczenie
#elif L==8
"Stay connected with <strong>SWADroid</strong>."; // Necessita de tradução
#endif
const char *Txt_Stem = // Stem of a test question
#if L==0
"Enunciat";
@ -37526,6 +37527,27 @@ const char *Txt_Step_5_Confirm_the_enrollment_removing =
"Step 5: Confirm the enrollment / removing"; // Necessita de tradução
#endif
const char *Txt_Student_comment =
#if L==0
"Comentari de l'estudiant";
#elif L==1
"Student-Kommentar";
#elif L==2
"Student's comment";
#elif L==3
"Comentario del estudiante";
#elif L==4
"Commentaire de l'&eacute;tudiant";
#elif L==5
"Comentario del estudiante"; // Okoteve traducción
#elif L==6
"Commento di student";
#elif L==7
"Komentarz studenta";
#elif L==8
"Coment&aacute;rio do estudante";
#endif
const char *Txt_Students_ABBREVIATION = // Abbreviation of "Students"
#if L==0
"Estud.";
@ -38175,6 +38197,52 @@ const char *Txt_Syllabus_of_the_course =
"Programa da disciplina";
#endif
extern const char *Txt_SYLLABUS_WHICH_SYLLABUS[Syl_NUM_WHICH_SYLLABUS] =
{
// Lectures
#if L==0
"Teoria"
#elif L==1
"Vorlesung"
#elif L==2
"Lectures"
#elif L==3
"Teor&iacute;a"
#elif L==4
"Th&eacute;orie"
#elif L==5
"Teor&iacute;a" // Okoteve traducción
#elif L==6
"Teoria"
#elif L==7
"Wyklady"
#elif L==8
"Teoria"
#endif
,
// Practicals
#if L==0
"Pr&agrave;ct."
#elif L==1
"&Uuml;bung"
#elif L==2
"Practicals"
#elif L==3
"Pr&aacute;ct."
#elif L==4
"Pratique"
#elif L==5
"Pr&aacute;ct." // Okoteve traducción
#elif L==6
"Pratica"
#elif L==7
"praktyki"
#elif L==8
"Pr&aacute;ct."
#endif
,
};
const char *Txt_System =
#if L==0
"Plataforma";
@ -50490,27 +50558,6 @@ const char *Txt_You_can_send_a_file_with_an_image_in_jpg_format_and_size_X_Y = /
" and size %u&times;%u pixels."; // Necessita de tradução
#endif
const char *Txt_Stay_connected_with_SWADroid =
#if L==0
"Seguiu connectat/da amb <strong>SWADroid</strong>.";
#elif L==1
"Stay connected with <strong>SWADroid</strong>."; // Need Übersetzung
#elif L==2
"Stay connected with <strong>SWADroid</strong>.";
#elif L==3
"Siga conectado/a con <strong>SWADroid</strong>.";
#elif L==4
"Stay connected with <strong>SWADroid</strong>."; // Besoin de traduction
#elif L==5
"Siga conectado/a con <strong>SWADroid</strong>."; // Okoteve traducción
#elif L==6
"Resta in contatto con <strong>SWADroid</strong>.";
#elif L==7
"Stay connected with <strong>SWADroid</strong>."; // Potrzebujesz tlumaczenie
#elif L==8
"Stay connected with <strong>SWADroid</strong>."; // Necessita de tradução
#endif
const char *Txt_You_dont_have_permission_to_access_to_this_forum =
#if L==0
"No t&eacute; perm&iacute;s per accedir a aquest f&ograve;rum.";

View File

@ -289,7 +289,7 @@ void TT_ShowClassTimeTable (void)
{
/***** Select whether show only my groups or all groups *****/
fprintf (Gbl.F.Out,"<tr>"
"<td style=\"text-align:center;\">");
"<td>");
Act_FormStart (Gbl.CurrentAct);
Grp_ShowSelectorWhichGrps ();
fprintf (Gbl.F.Out,"</form>"