mirror of https://github.com/acanas/swad-core.git
Version 15.162
This commit is contained in:
parent
f1a77a77ff
commit
b225163515
|
@ -1650,15 +1650,15 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
/* ActRemDegLog */{1343,-1,TabDeg,ActSeeDegInf ,0x100,0x100,0x100,Act_CONTENT_DATA,Act_MAIN_WINDOW,Deg_RemoveLogo ,Deg_ShowConfiguration ,NULL},
|
||||
|
||||
/* ActEdiCrs */{ 555,-1,TabDeg,ActSeeCrs ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Crs_ReqEditCourses ,NULL},
|
||||
/* ActReqCrs */{1053,-1,TabDeg,ActSeeCrs ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Crs_RecFormReqCrs ,NULL},
|
||||
/* ActNewCrs */{ 556,-1,TabDeg,ActSeeCrs ,0x1E0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Crs_RecFormNewCrs ,NULL},
|
||||
/* ActReqCrs */{1053,-1,TabDeg,ActSeeCrs ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,Crs_RecFormReqCrs ,Crs_ContEditAfterChgCrs ,NULL},
|
||||
/* ActNewCrs */{ 556,-1,TabDeg,ActSeeCrs ,0x1E0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,Crs_RecFormNewCrs ,Crs_ContEditAfterChgCrs ,NULL},
|
||||
/* ActRemCrs */{ 560,-1,TabDeg,ActSeeCrs ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Crs_RemoveCourse ,NULL},
|
||||
/* ActChgInsCrsCod */{1025,-1,TabDeg,ActSeeCrs ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Crs_ChangeInsCrsCod ,NULL},
|
||||
/* ActChgCrsDeg */{ 565,-1,TabDeg,ActSeeCrs ,0x1E0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Crs_ChangeCrsDegree ,NULL},
|
||||
/* ActChgCrsYea */{ 561,-1,TabDeg,ActSeeCrs ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Crs_ChangeCrsYear ,NULL},
|
||||
/* ActChgInsCrsCod */{1025,-1,TabDeg,ActSeeCrs ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,Crs_ChangeInsCrsCod ,Crs_ContEditAfterChgCrs ,NULL},
|
||||
/* ActChgCrsDeg */{ 565,-1,TabDeg,ActSeeCrs ,0x1E0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,Crs_ChangeCrsDegree ,Crs_ContEditAfterChgCrs ,NULL},
|
||||
/* ActChgCrsYea */{ 561,-1,TabDeg,ActSeeCrs ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,Crs_ChangeCrsYear ,Crs_ContEditAfterChgCrs ,NULL},
|
||||
/* ActRenCrsSho */{ 563,-1,TabDeg,ActSeeCrs ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,Crs_RenameCourseShort ,Crs_ContEditAfterChgCrs ,NULL},
|
||||
/* ActRenCrsFul */{ 564,-1,TabDeg,ActSeeCrs ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,Crs_RenameCourseFull ,Crs_ContEditAfterChgCrs ,NULL},
|
||||
/* ActChgCrsSta */{1055,-1,TabDeg,ActSeeCrs ,0x1E0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Crs_ChangeCrsStatus ,NULL},
|
||||
/* ActChgCrsSta */{1055,-1,TabDeg,ActSeeCrs ,0x1E0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,Crs_ChangeCrsStatus ,Crs_ContEditAfterChgCrs ,NULL},
|
||||
|
||||
/* ActChgToSeeDocDeg */{1250,-1,TabDeg,ActSeeAdmDocDeg ,0x1E0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Brw_ShowFileBrowserOrWorks ,NULL},
|
||||
|
||||
|
|
|
@ -123,8 +123,8 @@
|
|||
// TODO: To avoid wrong email addresses, when a user fills his/her email address, check if the domain is in the white list of allowed domains. If not, ask for confirmation.
|
||||
// TODO: Important!!!! E-mail should not be visible for not logged users
|
||||
// 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: Button to see result of a survey in listing of surveys should be smaller
|
||||
// TODO:
|
||||
// TODO: Button to see result of a survey in listing of surveys should be smaller?
|
||||
|
||||
// TODO: Icon to the left in list of forums is not correct when scope is system
|
||||
// TODO: Move info about number of files to bottom of file browsers
|
||||
|
@ -133,13 +133,15 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.161.4 (2016-03-24)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.162 (2016-03-24)"
|
||||
#define CSS_FILE "swad15.160.2.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.162: Mar 24, 2016 Code refactoring in edition of courses.
|
||||
When a user creates or edits a course, put button to register him/her. (196576 lines)
|
||||
Version 15.161.4: Mar 24, 2016 In MESSAGES > Announcements, any user can see obsolete announcements, not only system admins. (196576 lines)
|
||||
Version 15.161.3: Mar 24, 2016 Changed icon to reset survey. (196577 lines)
|
||||
Copy file recycle64x64.png to icon directory
|
||||
|
|
134
swad_course.c
134
swad_course.c
|
@ -99,6 +99,7 @@ static void Crs_GetDataOfCourseFromRow (struct Course *Crs,MYSQL_ROW row);
|
|||
static void Crs_EmptyCourseCompletely (long CrsCod);
|
||||
static bool Crs_RenameCourse (struct Course *Crs,Cns_ShortOrFullName_t ShortOrFullName);
|
||||
static void Crs_PutButtonToGoToCrs (struct Course *Crs);
|
||||
static void Crs_PutButtonToRegisterInCrs (struct Course *Crs);
|
||||
|
||||
static void Crs_PutLinkToSearchCourses (void);
|
||||
static void Crs_PutLinkToSearchCoursesParams (void);
|
||||
|
@ -1849,14 +1850,14 @@ static void Crs_RecFormRequestOrCreateCrs (unsigned Status)
|
|||
if (Crs_CheckIfCourseNameExistsInCourses (Crs->DegCod,Crs->Year,"ShortName",Crs->ShortName,-1L))
|
||||
{
|
||||
sprintf (Gbl.Message,Txt_The_course_X_already_exists,
|
||||
Crs->ShortName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Message);
|
||||
Crs->ShortName);
|
||||
Gbl.Error = true;
|
||||
}
|
||||
else if (Crs_CheckIfCourseNameExistsInCourses (Crs->DegCod,Crs->Year,"FullName",Crs->FullName,-1L))
|
||||
{
|
||||
sprintf (Gbl.Message,Txt_The_course_X_already_exists,
|
||||
Crs->FullName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Message);
|
||||
Gbl.Error = true;
|
||||
}
|
||||
else // Add new requested course to database
|
||||
Crs_CreateCourse (Crs,Status);
|
||||
|
@ -1864,17 +1865,14 @@ static void Crs_RecFormRequestOrCreateCrs (unsigned Status)
|
|||
else // If there is not a course name
|
||||
{
|
||||
sprintf (Gbl.Message,"%s",Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_course);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Message);
|
||||
Gbl.Error = true;
|
||||
}
|
||||
}
|
||||
else // Year not valid
|
||||
{
|
||||
sprintf (Gbl.Message,Txt_The_year_X_is_not_allowed,Crs->Year);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Message);
|
||||
Gbl.Error = true;
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
Crs_ReqEditCourses ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1936,13 +1934,8 @@ static void Crs_CreateCourse (struct Course *Crs,unsigned Status)
|
|||
Crs->ShortName,Crs->FullName);
|
||||
Crs->CrsCod = DB_QueryINSERTandReturnCode (Query,"can not create a new course");
|
||||
|
||||
/***** Write success message *****/
|
||||
sprintf (Gbl.Message,Txt_Created_new_course_X,
|
||||
Crs->FullName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
|
||||
|
||||
/***** Put button to go to course created *****/
|
||||
Crs_PutButtonToGoToCrs (Crs);
|
||||
/***** Create success message *****/
|
||||
sprintf (Gbl.Message,Txt_Created_new_course_X,Crs->FullName);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1980,7 +1973,7 @@ void Crs_RemoveCourse (void)
|
|||
}
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING, Txt_You_dont_have_permission_to_edit_this_course);
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_dont_have_permission_to_edit_this_course);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Crs_ReqEditCourses ();
|
||||
|
@ -2357,23 +2350,16 @@ void Crs_ChangeInsCrsCod (void)
|
|||
Crs_UpdateInstitutionalCrsCod (Crs,NewInstitutionalCrsCod);
|
||||
sprintf (Gbl.Message,Txt_The_institutional_code_of_the_course_X_has_changed_to_Y,
|
||||
Crs->ShortName,NewInstitutionalCrsCod);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
|
||||
}
|
||||
else // The same institutional code
|
||||
{
|
||||
sprintf (Gbl.Message,Txt_The_institutional_code_of_the_course_X_has_not_changed,
|
||||
Crs->ShortName);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Message);
|
||||
}
|
||||
|
||||
/***** Put button to go to course changed *****/
|
||||
Crs_PutButtonToGoToCrs (Crs);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_dont_have_permission_to_edit_this_course);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Crs_ReqEditCourses ();
|
||||
{
|
||||
strcpy (Gbl.Message,Txt_You_dont_have_permission_to_edit_this_course);
|
||||
Gbl.Error = true;
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -2428,13 +2414,13 @@ void Crs_ChangeCrsDegree (void)
|
|||
{
|
||||
sprintf (Gbl.Message,Txt_In_the_year_X_of_the_degree_Y_already_existed_a_course_with_the_name_Z,
|
||||
Txt_YEAR_OF_DEGREE[Crs->Year],NewDeg.FullName,Crs->ShortName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Message);
|
||||
Gbl.Error = true;
|
||||
}
|
||||
else if (Crs_CheckIfCourseNameExistsInCourses (NewDeg.DegCod,Crs->Year,"FullName",Crs->FullName,-1L))
|
||||
{
|
||||
sprintf (Gbl.Message,Txt_In_the_year_X_of_the_degree_Y_already_existed_a_course_with_the_name_Z,
|
||||
Txt_YEAR_OF_DEGREE[Crs->Year],NewDeg.FullName,Crs->FullName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Message);
|
||||
Gbl.Error = true;
|
||||
}
|
||||
else // Update degree in database
|
||||
{
|
||||
|
@ -2444,30 +2430,23 @@ void Crs_ChangeCrsDegree (void)
|
|||
DB_QueryUPDATE (Query,"can not move course to another degree");
|
||||
Crs->DegCod = NewDeg.DegCod;
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
/***** Create message to show the change made *****/
|
||||
sprintf (Gbl.Message,Txt_The_course_X_has_been_moved_to_the_degree_Y,
|
||||
Crs->FullName,NewDeg.FullName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
|
||||
|
||||
/***** Put button to go to course changed *****/
|
||||
Crs_PutButtonToGoToCrs (Crs);
|
||||
}
|
||||
}
|
||||
else // New degree has no current course year
|
||||
{
|
||||
sprintf (Gbl.Message,Txt_The_year_X_is_not_allowed,Crs->Year);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Message);
|
||||
Gbl.Error = true;
|
||||
}
|
||||
}
|
||||
else // I have no permission to change course to this new degree
|
||||
{
|
||||
sprintf (Gbl.Message,Txt_You_dont_have_permission_to_move_courses_to_the_degree_X,
|
||||
NewDeg.FullName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Message);
|
||||
Gbl.Error = true;
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
Crs_ReqEditCourses ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -2512,13 +2491,13 @@ void Crs_ChangeCrsYear (void)
|
|||
{
|
||||
sprintf (Gbl.Message,Txt_The_course_X_already_exists_in_year_Y,
|
||||
Crs->ShortName,Txt_YEAR_OF_DEGREE[NewYear]);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Message);
|
||||
Gbl.Error = true;
|
||||
}
|
||||
else if (Crs_CheckIfCourseNameExistsInCourses (Crs->DegCod,NewYear,"FullName",Crs->FullName,-1L))
|
||||
{
|
||||
sprintf (Gbl.Message,Txt_The_course_X_already_exists_in_year_Y,
|
||||
Crs->FullName,Txt_YEAR_OF_DEGREE[NewYear]);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Message);
|
||||
Gbl.Error = true;
|
||||
}
|
||||
else // Update year in database
|
||||
{
|
||||
|
@ -2529,26 +2508,22 @@ void Crs_ChangeCrsYear (void)
|
|||
|
||||
Crs->Year = NewYear;
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
/***** Create message to show the change made *****/
|
||||
sprintf (Gbl.Message,Txt_The_year_of_the_course_X_has_changed,
|
||||
Crs->ShortName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
|
||||
|
||||
/***** Put button to go to course changed *****/
|
||||
Crs_PutButtonToGoToCrs (Crs);
|
||||
}
|
||||
}
|
||||
else // Year not valid
|
||||
{
|
||||
sprintf (Gbl.Message,Txt_The_year_X_is_not_allowed,NewYear);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Message);
|
||||
Gbl.Error = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_dont_have_permission_to_edit_this_course);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Crs_ReqEditCourses ();
|
||||
{
|
||||
strcpy (Gbl.Message,Txt_You_dont_have_permission_to_edit_this_course);
|
||||
Gbl.Error = true;
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -2675,7 +2650,7 @@ static bool Crs_RenameCourse (struct Course *Crs,Cns_ShortOrFullName_t ShortOrFu
|
|||
FieldName,NewCrsName,Crs->CrsCod);
|
||||
DB_QueryUPDATE (Query,"can not update the name of a course");
|
||||
|
||||
/* Write message to show the change made */
|
||||
/* Create message to show the change made */
|
||||
sprintf (Gbl.Message,Txt_The_name_of_the_course_X_has_changed_to_Y,
|
||||
CurrentCrsName,NewCrsName);
|
||||
|
||||
|
@ -2737,16 +2712,9 @@ void Crs_ChangeCrsStatus (void)
|
|||
|
||||
Crs->Status = Status;
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
/***** Create message to show the change made *****/
|
||||
sprintf (Gbl.Message,Txt_The_status_of_the_course_X_has_changed,
|
||||
Crs->ShortName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
|
||||
|
||||
/***** Put button to go to course changed *****/
|
||||
Crs_PutButtonToGoToCrs (Crs);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Crs_ReqEditCourses ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -2755,16 +2723,44 @@ void Crs_ChangeCrsStatus (void)
|
|||
|
||||
void Crs_ContEditAfterChgCrs (void)
|
||||
{
|
||||
bool PutButtonToRequestRegistration;
|
||||
|
||||
if (Gbl.Error)
|
||||
/***** Write error message *****/
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Message);
|
||||
else
|
||||
{
|
||||
/***** Write success message showing the change made *****/
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Message);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
|
||||
|
||||
/***** Put button to go to course changed *****/
|
||||
Crs_PutButtonToGoToCrs (&Gbl.Degs.EditingCrs);
|
||||
|
||||
/***** Put button to request my registration in course *****/
|
||||
PutButtonToRequestRegistration = false;
|
||||
switch (Gbl.Usrs.Me.LoggedRole)
|
||||
{
|
||||
case Rol__GUEST_: // I do not belong to any course
|
||||
PutButtonToRequestRegistration = true;
|
||||
break;
|
||||
case Rol_VISITOR:
|
||||
PutButtonToRequestRegistration = !Usr_CheckIfUsrBelongsToCrs (Gbl.Usrs.Me.UsrDat.UsrCod,
|
||||
Gbl.Degs.EditingCrs.CrsCod,
|
||||
false);
|
||||
break;
|
||||
case Rol_STUDENT:
|
||||
case Rol_TEACHER:
|
||||
if (Gbl.Degs.EditingCrs.CrsCod != Gbl.CurrentCrs.Crs.CrsCod)
|
||||
PutButtonToRequestRegistration = !Usr_CheckIfUsrBelongsToCrs (Gbl.Usrs.Me.UsrDat.UsrCod,
|
||||
Gbl.Degs.EditingCrs.CrsCod,
|
||||
false);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
if (PutButtonToRequestRegistration)
|
||||
Crs_PutButtonToRegisterInCrs (&Gbl.Degs.EditingCrs);
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
|
@ -2790,6 +2786,22 @@ static void Crs_PutButtonToGoToCrs (struct Course *Crs)
|
|||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************************ Put button to go to course *************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Crs_PutButtonToRegisterInCrs (struct Course *Crs)
|
||||
{
|
||||
extern const char *Txt_Register_me_in_X;
|
||||
|
||||
Act_FormStart (ActReqSignUp);
|
||||
if (Crs->CrsCod != Gbl.CurrentCrs.Crs.CrsCod) // If the course is different to the current one...
|
||||
Crs_PutParamCrsCod (Crs->CrsCod);
|
||||
sprintf (Gbl.Title,Txt_Register_me_in_X,Crs->ShortName);
|
||||
Lay_PutCreateButton (Gbl.Title);
|
||||
Act_FormEnd ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************************* Select one of my courses **************************/
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -857,7 +857,7 @@ bool Enr_PutActionsRegRemOneUsr (bool ItsMe)
|
|||
extern const char *The_ClassForm[The_NUM_THEMES];
|
||||
extern const char *Txt_Modify_me_in_the_course_X;
|
||||
extern const char *Txt_Modify_user_in_the_course_X;
|
||||
extern const char *Txt_Register_me_in_the_course_X;
|
||||
extern const char *Txt_Register_me_in_X;
|
||||
extern const char *Txt_Register_USER_in_the_course_X;
|
||||
extern const char *Txt_Register_USER_as_an_administrator_of_the_degree_X;
|
||||
extern const char *Txt_Register_USER_as_an_administrator_of_the_centre_X;
|
||||
|
@ -919,7 +919,7 @@ bool Enr_PutActionsRegRemOneUsr (bool ItsMe)
|
|||
{
|
||||
sprintf (Gbl.Message,UsrBelongsToCrs ? (ItsMe ? Txt_Modify_me_in_the_course_X :
|
||||
Txt_Modify_user_in_the_course_X) :
|
||||
(ItsMe ? Txt_Register_me_in_the_course_X :
|
||||
(ItsMe ? Txt_Register_me_in_X :
|
||||
Txt_Register_USER_in_the_course_X),
|
||||
Gbl.CurrentCrs.Crs.ShortName);
|
||||
fprintf (Gbl.F.Out,"<li>"
|
||||
|
|
56
swad_help.c
56
swad_help.c
|
@ -81,7 +81,7 @@ void Hlp_ShowHelpWhatWouldYouLikeToDo (void)
|
|||
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_Register_me_in_X;
|
||||
extern const char *Txt_Select_or_create_another_course_in_X;
|
||||
extern const char *Txt_Select_or_create_one_course_in_X;
|
||||
extern const char *Txt_Courses;
|
||||
|
@ -120,6 +120,33 @@ void Hlp_ShowHelpWhatWouldYouLikeToDo (void)
|
|||
|
||||
if (Gbl.Usrs.Me.Logged) // I am logged
|
||||
{
|
||||
if (Gbl.CurrentCrs.Crs.CrsCod > 0) // Course selected
|
||||
{
|
||||
if (Gbl.Usrs.Me.IBelongToCurrentCrs) // I belong to this course
|
||||
{
|
||||
if (Gbl.Action.Act != ActAutUsrInt &&
|
||||
Gbl.Action.Act != ActAutUsrExt &&
|
||||
Gbl.Action.Act != ActAutUsrChgLan) // I am not just logged
|
||||
{
|
||||
/* Request my removing from this course */
|
||||
sprintf (Gbl.Title,Txt_Remove_me_from_the_course_X,
|
||||
Gbl.CurrentCrs.Crs.ShortName);
|
||||
Hlp_ShowRowHelpWhatWouldYouLikeToDo (Gbl.Title,
|
||||
ActReqMdfOneStd,
|
||||
"BT_REMOVE",Txt_Remove_me);
|
||||
}
|
||||
}
|
||||
else // I do not belong to this course
|
||||
{
|
||||
/* Request my registration in this course */
|
||||
sprintf (Gbl.Title,Txt_Register_me_in_X,
|
||||
Gbl.CurrentCrs.Crs.ShortName);
|
||||
Hlp_ShowRowHelpWhatWouldYouLikeToDo (Gbl.Title,
|
||||
ActReqSignUp,
|
||||
"BT_CREATE",Txt_Sign_up);
|
||||
}
|
||||
}
|
||||
|
||||
if (Gbl.Usrs.Me.MyCourses.Num) // I am enrolled in some courses
|
||||
{
|
||||
if (Gbl.CurrentCrs.Crs.CrsCod > 0 && // Course selected
|
||||
|
@ -188,33 +215,6 @@ void Hlp_ShowHelpWhatWouldYouLikeToDo (void)
|
|||
ActSeeCty,
|
||||
"BT_CONFIRM",Txt_Countries);
|
||||
|
||||
if (Gbl.CurrentCrs.Crs.CrsCod > 0) // Course selected
|
||||
{
|
||||
if (Gbl.Usrs.Me.IBelongToCurrentCrs) // I belong to this course
|
||||
{
|
||||
if (Gbl.Action.Act != ActAutUsrInt &&
|
||||
Gbl.Action.Act != ActAutUsrExt &&
|
||||
Gbl.Action.Act != ActAutUsrChgLan) // I am not just logged
|
||||
{
|
||||
/* Request my removing from this course */
|
||||
sprintf (Gbl.Title,Txt_Remove_me_from_the_course_X,
|
||||
Gbl.CurrentCrs.Crs.ShortName);
|
||||
Hlp_ShowRowHelpWhatWouldYouLikeToDo (Gbl.Title,
|
||||
ActReqMdfOneStd,
|
||||
"BT_REMOVE",Txt_Remove_me);
|
||||
}
|
||||
}
|
||||
else // I do not belong to this course
|
||||
{
|
||||
/* Request my registration in this course */
|
||||
sprintf (Gbl.Title,Txt_Register_me_in_the_course_X,
|
||||
Gbl.CurrentCrs.Crs.ShortName);
|
||||
Hlp_ShowRowHelpWhatWouldYouLikeToDo (Gbl.Title,
|
||||
ActReqSignUp,
|
||||
"BT_CREATE",Txt_Sign_up);
|
||||
}
|
||||
}
|
||||
|
||||
if (!Gbl.Usrs.Me.MyPhotoExists) // I have no photo
|
||||
Hlp_ShowRowHelpWhatWouldYouLikeToDo (Txt_Upload_my_picture,
|
||||
ActReqMyPho,
|
||||
|
|
20
swad_text.c
20
swad_text.c
|
@ -29279,25 +29279,25 @@ const char *Txt_Register_user_IN_A_COURSE_OR_DEGREE =
|
|||
"Registrar utilizador";
|
||||
#endif
|
||||
|
||||
const char *Txt_Register_me_in_the_course_X = // Warning: it is very important to include %s in the following sentences
|
||||
const char *Txt_Register_me_in_X = // Warning: it is very important to include %s in the following sentences
|
||||
#if L==1
|
||||
"Inscriureme en l'assignatura <strong>%s</strong>";
|
||||
"Inscriureme en <strong>%s</strong>";
|
||||
#elif L==2
|
||||
"Anmeldung Sie mir im Kurs <strong>%s</strong>";
|
||||
"Anmeldung Sie mir im <strong>%s</strong>";
|
||||
#elif L==3
|
||||
"Register me in the course <strong>%s</strong>";
|
||||
"Register me in <strong>%s</strong>";
|
||||
#elif L==4
|
||||
"Inscribirme en la asignatura <strong>%s</strong>";
|
||||
"Inscribirme en <strong>%s</strong>";
|
||||
#elif L==5
|
||||
"Inscrire-moi dans la matière <strong>%s</strong>";
|
||||
"Inscrire-moi dans <strong>%s</strong>";
|
||||
#elif L==6
|
||||
"Inscribirme en la asignatura <strong>%s</strong>"; // Okoteve traducción
|
||||
"Inscribirme en <strong>%s</strong>"; // Okoteve traducción
|
||||
#elif L==7
|
||||
"Registrami utente nel corso <strong>%s</strong>";
|
||||
"Registrami in <strong>%s</strong>";
|
||||
#elif L==8
|
||||
"Rejestracja mnie w kurs <strong>%s</strong>";
|
||||
"Rejestracja mnie w <strong>%s</strong>";
|
||||
#elif L==9
|
||||
"Registrar me na disciplina <strong>%s</strong>";
|
||||
"Registrar me em <strong>%s</strong>";
|
||||
#endif
|
||||
|
||||
const char *Txt_Register_USER_in_the_course_X = // Warning: it is very important to include %s in the following sentences
|
||||
|
|
Loading…
Reference in New Issue