mirror of https://github.com/acanas/swad-core.git
Version 15.10
This commit is contained in:
parent
2b55da16d5
commit
38a2728cdb
2
Makefile
2
Makefile
|
@ -33,7 +33,7 @@ OBJS = swad_account.o swad_action.o swad_announcement.o swad_assignment.o swad_a
|
|||
swad_enrollment.o swad_exam.o \
|
||||
swad_file.o swad_file_browser.o swad_follow.o swad_forum.o \
|
||||
swad_global.o swad_group.o \
|
||||
swad_holiday.o \
|
||||
swad_help.o swad_holiday.o \
|
||||
swad_icon.o swad_ID.o swad_import.o swad_indicator.o swad_info.o swad_institution.o \
|
||||
swad_layout.o swad_link.o swad_logo.o \
|
||||
swad_mail.o swad_main.o swad_mark.o swad_menu.o swad_message.o \
|
||||
|
|
|
@ -33,8 +33,8 @@
|
|||
#include "swad_centre.h"
|
||||
#include "swad_constant.h"
|
||||
#include "swad_database.h"
|
||||
#include "swad_enrollment.h"
|
||||
#include "swad_global.h"
|
||||
#include "swad_help.h"
|
||||
#include "swad_institution.h"
|
||||
#include "swad_logo.h"
|
||||
#include "swad_parameter.h"
|
||||
|
@ -219,7 +219,7 @@ void Ctr_ShowConfiguration (void)
|
|||
Ctr_Configuration (false);
|
||||
|
||||
/***** Show help to enroll me *****/
|
||||
Enr_HelpToEnroll ();
|
||||
Hlp_ShowHelpWhatWouldYouLikeToDo ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -98,13 +98,17 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.9.1 (2015/10/06)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.10 (2015/10/06)"
|
||||
|
||||
// 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
|
||||
/*
|
||||
TODO: If photo zoom is out of the screen at left, put on right
|
||||
|
||||
Version 15.10: Oct 06, 2015 New module swad_help for contextual help to enhance usability. (185561 lines)
|
||||
1 change necessary in Makefile:
|
||||
Add swad_help.o to list of object files
|
||||
|
||||
Version 15.9.1: Oct 06, 2015 Minor change in contextual help. (185514 lines)
|
||||
Version 15.9: Oct 05, 2015 Contextual help to encourage enrollment. (185512 lines)
|
||||
Version 15.8: Oct 04, 2015 Changes in file browser layout.
|
||||
|
|
|
@ -33,8 +33,8 @@
|
|||
#include "swad_constant.h"
|
||||
#include "swad_country.h"
|
||||
#include "swad_database.h"
|
||||
#include "swad_enrollment.h"
|
||||
#include "swad_global.h"
|
||||
#include "swad_help.h"
|
||||
#include "swad_institution.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_preference.h"
|
||||
|
@ -199,7 +199,7 @@ void Cty_ShowConfiguration (void)
|
|||
Cty_Configuration (false);
|
||||
|
||||
/***** Show help to enroll me *****/
|
||||
Enr_HelpToEnroll ();
|
||||
Hlp_ShowHelpWhatWouldYouLikeToDo ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -35,9 +35,9 @@
|
|||
#include "swad_constant.h"
|
||||
#include "swad_database.h"
|
||||
#include "swad_degree.h"
|
||||
#include "swad_enrollment.h"
|
||||
#include "swad_exam.h"
|
||||
#include "swad_global.h"
|
||||
#include "swad_help.h"
|
||||
#include "swad_indicator.h"
|
||||
#include "swad_logo.h"
|
||||
#include "swad_notification.h"
|
||||
|
@ -122,7 +122,7 @@ void Crs_ShowIntroduction (void)
|
|||
|
||||
/***** Show help to enroll me *****/
|
||||
if (!Gbl.Usrs.Me.IBelongToCurrentCrs) // I do not belong to this course
|
||||
Enr_HelpToEnroll ();
|
||||
Hlp_ShowHelpWhatWouldYouLikeToDo ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -3004,7 +3004,7 @@ void Crs_ReqSelectOneOfMyCourses (void)
|
|||
Crs_WriteListMyCoursesToSelectOne ();
|
||||
else // I am not enrolled in any course
|
||||
/* Show help to enroll me */
|
||||
Enr_HelpToEnroll ();
|
||||
Hlp_ShowHelpWhatWouldYouLikeToDo ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -37,9 +37,9 @@
|
|||
#include "swad_config.h"
|
||||
#include "swad_database.h"
|
||||
#include "swad_degree.h"
|
||||
#include "swad_enrollment.h"
|
||||
#include "swad_exam.h"
|
||||
#include "swad_global.h"
|
||||
#include "swad_help.h"
|
||||
#include "swad_indicator.h"
|
||||
#include "swad_info.h"
|
||||
#include "swad_logo.h"
|
||||
|
@ -270,7 +270,7 @@ void Deg_ShowConfiguration (void)
|
|||
Deg_Configuration (false);
|
||||
|
||||
/***** Show help to enroll me *****/
|
||||
Enr_HelpToEnroll ();
|
||||
Hlp_ShowHelpWhatWouldYouLikeToDo ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -3712,220 +3712,3 @@ static void Enr_EffectivelyRemAdm (struct UsrData *UsrDat,Sco_Scope_t Scope,
|
|||
Lay_ShowAlert (Lay_ERROR,Gbl.Message);
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************************ Help to enroll in a course *************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Enr_HelpToEnroll (void)
|
||||
{
|
||||
extern const char *Txt_You_are_not_enrolled_in_any_course[Usr_NUM_SEXS];
|
||||
extern const char *Txt_You_can_search_for_courses_select_them_and_request_your_enrollment_in_them;
|
||||
extern const char *Txt_If_you_can_not_find_your_institution_your_centre_your_degree_or_your_courses_you_can_create_them;
|
||||
extern const char *Txt_What_would_you_like_to_do;
|
||||
extern const char *Txt_Go_to_one_of_my_courses;
|
||||
extern const char *Txt_My_courses;
|
||||
extern const char *Txt_Sign_up;
|
||||
extern const char *Txt_Remove_me_from_the_course_X;
|
||||
extern const char *Txt_Remove_me;
|
||||
extern const char *Txt_Register_me_in_the_course_X;
|
||||
extern const char *Txt_Select_another_course_of_the_degree_X;
|
||||
extern const char *Txt_Select_one_course_of_the_degree_X;
|
||||
extern const char *Txt_Courses;
|
||||
extern const char *Txt_Select_another_degree_of_the_centre_X;
|
||||
extern const char *Txt_Select_one_degree_of_the_centre_X;
|
||||
extern const char *Txt_Degrees;
|
||||
extern const char *Txt_Select_another_centre_of_the_institution_X;
|
||||
extern const char *Txt_Select_one_centre_of_the_institution_X;
|
||||
extern const char *Txt_Centres;
|
||||
extern const char *Txt_Select_another_institution_of_COUNTRY_X;
|
||||
extern const char *Txt_Select_one_institution_of_COUNTRY_X;
|
||||
extern const char *Txt_Institutions;
|
||||
extern const char *Txt_Select_another_country;
|
||||
extern const char *Txt_Select_one_country;
|
||||
extern const char *Txt_Countries;
|
||||
extern const char *Txt_Log_in;
|
||||
extern const char *Txt_New_on_PLATFORM_Sign_up;
|
||||
extern const char *Txt_Create_account;
|
||||
|
||||
/***** Alert message *****/
|
||||
if (Gbl.Usrs.Me.Logged &&
|
||||
!Gbl.Usrs.Me.MyCourses.Num)
|
||||
{
|
||||
sprintf (Gbl.Message,"%s<br />%s<br />%s",
|
||||
Txt_You_are_not_enrolled_in_any_course[Gbl.Usrs.Me.UsrDat.Sex],
|
||||
Txt_You_can_search_for_courses_select_them_and_request_your_enrollment_in_them,
|
||||
Txt_If_you_can_not_find_your_institution_your_centre_your_degree_or_your_courses_you_can_create_them);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Message);
|
||||
}
|
||||
|
||||
/***** Contextual buttons *****/
|
||||
/* Start table */
|
||||
Lay_StartRoundFrameTable (NULL,2,Txt_What_would_you_like_to_do);
|
||||
|
||||
if (Gbl.Usrs.Me.Logged) // I am logged
|
||||
{
|
||||
if (Gbl.Usrs.Me.MyCourses.Num) // I am enrolled in some courses
|
||||
{
|
||||
if (Gbl.CurrentAct != ActMyCrs) // I am not seeing the action to list my courses
|
||||
{
|
||||
/* Request list my courses */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"LEFT_MIDDLE\">",
|
||||
Txt_Go_to_one_of_my_courses);
|
||||
Act_FormStart (ActMyCrs);
|
||||
Lay_PutConfirmButtonInline (Txt_My_courses);
|
||||
Act_FormEnd ();
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
}
|
||||
}
|
||||
|
||||
if (Gbl.CurrentDeg.Deg.DegCod > 0) // Degree selected
|
||||
{
|
||||
/* Select a course */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"DAT RIGHT_MIDDLE\">");
|
||||
fprintf (Gbl.F.Out,Gbl.CurrentCrs.Crs.CrsCod > 0 ? Txt_Select_another_course_of_the_degree_X :
|
||||
Txt_Select_one_course_of_the_degree_X,
|
||||
Gbl.CurrentDeg.Deg.ShortName);
|
||||
fprintf (Gbl.F.Out,":</td>"
|
||||
"<td class=\"LEFT_MIDDLE\">");
|
||||
Act_FormStart (ActSeeCrs);
|
||||
Lay_PutConfirmButtonInline (Txt_Courses);
|
||||
Act_FormEnd ();
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
}
|
||||
else if (Gbl.CurrentCtr.Ctr.CtrCod > 0) // Centre selected
|
||||
{
|
||||
/* Select a degree */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"DAT RIGHT_MIDDLE\">");
|
||||
fprintf (Gbl.F.Out,Gbl.CurrentDeg.Deg.DegCod > 0 ? Txt_Select_another_degree_of_the_centre_X :
|
||||
Txt_Select_one_degree_of_the_centre_X,
|
||||
Gbl.CurrentCtr.Ctr.ShortName);
|
||||
fprintf (Gbl.F.Out,":</td>"
|
||||
"<td class=\"LEFT_MIDDLE\">");
|
||||
Act_FormStart (ActSeeDeg);
|
||||
Lay_PutConfirmButtonInline (Txt_Degrees);
|
||||
Act_FormEnd ();
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
}
|
||||
else if (Gbl.CurrentIns.Ins.InsCod > 0) // Institution selected
|
||||
{
|
||||
/* Select a centre */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"DAT RIGHT_MIDDLE\">");
|
||||
fprintf (Gbl.F.Out,Gbl.CurrentCtr.Ctr.CtrCod > 0 ? Txt_Select_another_centre_of_the_institution_X :
|
||||
Txt_Select_one_centre_of_the_institution_X,
|
||||
Gbl.CurrentIns.Ins.ShortName);
|
||||
fprintf (Gbl.F.Out,":</td>"
|
||||
"<td class=\"LEFT_MIDDLE\">");
|
||||
Act_FormStart (ActSeeCtr);
|
||||
Lay_PutConfirmButtonInline (Txt_Centres);
|
||||
Act_FormEnd ();
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
}
|
||||
else if (Gbl.CurrentCty.Cty.CtyCod > 0) // Country selected
|
||||
{
|
||||
/* Select an institution */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"DAT RIGHT_MIDDLE\">");
|
||||
fprintf (Gbl.F.Out,Gbl.CurrentIns.Ins.InsCod > 0 ? Txt_Select_another_institution_of_COUNTRY_X :
|
||||
Txt_Select_one_institution_of_COUNTRY_X,
|
||||
Gbl.CurrentCty.Cty.Name[Gbl.Prefs.Language]);
|
||||
fprintf (Gbl.F.Out,":</td>"
|
||||
"<td class=\"LEFT_MIDDLE\">");
|
||||
Act_FormStart (ActSeeIns);
|
||||
Lay_PutConfirmButtonInline (Txt_Institutions);
|
||||
Act_FormEnd ();
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Select a country */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"DAT RIGHT_MIDDLE\">%s:</td>"
|
||||
"<td class=\"LEFT_MIDDLE\">",
|
||||
Gbl.CurrentCty.Cty.CtyCod > 0 ? Txt_Select_another_country :
|
||||
Txt_Select_one_country);
|
||||
Act_FormStart (ActSeeCty);
|
||||
Lay_PutConfirmButtonInline (Txt_Countries);
|
||||
Act_FormEnd ();
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
}
|
||||
|
||||
if (Gbl.CurrentCrs.Crs.CrsCod > 0) // Course selected
|
||||
{
|
||||
if (Gbl.Usrs.Me.IBelongToCurrentCrs) // I belong to this course
|
||||
{
|
||||
if (Gbl.Usrs.Me.LoggedRole == Rol_STUDENT)
|
||||
{
|
||||
/* Request my removing from this course */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"DAT RIGHT_MIDDLE\">");
|
||||
fprintf (Gbl.F.Out,Txt_Remove_me_from_the_course_X,
|
||||
Gbl.CurrentCrs.Crs.ShortName);
|
||||
fprintf (Gbl.F.Out,":</td>"
|
||||
"<td class=\"LEFT_MIDDLE\">");
|
||||
Act_FormStart (ActReqMdfOneStd);
|
||||
Lay_PutRemoveButtonInline (Txt_Remove_me);
|
||||
Act_FormEnd ();
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
}
|
||||
}
|
||||
else // I do not belong to this course
|
||||
{
|
||||
/* Request my registration in this course */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"DAT RIGHT_MIDDLE\">");
|
||||
fprintf (Gbl.F.Out,Txt_Register_me_in_the_course_X,
|
||||
Gbl.CurrentCrs.Crs.ShortName);
|
||||
fprintf (Gbl.F.Out,":</td>"
|
||||
"<td class=\"LEFT_MIDDLE\">");
|
||||
Act_FormStart (ActReqSignUp);
|
||||
Lay_PutCreateButtonInline (Txt_Sign_up);
|
||||
Act_FormEnd ();
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
}
|
||||
}
|
||||
}
|
||||
else // I am not logged
|
||||
{
|
||||
/* Log in */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"DAT RIGHT_MIDDLE\">%s:</td>"
|
||||
"<td class=\"LEFT_MIDDLE\">",
|
||||
Txt_Log_in);
|
||||
Act_FormStart (ActFrmLogIn);
|
||||
Lay_PutConfirmButtonInline (Txt_Log_in);
|
||||
Act_FormEnd ();
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
|
||||
/* Sign up */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"DAT RIGHT_MIDDLE\">");
|
||||
fprintf (Gbl.F.Out,Txt_New_on_PLATFORM_Sign_up,Cfg_PLATFORM_SHORT_NAME);
|
||||
fprintf (Gbl.F.Out,":</td>"
|
||||
"<td class=\"LEFT_MIDDLE\">");
|
||||
Act_FormStart (ActFrmUsrAcc);
|
||||
Lay_PutCreateButtonInline (Txt_Create_account);
|
||||
Act_FormEnd ();
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
}
|
||||
|
||||
/* End table */
|
||||
Lay_EndRoundFrameTable ();
|
||||
}
|
||||
|
|
|
@ -135,6 +135,4 @@ void Enr_CreateNewUsr (void);
|
|||
void Enr_ModifyUsr (void);
|
||||
void Enr_AcceptUsrInCrs (long UsrCod);
|
||||
|
||||
void Enr_HelpToEnroll (void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
#include "swad_config.h"
|
||||
#include "swad_constant.h"
|
||||
#include "swad_database.h"
|
||||
#include "swad_enrollment.h"
|
||||
#include "swad_global.h"
|
||||
#include "swad_help.h"
|
||||
#include "swad_institution.h"
|
||||
#include "swad_logo.h"
|
||||
#include "swad_parameter.h"
|
||||
|
@ -209,7 +209,7 @@ void Ins_ShowConfiguration (void)
|
|||
Ins_Configuration (false);
|
||||
|
||||
/***** Show help to enroll me *****/
|
||||
Enr_HelpToEnroll ();
|
||||
Hlp_ShowHelpWhatWouldYouLikeToDo ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -40,9 +40,9 @@
|
|||
#include "swad_connected.h"
|
||||
#include "swad_course.h"
|
||||
#include "swad_database.h"
|
||||
#include "swad_enrollment.h"
|
||||
#include "swad_global.h"
|
||||
#include "swad_group.h"
|
||||
#include "swad_help.h"
|
||||
#include "swad_ID.h"
|
||||
#include "swad_nickname.h"
|
||||
#include "swad_notification.h"
|
||||
|
@ -1380,7 +1380,7 @@ void Usr_WriteFormLoginLogout (void)
|
|||
Usr_ShowFormsLogoutAndRole ();
|
||||
|
||||
/***** Show help to enroll me *****/
|
||||
Enr_HelpToEnroll ();
|
||||
Hlp_ShowHelpWhatWouldYouLikeToDo ();
|
||||
}
|
||||
else
|
||||
/***** Form to log in *****/
|
||||
|
@ -1559,7 +1559,7 @@ void Usr_WelcomeUsr (void)
|
|||
Lay_ShowAlert (Lay_INFO,Txt_Welcome[Gbl.Usrs.Me.UsrDat.Sex]);
|
||||
|
||||
/***** Show help to enroll me *****/
|
||||
Enr_HelpToEnroll ();
|
||||
Hlp_ShowHelpWhatWouldYouLikeToDo ();
|
||||
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
|
||||
|
|
Loading…
Reference in New Issue