mirror of https://github.com/acanas/swad-core.git
Version 16.172
This commit is contained in:
parent
d4f24d98a5
commit
0d3aae35ed
2
Makefile
2
Makefile
|
@ -33,7 +33,7 @@ OBJS = swad_account.o swad_action.o swad_agenda.o swad_announcement.o \
|
|||
swad_connected.o swad_country.o swad_course.o swad_cryptography.o \
|
||||
swad_database.o swad_date.o swad_degree.o swad_degree_type.o \
|
||||
swad_department.o swad_duplicate.o \
|
||||
swad_enrollment.o swad_exam.o \
|
||||
swad_enrolment.o swad_exam.o \
|
||||
swad_file.o swad_file_browser.o swad_follow.o swad_forum.o \
|
||||
swad_global.o swad_group.o \
|
||||
swad_help.o swad_hierarchy.o swad_holiday.o \
|
||||
|
|
|
@ -2507,7 +2507,7 @@ a:hover img.CENTRE_PHOTO_SHOW
|
|||
text-overflow:ellipsis;
|
||||
}
|
||||
|
||||
/**************************** Enrollment requests ****************************/
|
||||
/**************************** Enrolment requests *****************************/
|
||||
.REQUESTER_NAME
|
||||
{
|
||||
box-sizing:border-box;
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include "swad_calendar.h"
|
||||
#include "swad_database.h"
|
||||
#include "swad_duplicate.h"
|
||||
#include "swad_enrollment.h"
|
||||
#include "swad_enrolment.h"
|
||||
#include "swad_follow.h"
|
||||
#include "swad_global.h"
|
||||
#include "swad_ID.h"
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
#include "swad_degree_type.h"
|
||||
#include "swad_duplicate.h"
|
||||
#include "swad_exam.h"
|
||||
#include "swad_enrollment.h"
|
||||
#include "swad_enrolment.h"
|
||||
#include "swad_follow.h"
|
||||
#include "swad_global.h"
|
||||
#include "swad_ID.h"
|
||||
|
@ -934,7 +934,7 @@ Users:
|
|||
770. ActLstTch Show class photo or list of teachers
|
||||
771. ActLstOth Show class photo or list of guests
|
||||
772. ActSeeAtt Show attendance events
|
||||
773. ActReqSignUp Apply for my enrollment
|
||||
773. ActReqSignUp Apply for my enrolment
|
||||
774. ActSeeSignUpReq Show pending requests for inscription in the current course
|
||||
775. ActLstCon List connected users
|
||||
|
||||
|
@ -990,8 +990,8 @@ Users:
|
|||
821. ActLogInUsrAgdLan Show another user's public agenda after change language
|
||||
822. ActSeeUsrAgd Show another user's public agenda
|
||||
|
||||
823. ActReqEnrSevStd Request the enrollment/removing of several users to / from current course
|
||||
824. ActReqEnrSevTch Request the enrollment/removing of several users to / from current course
|
||||
823. ActReqEnrSevStd Request the enrolment/removing of several users to / from current course
|
||||
824. ActReqEnrSevTch Request the enrolment/removing of several users to / from current course
|
||||
|
||||
825. ActReqLstStdAtt Request listing of attendance of several students to several events
|
||||
826. ActSeeLstMyAtt List my attendance as student to several events
|
||||
|
@ -1010,17 +1010,17 @@ Users:
|
|||
839. ActRecAttStd Save students who attended to an event and comments
|
||||
840. ActRecAttMe Save my comments as student in an attendance event
|
||||
|
||||
841. ActSignUp Apply for my enrollment
|
||||
841. ActSignUp Apply for my enrolment
|
||||
842. ActUpdSignUpReq Update pending requests for inscription in the current course
|
||||
843. ActReqRejSignUp Ask if reject the enrollment of a user in a course
|
||||
844. ActRejSignUp Reject the enrollment of a user in a course
|
||||
843. ActReqRejSignUp Ask if reject the enrolment of a user in a course
|
||||
844. ActRejSignUp Reject the enrolment of a user in a course
|
||||
|
||||
845. ActReqMdfOneOth Request a user's ID for enrollment/removing
|
||||
846. ActReqMdfOneStd Request a user's ID for enrollment/removing
|
||||
847. ActReqMdfOneTch Request a user's ID for enrollment/removing
|
||||
848. ActReqMdfOth Request enrollment/removing of a user
|
||||
849. ActReqMdfStd Request enrollment/removing of a user
|
||||
850. ActReqMdfTch Request enrollment/removing of a user
|
||||
845. ActReqMdfOneOth Request a user's ID for enrolment/removing
|
||||
846. ActReqMdfOneStd Request a user's ID for enrolment/removing
|
||||
847. ActReqMdfOneTch Request a user's ID for enrolment/removing
|
||||
848. ActReqMdfOth Request enrolment/removing of a user
|
||||
849. ActReqMdfStd Request enrolment/removing of a user
|
||||
850. ActReqMdfTch Request enrolment/removing of a user
|
||||
851. ActReqOthPho Show form to send the photo of another user
|
||||
852. ActReqStdPho Show form to send the photo of another user
|
||||
853. ActReqTchPho Show form to send the photo of another user
|
||||
|
@ -1042,12 +1042,12 @@ Users:
|
|||
869. ActUpdOth Update another user's data and groups
|
||||
870. ActUpdStd Update another user's data and groups
|
||||
871. ActUpdTch Update another user's data and groups
|
||||
872. ActReqAccEnrStd Confirm acceptation / refusion of enrollment as student in current course
|
||||
873. ActReqAccEnrTch Confirm acceptation / refusion of enrollment as teacher in current course
|
||||
874. ActAccEnrStd Accept enrollment as student in current course
|
||||
875. ActAccEnrTch Accept enrollment as teacher in current course
|
||||
876. ActRemMe_Std Reject enrollment as student in current course
|
||||
877. ActRemMe_Tch Reject enrollment as teacher in current course
|
||||
872. ActReqAccEnrStd Confirm acceptation / refusion of enrolment as student in current course
|
||||
873. ActReqAccEnrTch Confirm acceptation / refusion of enrolment as teacher in current course
|
||||
874. ActAccEnrStd Accept enrolment as student in current course
|
||||
875. ActAccEnrTch Accept enrolment as teacher in current course
|
||||
876. ActRemMe_Std Reject enrolment as student in current course
|
||||
877. ActRemMe_Tch Reject enrolment as teacher in current course
|
||||
|
||||
878. ActNewAdmIns Register an administrador in this institution
|
||||
879. ActRemAdmIns Remove an administrador of this institution
|
||||
|
@ -2391,7 +2391,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
/* ActLstOth */{1186, 3,TabUsr,ActLstOth ,0x1FF,0x1FF,0x1FF,0x1FF,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Usr_ListDataAdms ,"adm64x64.gif" },
|
||||
/* ActSeeAtt */{ 861, 4,TabUsr,ActSeeAtt ,0x118,0x100, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Att_SeeAttEvents ,"rollcall64x64.png" },
|
||||
/* ActReqSignUp */{1054, 5,TabUsr,ActReqSignUp , 0,0x006, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Enr_ReqSignUpInCrs ,"enrollmentrequest64x64.gif"},
|
||||
/* ActSeeSignUpReq */{1057, 6,TabUsr,ActSeeSignUpReq ,0x1F0,0x1F0,0x1F0,0x1F0,0x1F0,0x1F0,0x1F0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Enr_ShowEnrollmentRequests ,"enrollmentrequest64x64.gif"},
|
||||
/* ActSeeSignUpReq */{1057, 6,TabUsr,ActSeeSignUpReq ,0x1F0,0x1F0,0x1F0,0x1F0,0x1F0,0x1F0,0x1F0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Enr_ShowEnrolmentRequests ,"enrollmentrequest64x64.gif"},
|
||||
/* ActLstCon */{ 995, 7,TabUsr,ActLstCon ,0x1FF,0x1FF,0x1FF,0x1FF,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Con_ShowConnectedUsrs ,"userplugged64x64.gif" },
|
||||
|
||||
// Actions not in menu:
|
||||
|
@ -2473,7 +2473,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
/* ActRecAttMe */{1076,-1,TabUnk,ActSeeAtt ,0x008, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Att_RegisterMeAsStdInAttEvent ,NULL},
|
||||
|
||||
/* ActSignUp */{1056,-1,TabUnk,ActReqSignUp , 0,0x006, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Enr_SignUpInCrs ,NULL},
|
||||
/* ActUpdSignUpReq */{1522,-1,TabUnk,ActSeeSignUpReq ,0x1F0,0x1F0,0x1F0,0x1F0,0x1F0,0x1F0,0x1F0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Enr_UpdateEnrollmentRequests ,NULL},
|
||||
/* ActUpdSignUpReq */{1522,-1,TabUnk,ActSeeSignUpReq ,0x1F0,0x1F0,0x1F0,0x1F0,0x1F0,0x1F0,0x1F0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Enr_UpdateEnrolmentRequests ,NULL},
|
||||
/* ActReqRejSignUp */{1058,-1,TabUnk,ActSeeSignUpReq ,0x1F0,0x1F0,0x1F0,0x1F0,0x1F0,0x1F0,0x1F0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Enr_AskIfRejectSignUp ,NULL},
|
||||
/* ActRejSignUp */{1059,-1,TabUnk,ActSeeSignUpReq ,0x1F0,0x1F0,0x1F0,0x1F0,0x1F0,0x1F0,0x1F0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Enr_RejectSignUp ,NULL},
|
||||
|
||||
|
@ -5100,8 +5100,8 @@ void Act_AdjustCurrentAction (void)
|
|||
/***** If I belong to current course *****/
|
||||
if (Gbl.Usrs.Me.IBelongToCurrentCrs)
|
||||
{
|
||||
/***** If I have not accepted the enrollment,
|
||||
the only action possible is show a form to ask for enrollment *****/
|
||||
/***** If I have not accepted the enrolment,
|
||||
the only action possible is show a form to ask for enrolment *****/
|
||||
if (!Gbl.Usrs.Me.UsrDat.Accepted && Gbl.Action.Act != ActLogOut)
|
||||
{
|
||||
Gbl.Action.Act = (Gbl.Usrs.Me.UsrDat.RoleInCurrentCrsDB == Rol_STUDENT) ? ActReqAccEnrStd :
|
||||
|
@ -5134,7 +5134,7 @@ void Act_AdjustCurrentAction (void)
|
|||
// These last actions are allowed in order to students could see/print timetable before register in groups
|
||||
break;
|
||||
default:
|
||||
/* If there are some group types with mandatory enrollment and groups in this course,
|
||||
/* If there are some group types with mandatory enrolment and groups in this course,
|
||||
and I don't belong to any of those groups,
|
||||
the the only action possible is show a form to register in groups */
|
||||
if (Grp_NumGrpTypesMandatIDontBelong ()) // To do: if this query is too slow ==> put it only when login.
|
||||
|
|
|
@ -250,7 +250,7 @@ void Ctr_ShowConfiguration (void)
|
|||
{
|
||||
Ctr_Configuration (false);
|
||||
|
||||
/***** Show help to enroll me *****/
|
||||
/***** Show help to enrol me *****/
|
||||
Hlp_ShowHelpWhatWouldYouLikeToDo ();
|
||||
}
|
||||
|
||||
|
|
128
swad_changelog.h
128
swad_changelog.h
|
@ -135,7 +135,7 @@
|
|||
|
||||
// TODO: When SWAD prompts the user to confirm elimination of a group, list the groups below the button
|
||||
|
||||
// TODO: Send a message to the user when rejecting a request for enrollment. Suggested by Javier Fernández Baldomero.
|
||||
// TODO: Send a message to the user when rejecting a request for enrolment. Suggested by Javier Fernández Baldomero.
|
||||
// TODO: Create a table with IPs to block temporarily multiple access to the action used to check ID for empty accounts
|
||||
// TODO: Every action should have a minimum time between two clicks on it (for example "Generate a report" should have 60 s)
|
||||
|
||||
|
@ -207,17 +207,21 @@
|
|||
|
||||
// TODO: Cuando un admin. pulsa en "Inscribir profesor/a" y el usuario es invitado, debería salir en el rol por defecto "profesor" y no "estudiante"
|
||||
|
||||
// TODO: Poner interrogación de ayuda en "USUARIOS > Inscripción" (cuando se pide confirmación para aceptar o rechazar)
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 16.171.15 (2017-03-30)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 16.172 (2017-03-30)"
|
||||
#define CSS_FILE "swad16.166.css"
|
||||
#define JS_FILE "swad16.144.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 16.172: Mar 30, 2017 Some help URLs translated to spanish.
|
||||
Changed "enroll" and "enrollment" to "enrol" and "enrolment", except in web service API. (217531 lines)
|
||||
Version 16.171.15:Mar 30, 2017 Some help URLs translated to spanish. (217528 lines)
|
||||
Version 16.171.14:Mar 29, 2017 Some help URLs translated to spanish. (217526 lines)
|
||||
Version 16.171.13:Mar 29, 2017 Some help URLs translated to spanish. (217526 lines)
|
||||
|
@ -248,7 +252,7 @@ sudo cp -a icon/picture64x64.gif /var/www/html/swad/icon/
|
|||
Version 16.168.1: Mar 26, 2017 Link to view degree types in degrees. (217694 lines)
|
||||
Version 16.168: Mar 26, 2017 Action to view places removed from main menu. (217679 lines)
|
||||
Version 16.167.16:Mar 26, 2017 Link to view places in centres. (217718 lines)
|
||||
Version 16.167.15:Mar 26, 2017 Code refactoring in enrollment. (217694 lines)
|
||||
Version 16.167.15:Mar 26, 2017 Code refactoring in enrolment. (217694 lines)
|
||||
Version 16.167.14:Mar 26, 2017 Code refactoring in follow/unfollow. (217691 lines)
|
||||
Version 16.167.13:Mar 26, 2017 Code refactoring in uploading of photos. (217686 lines)
|
||||
Version 16.167.12:Mar 26, 2017 Code refactoring in edition of institutions. (217685 lines)
|
||||
|
@ -303,7 +307,7 @@ UPDATE actions SET Obsolete='Y' WHERE ActCod='1617';
|
|||
Version 16.159: Mar 21, 2017 Changes in agenda. Not finished. (217511 lines)
|
||||
Version 16.158.1: Mar 21, 2017 Changes in agenda. Not finished. (217395 lines)
|
||||
Version 16.158: Mar 21, 2017 Changes in agenda. Not finished.
|
||||
Fixed bug in user enrollment. (217394 lines)
|
||||
Fixed bug in user enrolment. (217394 lines)
|
||||
Copy the following icons to icon public directory:
|
||||
sudo cp -a past64x64.png /var/www/html/swad/icon/
|
||||
sudo cp -a future64x64.png /var/www/html/swad/icon/
|
||||
|
@ -515,7 +519,7 @@ ALTER TABLE agendas CHANGE COLUMN Location Location VARCHAR(2047) NOT NULL;
|
|||
Version 16.147.7: Mar 05, 2017 Changes in layout of social timeline. (216372 lines)
|
||||
Version 16.147.6: Mar 05, 2017 Changes in layout of record card. (216370 lines)
|
||||
Version 16.147.5: Mar 05, 2017 Changes in layout of record card. (216346 lines)
|
||||
Version 16.147.4: Mar 05, 2017 Changes in layout of enrollment requesters.
|
||||
Version 16.147.4: Mar 05, 2017 Changes in layout of enrolment requesters.
|
||||
Code refactoring writing user's name. (216345 lines)
|
||||
Version 16.147.3: Mar 05, 2017 Changes in layout of followed users, users to follow and connected users. (216365 lines)
|
||||
Version 16.147.2: Mar 05, 2017 Changes in layout of notice author. (216316 lines)
|
||||
|
@ -588,7 +592,7 @@ INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1637','es','N','Ver
|
|||
Version 16.135.5: Feb 11, 2017 Change in button to register teacher when no teachers found.
|
||||
Changed color in statistics of countries. (212503 lines)
|
||||
Version 16.135.4: Feb 11, 2017 Force filling of ID in form to check if account exists. (212502 lines)
|
||||
Version 16.135.3: Feb 09, 2017 Code refactoring related to enrolling teachers and students. (212499 lines)
|
||||
Version 16.135.3: Feb 09, 2017 Code refactoring related to enroling teachers and students. (212499 lines)
|
||||
Version 16.135.2: Feb 09, 2017 Changes in layout of stats on degrees. (212456 lines)
|
||||
Version 16.135.1: Feb 09, 2017 Link from current date to calendar depending on scope. (212461 lines)
|
||||
Version 16.135: Feb 09, 2017 Changes in layout of tabs. (212452 lines)
|
||||
|
@ -666,8 +670,8 @@ UPDATE actions SET Txt='Cambiar 1er. día calendario asignatura' WHERE Act
|
|||
Version 16.122: Jan 20, 2017 Link to calendar in current month (left-top date-time). (211937 lines)
|
||||
Version 16.121: Jan 19, 2017 Fixed bug in groups selection, reported by Eva Martínez Ortigosa.
|
||||
Code refactoring in groups selected. (211915 lines)
|
||||
Version 16.120.2: Jan 19, 2017 Changed the question to confirm user's enrollment. (211954 lines)
|
||||
Version 16.120.1: Jan 19, 2017 From now on, a teacher A can enroll another user B as a teacher in their courses, although user B is not yet a teacher in any course. (? lines)
|
||||
Version 16.120.2: Jan 19, 2017 Changed the question to confirm user's enrolment. (211954 lines)
|
||||
Version 16.120.1: Jan 19, 2017 From now on, a teacher A can enrol another user B as a teacher in their courses, although user B is not yet a teacher in any course. (? lines)
|
||||
Version 16.120: Jan 19, 2017 Fixed bug when limiting length of links. (211934 lines)
|
||||
Version 16.119.4: Jan 18, 2017 Changes in layout of current data and time. (211882 lines)
|
||||
Version 16.119.3: Jan 17, 2017 Changes in layout of current data and time. (211881 lines)
|
||||
|
@ -767,10 +771,10 @@ UPDATE actions SET Txt='Cambiar 1er. día calendario asignatura' WHERE Act
|
|||
Changes in layout of lists. (211183 lines)
|
||||
Version 16.103.7: Dec 18, 2016 Change in checkbox to force students to read couse info. (211206 lines)
|
||||
Version 16.103.6: Dec 18, 2016 Some div elements changed to header, footer, aside and nav elements. (211212 lines)
|
||||
Version 16.103.5: Dec 17, 2016 Code refactoring in user enrollment. (211207 lines)
|
||||
Version 16.103.4: Dec 17, 2016 Code refactoring in user enrollment. (211170 lines)
|
||||
Version 16.103.3: Dec 17, 2016 Code refactoring in user enrollment. (211149 lines)
|
||||
Version 16.103.2: Dec 17, 2016 Code refactoring in user enrollment. (211133 lines)
|
||||
Version 16.103.5: Dec 17, 2016 Code refactoring in user enrolment. (211207 lines)
|
||||
Version 16.103.4: Dec 17, 2016 Code refactoring in user enrolment. (211170 lines)
|
||||
Version 16.103.3: Dec 17, 2016 Code refactoring in user enrolment. (211149 lines)
|
||||
Version 16.103.2: Dec 17, 2016 Code refactoring in user enrolment. (211133 lines)
|
||||
Version 16.103.1: Dec 16, 2016 Changes in layout of tabs. (211123 lines)
|
||||
Version 16.103: Dec 16, 2016 Contextual help on course info. (211130 lines)
|
||||
Version 16.102: Dec 15, 2016 Fixed bug in mail to students, reported by GitHub user raistmaj.
|
||||
|
@ -1019,7 +1023,7 @@ Copy icon/iconset/nuvola/action64x64/mapmarker64x64.png to public icons director
|
|||
Version 16.68: Nov 22, 2016 Change in text related to notifications.
|
||||
Changes in contextual links in notifications. (207406 lines)
|
||||
Version 16.67.3: Nov 22, 2016 Contextual help on notifications. (207355 lines)
|
||||
Version 16.67.2: Nov 21, 2016 Contextual help on sign up in a course and enrollment requests. (207351 lines)
|
||||
Version 16.67.2: Nov 21, 2016 Contextual help on sign up in a course and enrolment requests. (207351 lines)
|
||||
Version 16.67.1: Nov 21, 2016 Contextual help on connected users and last clicks in real time. (207346 lines)
|
||||
Version 16.67: Nov 21, 2016 Refactoring in tests.
|
||||
"Test exam" is now called "Test result". (207336 lines)
|
||||
|
@ -1580,7 +1584,7 @@ Copy icons icon/download64x64.png
|
|||
Version 15.233.2: Jun 27, 2016 Code refactoring in search of users. (203072 lines)
|
||||
Version 15.233.1: Jun 27, 2016 New restrictions in length of search string. (203117 lines)
|
||||
Version 15.233: Jun 27, 2016 Simplified search for users with a role. Now all users can be found. (203103 lines)
|
||||
Version 15.232.1: Jun 27, 2016 Fixed bug in search of any user (acceptation of enrollment was wrong). (203702 lines)
|
||||
Version 15.232.1: Jun 27, 2016 Fixed bug in search of any user (acceptation of enrolment was wrong). (203702 lines)
|
||||
Version 15.232: Jun 27, 2016 Search any user, independently on role. (203657 lines)
|
||||
Version 15.231.4: Jun 24, 2016 Fix bug (buffer overflow) when getting users. (203474 lines)
|
||||
Version 15.231.3: Jun 24, 2016 Parameter name used for "Scope" now depends on context. (203472 lines)
|
||||
|
@ -2131,8 +2135,8 @@ ALTER TABLE tst_questions ADD COLUMN Image CHAR(43) NOT NULL AFTER Stem;
|
|||
Version 15.163.3: Mar 28, 2016 Scope selector inside frame in listing of admins. (196652 lines)
|
||||
Version 15.163.2: Mar 27, 2016 Scope selector inside frame in listing of guests. (196655 lines)
|
||||
Version 15.163.1: Mar 27, 2016 Added HTML directives "label" for scope and other form fields. (196654 lines)
|
||||
Version 15.163: Mar 27, 2016 Requests for enrollment older than one month are automatically removed. (196656 lines)
|
||||
Version 15.162.7: Mar 25, 2016 Changed message after enrollment request. (196625 lines)
|
||||
Version 15.163: Mar 27, 2016 Requests for enrolment older than one month are automatically removed. (196656 lines)
|
||||
Version 15.162.7: Mar 25, 2016 Changed message after enrolment request. (196625 lines)
|
||||
Version 15.162.6: Mar 24, 2016 Smaller buttons to see results of surveys.
|
||||
Fix bug in surveys. (196615 lines)
|
||||
Version 15.162.5: Mar 24, 2016 Default role in registration form will be teacher for the creator of a course. (196615 lines)
|
||||
|
@ -2146,10 +2150,10 @@ ALTER TABLE tst_questions ADD COLUMN Image CHAR(43) NOT NULL AFTER Stem;
|
|||
Version 15.161.3: Mar 24, 2016 Changed icon to reset survey. (196577 lines)
|
||||
Copy file recycle64x64.png to icon directory
|
||||
|
||||
Version 15.161.2: Mar 24, 2016 Removed contextual icon "update" integrated in frame in "enrollment requests". (196577 lines)
|
||||
Version 15.161.2: Mar 24, 2016 Removed contextual icon "update" integrated in frame in "enrolment requests". (196577 lines)
|
||||
Version 15.161.1: Mar 24, 2016 Code refactoring in forms to select roles.
|
||||
Put contextual icon "update" integrated in frame in "enrollment requests". (196598 lines)
|
||||
Version 15.161: Mar 24, 2016 Changes related to enrollments requests. (196581 lines)
|
||||
Put contextual icon "update" integrated in frame in "enrolment requests". (196598 lines)
|
||||
Version 15.161: Mar 24, 2016 Changes related to enrolments requests. (196581 lines)
|
||||
1 change necessary in database:
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1522','es','N','Actualizar inscripciones pendientes');
|
||||
|
||||
|
@ -2868,7 +2872,7 @@ INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1489','es','N','Elim
|
|||
Version 15.68: Dec 19, 2015 Show guests in connected users.
|
||||
Optimization in queries about connected users. (187158 lines)
|
||||
Version 15.67.1: Dec 15, 2015 Changed some messages. (187141 lines)
|
||||
Version 15.67: Dec 15, 2015 Fixed bugs in queries of enrollment requests. (187140 lines)
|
||||
Version 15.67: Dec 15, 2015 Fixed bugs in queries of enrolment requests. (187140 lines)
|
||||
Version 15.66.3: Dec 15, 2015 Changes in some small icons.
|
||||
Fixed bug in record card. (187004 lines)
|
||||
2 changes necessary in database:
|
||||
|
@ -3216,10 +3220,10 @@ ALTER TABLE log ADD COLUMN CtyCod INT NOT NULL DEFAULT -1 AFTER ActCod,ADD INDEX
|
|||
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.9: Oct 05, 2015 Contextual help to encourage enrolment. (185512 lines)
|
||||
Version 15.8: Oct 04, 2015 Changes in file browser layout.
|
||||
Folder owners are not displayed. (185022 lines)
|
||||
Version 15.7.2: Oct 04, 2015 New layout in enrollment requests. (185018 lines)
|
||||
Version 15.7.2: Oct 04, 2015 New layout in enrolment requests. (185018 lines)
|
||||
Version 15.7.1: Oct 03, 2015 Message translated. (184984 lines)
|
||||
Version 15.7: Oct 03, 2015 Height of tabs reduced.
|
||||
Changes in layout of students record cards in course. (184962 lines)
|
||||
|
@ -3253,32 +3257,32 @@ Add swad_help.o to list of object files
|
|||
Version 14.134.8: Sep 20, 2015 Fixed bug in list of guests.
|
||||
Changes in listing of connected users. (184885 lines)
|
||||
Version 14.134.7: Sep 18, 2015 Fixed bug in list of guests. (184879 lines)
|
||||
Version 14.134.6: Sep 18, 2015 Fixed bug in user enrollment. (184878 lines)
|
||||
Version 14.134.6: Sep 18, 2015 Fixed bug in user enrolment. (184878 lines)
|
||||
Version 14.134.5: Sep 18, 2015 Change in order of options in user menu.
|
||||
Change in styles and layout related to users. (184877 lines)
|
||||
Version 14.134.4: Sep 18, 2015 Changes in user enrollment. (184876 lines)
|
||||
Version 14.134.3: Sep 18, 2015 Changes in user enrollment. (184875 lines)
|
||||
Version 14.134.4: Sep 18, 2015 Changes in user enrolment. (184876 lines)
|
||||
Version 14.134.3: Sep 18, 2015 Changes in user enrolment. (184875 lines)
|
||||
4 changes necessary in database:
|
||||
UPDATE actions SET Obsolete='Y' WHERE ActCod='82';
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1467','es','N','Cambiar contraseña otro usuario');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1468','es','N','Cambiar contraseña estudiante');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1469','es','N','Cambiar contraseña profesor');
|
||||
|
||||
Version 14.134.2: Sep 17, 2015 Changes in user enrollment. (184852 lines)
|
||||
Version 14.134.2: Sep 17, 2015 Changes in user enrolment. (184852 lines)
|
||||
4 changes necessary in database:
|
||||
UPDATE actions SET Obsolete='Y' WHERE ActCod='598';
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1464','es','N','Solicitar cambio contraseña otro usuario');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1465','es','N','Solicitar cambio contraseña estudiante');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1466','es','N','Solicitar cambio contraseña profesor');
|
||||
|
||||
Version 14.134.1: Sep 17, 2015 Changes in user enrollment. (184834 lines)
|
||||
Version 14.134.1: Sep 17, 2015 Changes in user enrolment. (184834 lines)
|
||||
3 changes necessary in database:
|
||||
UPDATE actions SET Obsolete='Y' WHERE ActCod='58';
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1462','es','N','Eliminar estudiante asignatura');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1463','es','N','Eliminar profesor asignatura');
|
||||
|
||||
Version 14.134: Sep 17, 2015 Changes in user enrollment.
|
||||
Changes in notifications about enrollment. (184823 lines)
|
||||
Version 14.134: Sep 17, 2015 Changes in user enrolment.
|
||||
Changes in notifications about enrolment. (184823 lines)
|
||||
25 changes necessary in database:
|
||||
UPDATE actions SET Obsolete='Y' WHERE ActCod='592';
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1456','es','N','Solicitar acept. inscrip. estudiante');
|
||||
|
@ -3306,12 +3310,12 @@ UPDATE sta_notif SET NotifyEvent=8 WHERE NotifyEvent=7;
|
|||
UPDATE usr_data SET NotifNtfEvents=(((NotifNtfEvents & ~0x7F) << 1) | (NotifNtfEvents & 0x7F) | 0x80);
|
||||
UPDATE usr_data SET EmailNtfEvents=(((EmailNtfEvents & ~0x7F) << 1) | (EmailNtfEvents & 0x7F));
|
||||
|
||||
Version 14.133.1: Sep 17, 2015 Changes in user enrollment. (184669 lines)
|
||||
Version 14.133: Sep 17, 2015 Changes in user enrollment. (184665 lines)
|
||||
Version 14.133.1: Sep 17, 2015 Changes in user enrolment. (184669 lines)
|
||||
Version 14.133: Sep 17, 2015 Changes in user enrolment. (184665 lines)
|
||||
1 change necessary in database:
|
||||
UPDATE actions SET Obsolete='Y' WHERE ActCod IN ('1417','1421','1425');
|
||||
|
||||
Version 14.132.7: Sep 17, 2015 Changes in user enrollment. (184706 lines)
|
||||
Version 14.132.7: Sep 17, 2015 Changes in user enrolment. (184706 lines)
|
||||
Version 14.132.6: Sep 17, 2015 Changes in users' IDs. (184640 lines)
|
||||
12 changes necessary in database:
|
||||
UPDATE actions SET Obsolete='Y' WHERE ActCod='1239';
|
||||
|
@ -3327,7 +3331,7 @@ INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1453','es','N','Crea
|
|||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1454','es','N','Crear ID estudiante');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1455','es','N','Crear ID profesor');
|
||||
|
||||
Version 14.132.5: Sep 16, 2015 Changes in user enrollment. (184592 lines)
|
||||
Version 14.132.5: Sep 16, 2015 Changes in user enrolment. (184592 lines)
|
||||
4 changes necessary in database:
|
||||
UPDATE actions SET Obsolete='Y' WHERE ActCod='440';
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1444','es','N','Crear invitado');
|
||||
|
@ -3363,29 +3367,29 @@ INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1432','es','N','Soli
|
|||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1433','es','N','Solicitar cambio foto estudiante');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1434','es','N','Solicitar cambio foto profesor');
|
||||
|
||||
Version 14.131.1: Sep 16, 2015 Changes in user enrollment. (184403 lines)
|
||||
Version 14.131: Sep 15, 2015 Changes in user enrollment. (184408 lines)
|
||||
Version 14.131.1: Sep 16, 2015 Changes in user enrolment. (184403 lines)
|
||||
Version 14.131: Sep 15, 2015 Changes in user enrolment. (184408 lines)
|
||||
2 changes necessary in database:
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1430','es','N','Preguntar si eliminar mi cuenta');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1431','es','N','Eliminar mi cuenta');
|
||||
|
||||
Version 14.130.3: Sep 14, 2015 Changes in user enrollment. (184358 lines)
|
||||
Version 14.130.2: Sep 14, 2015 Changes in user enrollment. (184359 lines)
|
||||
Version 14.130.1: Sep 14, 2015 Changes and bug fixing in user enrollment. (184416 lines)
|
||||
Version 14.130.3: Sep 14, 2015 Changes in user enrolment. (184358 lines)
|
||||
Version 14.130.2: Sep 14, 2015 Changes in user enrolment. (184359 lines)
|
||||
Version 14.130.1: Sep 14, 2015 Changes and bug fixing in user enrolment. (184416 lines)
|
||||
3 changes necessary in database:
|
||||
UPDATE actions SET Obsolete='Y' WHERE ActCod='799';
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1428','es','N','Inscribir/eliminar varios estudiantes');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1429','es','N','Inscribir/eliminar varios profesores');
|
||||
|
||||
Version 14.130: Sep 13, 2015 Changes in user enrollment. (184379 lines)
|
||||
Version 14.130: Sep 13, 2015 Changes in user enrolment. (184379 lines)
|
||||
3 changes necessary in database:
|
||||
UPDATE actions SET Obsolete='Y' WHERE ActCod='797';
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1426','es','N','Administrar varios estudiantes');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1427','es','N','Administrar varios profesores');
|
||||
|
||||
Version 14.129: Sep 12, 2015 New links to admin a user in list of students.
|
||||
Changes in user enrollment.
|
||||
Fixed bug in user enrollment. (184411 lines)
|
||||
Changes in user enrolment.
|
||||
Fixed bug in user enrolment. (184411 lines)
|
||||
15 changes necessary in database:
|
||||
UPDATE actions SET Obsolete='Y' WHERE ActCod='177';
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1414','es','N','Solicitar ID modif. invitado');
|
||||
|
@ -4015,10 +4019,10 @@ INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1245','es','N','Soli
|
|||
ALTER TABLE institutions DROP COLUMN Logo;
|
||||
|
||||
Version 14.55.5: Jan 16, 2015 Code refactoring related to maps of countries. (173573 lines)
|
||||
Version 14.55.4: Jan 16, 2015 Fixed bugs in enrollment.
|
||||
Version 14.55.4: Jan 16, 2015 Fixed bugs in enrolment.
|
||||
New MIME type, suggested by Francisco Ocaña Lara. (173576 lines)
|
||||
Version 14.55.3: Jan 16, 2015 Link in course information to request registration in course.
|
||||
Fixed bug in enrollment. (173570 lines)
|
||||
Fixed bug in enrolment. (173570 lines)
|
||||
Version 14.55.2: Jan 15, 2015 Logo of centre, degree, institution or country in title. (173546 lines)
|
||||
Version 14.55.1: Jan 14, 2015 Fixed bug in user's photo. (173510 lines)
|
||||
Version 14.55: Jan 14, 2015 New option to upload logo of a centre. (173509 lines)
|
||||
|
@ -4162,9 +4166,9 @@ Add swad_account.o to list of object files
|
|||
Add swad_role.o to list of object files
|
||||
|
||||
Version 14.35: Dec 12, 2014 New MIME type, suggested by Benito Palacios.
|
||||
New module swad_enrollment for enrollment (registration) or removing of users. (170725 lines)
|
||||
New module swad_enrolment for enrolment (registration) or removing of users. (170725 lines)
|
||||
1 change necessary in Makefile:
|
||||
Add swad_enrollment.o to list of object files
|
||||
Add swad_enrolment.o to list of object files
|
||||
|
||||
Version 14.34.4: Dec 08, 2014 Some messages translated. (170623 lines)
|
||||
Version 14.34.3: Dec 08, 2014 Tables are printed with rounded corners. (170602 lines)
|
||||
|
@ -4836,7 +4840,7 @@ INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1164','es','N','Conf
|
|||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1162','es','N','Solicitar la creación de una cuenta');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1163','es','N','Crear una nueva cuenta');
|
||||
|
||||
Version 13.40.1: Jan 22, 2014 Changes in enrollment of users. (161007 lines)
|
||||
Version 13.40.1: Jan 22, 2014 Changes in enrolment of users. (161007 lines)
|
||||
Version 13.40: Jan 20, 2014 Changes in listing of countries.
|
||||
Removed options to go to country, institution, centre, etc. (160965 lines)
|
||||
1 change necessary in database:
|
||||
|
@ -4856,8 +4860,8 @@ Add swad_photo.o to list of object files
|
|||
Version 13.37.2: Jan 13, 2014 Get list of users' codes for a given ID. Not finished.
|
||||
Fixed bug when redirecting to another language, reported by Monserrat Bosch Olives. (160694 lines)
|
||||
Version 13.37.1: Jan 13, 2014 Get list of users' codes for a given ID. Not finished. (160611 lines)
|
||||
Version 13.37: Jan 12, 2014 Code refactoring related to enrollment of users. (160575 lines)
|
||||
Version 13.36: Jan 11, 2014 When a teacher tries to enroll a user in a course and there are more than one user with the same ID, the teacher can choose what user to enroll. (160605 lines)
|
||||
Version 13.37: Jan 12, 2014 Code refactoring related to enrolment of users. (160575 lines)
|
||||
Version 13.36: Jan 11, 2014 When a teacher tries to enrol a user in a course and there are more than one user with the same ID, the teacher can choose what user to enrol. (160605 lines)
|
||||
Version 13.35.2: Jan 11, 2014 Implemented function to remove one of my user's IDs. (160531 lines)
|
||||
Version 13.35.1: Jan 11, 2014 Changes in layout and CSS. (160453 lines)
|
||||
Version 13.35: Jan 11, 2014 Changes in CSS for icons. (160491 lines)
|
||||
|
@ -4886,7 +4890,7 @@ Add swad_photo.o to list of object files
|
|||
1 change necessary in database:
|
||||
UPDATE actions SET Obsolete='Y' WHERE ActCod='306';
|
||||
|
||||
Version 13.31: Dec 31, 2013 Enrollment tab is merged with users tab.
|
||||
Version 13.31: Dec 31, 2013 Enrolment tab is merged with users tab.
|
||||
Connected option is moved to the end of users tab. (161065 lines)
|
||||
Version 13.30.3: Dec 31, 2013 Link to edit groups in option to select my groups. (161188 lines)
|
||||
Version 13.30.2: Dec 31, 2013 Options to edit group types is integrated in option to edit groups. (161244 lines)
|
||||
|
@ -5256,7 +5260,7 @@ INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1108','es','N','Envi
|
|||
Version 12.68.5: Sep 20, 2013 Default icon set is changed from Nuvola to Awesome. (153535 lines)
|
||||
Version 12.68.4: Sep 19, 2013 Internal changes in creation of new users. (153534 lines)
|
||||
Version 12.68.3: Sep 19, 2013 Fixed bug in creation of new users. (153508 lines)
|
||||
Version 12.68.2: Sep 19, 2013 Fixed bug in notifications about enrollment requests, reported by Antonio Martínez López. (153491 lines)
|
||||
Version 12.68.2: Sep 19, 2013 Fixed bug in notifications about enrolment requests, reported by Antonio Martínez López. (153491 lines)
|
||||
Version 12.68.1: Sep 18, 2013 Fixed bug in icon set. (153479 lines)
|
||||
Version 12.68: Sep 18, 2013 Users can choose two icon sets: Awesome and Nuvola. (153475 lines)
|
||||
Create directory for icon set in directory of icons:
|
||||
|
@ -5660,7 +5664,7 @@ ALTER TABLE tst_answers ADD COLUMN Feedback TEXT NOT NULL AFTER Answer;
|
|||
Version 12.33: Feb 10, 2013 New users' range for current centre.
|
||||
Refactorization of code related to users' lists location. (144061 lines)
|
||||
Version 12.32.5: Jan 30, 2013 Changes in the text of several options in menu.
|
||||
Changes in order of options of enrollment tab. (143920 lines)
|
||||
Changes in order of options of enrolment tab. (143920 lines)
|
||||
Version 12.32.4: Jan 29, 2013 Fixed bug in calendar. (143918 lines)
|
||||
Version 12.32.3: Jan 15, 2013 New file extension allowed, requested by Javier Mateos: .dmg (Disk Image in Masc OS). (143896 lines)
|
||||
Version 12.32.2: Dec 30, 2012 Changed DNI to UsrID in tables log and log_recent. (143896 lines)
|
||||
|
@ -5929,8 +5933,8 @@ ALTER TABLE crs_grp_types ADD COLUMN MustBeOpened ENUM('N','Y') NOT NULL DEFAULT
|
|||
ALTER TABLE crs_grp_types ADD COLUMN OpenTime DATETIME NOT NULL DEFAULT 0 AFTER Multiple;
|
||||
CREATE INDEX OpenTime ON crs_grp_types (OpenTime);
|
||||
|
||||
Version 12.0.5: Sep 30, 2012 Changes in listing of pending requests for enrollment. (136342 lines)
|
||||
Version 12.0.4: Sep 30, 2012 Selection of students or teachers when listing pending requests for enrollment. (136337 lines)
|
||||
Version 12.0.5: Sep 30, 2012 Changes in listing of pending requests for enrolment. (136342 lines)
|
||||
Version 12.0.4: Sep 30, 2012 Selection of students or teachers when listing pending requests for enrolment. (136337 lines)
|
||||
Version 12.0.3: Sep 30, 2012 Change in menu of system tab. (136273 lines)
|
||||
Version 12.0.2: Sep 29, 2012 Minor change in configuration of tests. (136272 lines)
|
||||
Version 12.0.1: Sep 24, 2012 Minor change in order of option in system tab. (136268 lines)
|
||||
|
@ -5973,7 +5977,7 @@ UPDATE actions SET Txt='Formulario solicitud inscripci
|
|||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1056','es','Y','Solicitar inscripción');
|
||||
|
||||
Version 11.76: Sep 15, 2012 Programming new option to request the creation of a new course.
|
||||
New option to apply for enrollment.
|
||||
New option to apply for enrolment.
|
||||
New option to change the status of a course. (135559 lines)
|
||||
2 changes necessary in database:
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1054','es','Y','Solicitar inscripción');
|
||||
|
@ -6006,7 +6010,7 @@ CREATE INDEX Status ON courses (Status);
|
|||
Teachers can not change other users' passwords. (134539 lines)
|
||||
Version 11.74: Jul 24, 2012 Changed "dar de alta/baja" to "inscribir/eliminar" in Spanish and Catala.
|
||||
Changed the order of several options in menus.
|
||||
Users' tab is moved after enrollment tab. (134512 lines)
|
||||
Users' tab is moved after enrolment tab. (134512 lines)
|
||||
Version 11.73: Jul 21, 2012 Fixed important bug in trimming leading spaces of strings. (134526 lines)
|
||||
Version 11.72.9: Jul 20, 2012 Fixed bug in edition of plugins. (134511 lines)
|
||||
Version 11.72.8: Jul 20, 2012 Changed database collation to latin1_spanish_ci. (134486 lines)
|
||||
|
@ -6200,7 +6204,7 @@ INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1051','es','N','Camb
|
|||
Version 11.30.6: Jan 14, 2012 Several messages translated (still 53 messages to be translated).
|
||||
Other minor changes. (124913 lines)
|
||||
Version 11.30.5: Jan 14, 2012 Pending notifications are sent by email on refresh actions. (124802 lines)
|
||||
Version 11.30.4: Jan 14, 2012 When a user is removed from a course or from a group, it is better not to set notifications as inaccessible because the user can be enrolled again. (124802 lines)
|
||||
Version 11.30.4: Jan 14, 2012 When a user is removed from a course or from a group, it is better not to set notifications as inaccessible because the user can be enroled again. (124802 lines)
|
||||
Version 11.30.3: Jan 14, 2012 When a course is removed, the notifications in that course are set as removed.
|
||||
When a user is removed from a course or from a group, the notifications inaccessible are set as inaccessible. (124842 lines)
|
||||
Version 11.30.2: Jan 13, 2012 When a group is removed, the notifications about files of marks in that group are set as removed. (124757 lines)
|
||||
|
@ -6341,7 +6345,7 @@ INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1051','es','N','Camb
|
|||
Programming new WS function sendMessage. (121829 lines)
|
||||
Version 10.53.5: Jul 02, 2011 New fields added to WS function getNotifications. (121749 lines)
|
||||
Version 10.53.4: Jun 30, 2011 Changes in database tables. (121743 lines)
|
||||
Version 10.53.3: Jun 30, 2011 Change in enrollment of users with a new role. (121742 lines)
|
||||
Version 10.53.3: Jun 30, 2011 Change in enrolment of users with a new role. (121742 lines)
|
||||
Version 10.53.2: Jun 14, 2011 New statistics about number of test questions. (121716 lines)
|
||||
Version 10.53.1: Jun 13, 2011 New statistics about number of test questions. (121638 lines)
|
||||
Version 10.53: Jun 10, 2011 A lot of messages translated to Polish by Wojtek Kieca, Tomasz Olechowski and Mateusz Stanko, students from Zespol Szkol Techniczny nr. 9. (121585 lines)
|
||||
|
@ -6425,8 +6429,8 @@ INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1051','es','N','Camb
|
|||
Version 10.35.2: Mar 10, 2011 Fixed bug in statistics of users in a course, reported by Nicola Comunale Rizzo. (100706 lines)
|
||||
Version 10.35.1: Mar 10, 2011 Counting number of students in a group instead of getting directly. This change should be reversed if slow. (100725 lines)
|
||||
Version 10.35: Mar 10, 2011 Changes and bug fixes counting number of students in groups. (? lines)
|
||||
Version 10.34: Mar 09, 2011 Lot of changes in enrollment of users. (100696 lines)
|
||||
Version 10.33.3: Mar 08, 2011 Changes in enrollment of users. (100666 lines)
|
||||
Version 10.34: Mar 09, 2011 Lot of changes in enrolment of users. (100696 lines)
|
||||
Version 10.33.3: Mar 08, 2011 Changes in enrolment of users. (100666 lines)
|
||||
Version 10.33.2: Mar 08, 2011 Fixed bugs and other changes related to importation of students from an external site. (100659 lines)
|
||||
Version 10.33.1: Mar 08, 2011 Few changes related to roles in courses. (100638 lines)
|
||||
Version 10.33: Mar 08, 2011 Added indexes to table crs_usr.
|
||||
|
@ -6438,7 +6442,7 @@ INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1051','es','N','Camb
|
|||
Version 10.32: Mar 07, 2011 Changes in global statistics about number of users.
|
||||
Fixed bug in query related to search of teachers. (100696 lines)
|
||||
Version 10.31.1: Mar 07, 2011 UsrDat->Roles is not computed, but read from usr_data table. (100666 lines)
|
||||
Version 10.31: Mar 06, 2011 A user can be enrolled as "teacher" in course A and as "student" in course B. (100660 lines)
|
||||
Version 10.31: Mar 06, 2011 A user can be enroled as "teacher" in course A and as "student" in course B. (100660 lines)
|
||||
Version 10.30.4: Mar 06, 2011 Changed "UsrType" to "Role" in log and log_recent database tables. (100587 lines)
|
||||
Version 10.30.3: Mar 06, 2011 Internal changes related to roles. (100587 lines)
|
||||
Version 10.30.2: Mar 06, 2011 Changed "Gender" for "Sex" in database tables. (100580 lines)
|
||||
|
@ -6454,7 +6458,7 @@ INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1051','es','N','Camb
|
|||
Version 10.27: Mar 02, 2011 User type related variables and database fields are changed form UsrType to Role, except fields in log tables. (100252 lines)
|
||||
Version 10.26: Mar 01, 2011 After sending a file to a folder, a new form to send another file to the same folder is shown. (100231 lines)
|
||||
Version 10.25.10:Mar 01, 2011 Text "Class photo" or "List" is shown near icons in selection of type of users' listing. (100183 lines)
|
||||
Version 10.25.9: Mar 01, 2011 Acceptance of enrollment is set to true when importing students from official groups. (100164 lines)
|
||||
Version 10.25.9: Mar 01, 2011 Acceptance of enrolment is set to true when importing students from official groups. (100164 lines)
|
||||
Version 10.25.8: Feb 22, 2011 beginTime and eventTime are changed to long. Reported by Juan Miguel Boyero Corral. (100127 lines)
|
||||
Version 10.25.7: Feb 22, 2011 eventTime is changed from time_t to unsigned long. Reported by Juan Miguel Boyero Corral. (100126 lines)
|
||||
Version 10.25.6: Feb 22, 2011 Deleting a user removes her/him from connected and sessions tables. (100125 lines)
|
||||
|
@ -6489,7 +6493,7 @@ INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1051','es','N','Camb
|
|||
gsoap updated to version 2.8.1 (2011/01/14) (99111 lines)
|
||||
Version 10.20: Jan 24, 2011 Administrators options are moved to users tab.
|
||||
Degree tab is renamed as system tab.
|
||||
Users tab is splitted into two tabs: users and enrollment. (99030 lines)
|
||||
Users tab is splitted into two tabs: users and enrolment. (99030 lines)
|
||||
Version 10.19.1: Jan 23, 2011 Changes in option to view the connected users. (98898 lines)
|
||||
Version 10.19: Jan 23, 2011 New option to view the connected users. (98882 lines)
|
||||
Version 10.18: Jan 22, 2011 New option to change the rol of the logged user. (98788 lines)
|
||||
|
|
|
@ -477,7 +477,7 @@
|
|||
|
||||
#define Cfg_TIME_TO_DELETE_TEST_TMP_FILES ((time_t)( 2UL * 60UL * 60UL)) // Temporary files related to imported test questions after these seconds
|
||||
|
||||
#define Cfg_TIME_TO_DELETE_ENROLLMENT_REQUESTS ((time_t)(30UL * 24UL * 60UL * 60UL)) // Past these seconds, remove expired enrollment requests
|
||||
#define Cfg_TIME_TO_DELETE_ENROLMENT_REQUESTS ((time_t)(30UL * 24UL * 60UL * 60UL)) // Past these seconds, remove expired enrolment requests
|
||||
|
||||
#define Cfg_TIME_TO_DELETE_THREAD_CLIPBOARD ((time_t)( 15UL * 60UL)) // Threads older than these seconds are removed from clipboard
|
||||
|
||||
|
|
|
@ -198,7 +198,7 @@ void Cty_ShowConfiguration (void)
|
|||
{
|
||||
Cty_Configuration (false);
|
||||
|
||||
/***** Show help to enroll me *****/
|
||||
/***** Show help to enrol me *****/
|
||||
Hlp_ShowHelpWhatWouldYouLikeToDo ();
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include "swad_constant.h"
|
||||
#include "swad_database.h"
|
||||
#include "swad_degree.h"
|
||||
#include "swad_enrollment.h"
|
||||
#include "swad_enrolment.h"
|
||||
#include "swad_exam.h"
|
||||
#include "swad_global.h"
|
||||
#include "swad_help.h"
|
||||
|
@ -138,7 +138,7 @@ void Crs_ShowIntroduction (void)
|
|||
/***** Course introduction *****/
|
||||
Inf_ShowInfo ();
|
||||
|
||||
/***** Show help to enroll me *****/
|
||||
/***** Show help to enrol me *****/
|
||||
Hlp_ShowHelpWhatWouldYouLikeToDo ();
|
||||
}
|
||||
|
||||
|
@ -183,7 +183,7 @@ static void Crs_Configuration (bool PrintView)
|
|||
/***** Messages and links above the frame *****/
|
||||
if (!PrintView)
|
||||
{
|
||||
/* Link to request enrollment in the current course */
|
||||
/* Link to request enrolment in the current course */
|
||||
if (Gbl.Usrs.Me.LoggedRole == Rol__GUEST_ ||
|
||||
Gbl.Usrs.Me.LoggedRole == Rol_VISITOR)
|
||||
{
|
||||
|
@ -2888,8 +2888,8 @@ void Crs_ReqSelectOneOfMyCourses (void)
|
|||
if (Gbl.Usrs.Me.MyCrss.Num)
|
||||
/* Show my courses */
|
||||
Crs_WriteListMyCoursesToSelectOne ();
|
||||
else // I am not enrolled in any course
|
||||
/* Show help to enroll me */
|
||||
else // I am not enroled in any course
|
||||
/* Show help to enrol me */
|
||||
Hlp_ShowHelpWhatWouldYouLikeToDo ();
|
||||
}
|
||||
|
||||
|
@ -3148,8 +3148,8 @@ unsigned Crs_ListCrssFound (const char *Query)
|
|||
|
||||
static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnAccepted)
|
||||
{
|
||||
extern const char *Txt_Enrollment_confirmed;
|
||||
extern const char *Txt_Enrollment_not_confirmed;
|
||||
extern const char *Txt_Enrolment_confirmed;
|
||||
extern const char *Txt_Enrolment_not_confirmed;
|
||||
extern const char *Txt_Go_to_X;
|
||||
extern const char *Txt_YEAR_OF_DEGREE[1 + Deg_MAX_YEARS_PER_DEGREE];
|
||||
struct Degree Deg;
|
||||
|
@ -3215,10 +3215,10 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA
|
|||
Gbl.Prefs.IconsURL,
|
||||
Accepted ? "ok_on" :
|
||||
"tr",
|
||||
Accepted ? Txt_Enrollment_confirmed :
|
||||
Txt_Enrollment_not_confirmed,
|
||||
Accepted ? Txt_Enrollment_confirmed :
|
||||
Txt_Enrollment_not_confirmed);
|
||||
Accepted ? Txt_Enrolment_confirmed :
|
||||
Txt_Enrolment_not_confirmed,
|
||||
Accepted ? Txt_Enrolment_confirmed :
|
||||
Txt_Enrolment_not_confirmed);
|
||||
}
|
||||
|
||||
/***** Write number of course in this search *****/
|
||||
|
|
|
@ -253,7 +253,7 @@ void Deg_ShowConfiguration (void)
|
|||
{
|
||||
Deg_Configuration (false);
|
||||
|
||||
/***** Show help to enroll me *****/
|
||||
/***** Show help to enrol me *****/
|
||||
Hlp_ShowHelpWhatWouldYouLikeToDo ();
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "swad_account.h"
|
||||
#include "swad_database.h"
|
||||
#include "swad_duplicate.h"
|
||||
#include "swad_enrollment.h"
|
||||
#include "swad_enrolment.h"
|
||||
#include "swad_global.h"
|
||||
#include "swad_layout.h"
|
||||
#include "swad_profile.h"
|
||||
|
@ -459,7 +459,7 @@ void Dup_RemoveUsrFromDuplicated (long UsrCod)
|
|||
{
|
||||
char Query[128];
|
||||
|
||||
/***** Remove enrollment request *****/
|
||||
/***** Remove user from list of duplicated users *****/
|
||||
sprintf (Query,"DELETE FROM usr_duplicated WHERE UsrCod=%ld",
|
||||
UsrCod);
|
||||
DB_QueryDELETE (Query,"can not remove a user from possible duplicates");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// swad_enrollment.c: enrollment (registration) or removing of users
|
||||
// swad_enrolment.c: enrolment (registration) or removing of users
|
||||
|
||||
/*
|
||||
SWAD (Shared Workspace At a Distance),
|
||||
|
@ -32,7 +32,7 @@
|
|||
#include "swad_announcement.h"
|
||||
#include "swad_database.h"
|
||||
#include "swad_duplicate.h"
|
||||
#include "swad_enrollment.h"
|
||||
#include "swad_enrolment.h"
|
||||
#include "swad_global.h"
|
||||
#include "swad_ID.h"
|
||||
#include "swad_notification.h"
|
||||
|
@ -89,7 +89,7 @@ extern struct Globals Gbl;
|
|||
/***************************** Private prototypes ****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Enr_NotifyAfterEnrollment (struct UsrData *UsrDat,Rol_Role_t NewRole);
|
||||
static void Enr_NotifyAfterEnrolment (struct UsrData *UsrDat,Rol_Role_t NewRole);
|
||||
|
||||
static void Enr_ReqAdminUsrs (Rol_Role_t Role);
|
||||
static void Enr_ShowFormRegRemSeveralUsrs (Rol_Role_t Role);
|
||||
|
@ -104,10 +104,10 @@ static void Enr_RegisterUsr (struct UsrData *UsrDat,Rol_Role_t RegRemRole,
|
|||
|
||||
static void Enr_PutLinkToRemAllStdsThisCrs (void);
|
||||
|
||||
static void Enr_ShowEnrollmentRequestsGivenRoles (unsigned RolesSelected);
|
||||
static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected);
|
||||
|
||||
static void Enr_RemoveEnrollmentRequest (long CrsCod,long UsrCod);
|
||||
static void Enr_RemoveExpiredEnrollmentRequests (void);
|
||||
static void Enr_RemoveEnrolmentRequest (long CrsCod,long UsrCod);
|
||||
static void Enr_RemoveExpiredEnrolmentRequests (void);
|
||||
|
||||
static void Enr_ReqRegRemUsr (Rol_Role_t Role);
|
||||
static bool Enr_ICanAdminOtherUsrs (void);
|
||||
|
@ -136,14 +136,14 @@ static void Enr_EffectivelyRemAdm (struct UsrData *UsrDat,Sco_Scope_t Scope,
|
|||
long Cod,const char *InsCtrDegName);
|
||||
|
||||
/*****************************************************************************/
|
||||
/**************** Show form with button to enroll students *******************/
|
||||
/***************** Show form with button to enrol students *******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Enr_PutButtonToEnrollStudents (void)
|
||||
void Enr_PutButtonToEnrolStudents (void)
|
||||
{
|
||||
extern const char *Txt_Register_students;
|
||||
|
||||
/***** Form to enroll several students *****/
|
||||
/***** Form to enrol several students *****/
|
||||
if (Gbl.CurrentCrs.Crs.CrsCod > 0 && // Course selected
|
||||
Gbl.Usrs.Me.LoggedRole == Rol_TEACHER) // I am logged as teacher
|
||||
{
|
||||
|
@ -154,14 +154,14 @@ void Enr_PutButtonToEnrollStudents (void)
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**************** Show form with button to enroll teachers *******************/
|
||||
/**************** Show form with button to enrol teachers ********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Enr_PutButtonToEnrollOneTeacher (void)
|
||||
void Enr_PutButtonToEnrolOneTeacher (void)
|
||||
{
|
||||
extern const char *Txt_Register_teacher;
|
||||
|
||||
/***** Form to enroll several students *****/
|
||||
/***** Form to enrol several students *****/
|
||||
if (Gbl.CurrentCrs.Crs.CrsCod > 0 && // Course selected
|
||||
Gbl.Usrs.Me.LoggedRole >= Rol_DEG_ADM) // I am an administrator
|
||||
{
|
||||
|
@ -213,7 +213,7 @@ void Enr_ModifyRoleInCurrentCrs (struct UsrData *UsrDat,Rol_Role_t NewRole)
|
|||
/***** Create notification for this user.
|
||||
If this user wants to receive notifications by email,
|
||||
activate the sending of a notification *****/
|
||||
Enr_NotifyAfterEnrollment (UsrDat,NewRole);
|
||||
Enr_NotifyAfterEnrolment (UsrDat,NewRole);
|
||||
|
||||
UsrDat->RoleInCurrentCrsDB = NewRole;
|
||||
UsrDat->Roles = -1; // Force roles to be got from database
|
||||
|
@ -269,14 +269,14 @@ void Enr_RegisterUsrInCurrentCrs (struct UsrData *UsrDat,Rol_Role_t NewRole,
|
|||
/***** Create notification for this user.
|
||||
If this user wants to receive notifications by email,
|
||||
activate the sending of a notification *****/
|
||||
Enr_NotifyAfterEnrollment (UsrDat,NewRole);
|
||||
Enr_NotifyAfterEnrolment (UsrDat,NewRole);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********* Create notification after register user in current course *********/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Enr_NotifyAfterEnrollment (struct UsrData *UsrDat,Rol_Role_t NewRole)
|
||||
static void Enr_NotifyAfterEnrolment (struct UsrData *UsrDat,Rol_Role_t NewRole)
|
||||
{
|
||||
bool CreateNotif;
|
||||
bool NotifyByEmail;
|
||||
|
@ -286,22 +286,22 @@ static void Enr_NotifyAfterEnrollment (struct UsrData *UsrDat,Rol_Role_t NewRole
|
|||
switch (NewRole)
|
||||
{
|
||||
case Rol_STUDENT:
|
||||
NotifyEvent = Ntf_EVENT_ENROLLMENT_STUDENT;
|
||||
NotifyEvent = Ntf_EVENT_ENROLMENT_STUDENT;
|
||||
break;
|
||||
case Rol_TEACHER:
|
||||
NotifyEvent = Ntf_EVENT_ENROLLMENT_TEACHER;
|
||||
NotifyEvent = Ntf_EVENT_ENROLMENT_TEACHER;
|
||||
break;
|
||||
default:
|
||||
NotifyEvent = Ntf_EVENT_UNKNOWN;
|
||||
Lay_ShowErrorAndExit ("Wrong role.");
|
||||
}
|
||||
|
||||
/***** Remove possible enrollment request ******/
|
||||
Enr_RemoveEnrollmentRequest (Gbl.CurrentCrs.Crs.CrsCod,UsrDat->UsrCod);
|
||||
/***** Remove possible enrolment request ******/
|
||||
Enr_RemoveEnrolmentRequest (Gbl.CurrentCrs.Crs.CrsCod,UsrDat->UsrCod);
|
||||
|
||||
/***** Remove old enrollment notifications before inserting the new one ******/
|
||||
Ntf_MarkNotifToOneUsrAsRemoved (Ntf_EVENT_ENROLLMENT_STUDENT,-1,UsrDat->UsrCod);
|
||||
Ntf_MarkNotifToOneUsrAsRemoved (Ntf_EVENT_ENROLLMENT_TEACHER,-1,UsrDat->UsrCod);
|
||||
/***** Remove old enrolment notifications before inserting the new one ******/
|
||||
Ntf_MarkNotifToOneUsrAsRemoved (Ntf_EVENT_ENROLMENT_STUDENT,-1,UsrDat->UsrCod);
|
||||
Ntf_MarkNotifToOneUsrAsRemoved (Ntf_EVENT_ENROLMENT_TEACHER,-1,UsrDat->UsrCod);
|
||||
|
||||
/***** Create new notification ******/
|
||||
CreateNotif = (UsrDat->Prefs.NotifNtfEvents & (1 << NotifyEvent));
|
||||
|
@ -347,17 +347,17 @@ void Enr_WriteFormToReqAnotherUsrID (Act_Action_t NextAction)
|
|||
|
||||
void Enr_ReqAcceptRegisterInCrs (void)
|
||||
{
|
||||
extern const char *Txt_Enrollment;
|
||||
extern const char *Txt_A_teacher_or_administrator_has_enrolled_you_as_X_into_the_course_Y;
|
||||
extern const char *Txt_Enrolment;
|
||||
extern const char *Txt_A_teacher_or_administrator_has_enroled_you_as_X_into_the_course_Y;
|
||||
extern const char *Txt_ROLES_SINGUL_abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
||||
extern const char *Txt_Confirm_my_enrollment;
|
||||
extern const char *Txt_Confirm_my_enrolment;
|
||||
extern const char *Txt_Remove_me_from_this_course;
|
||||
|
||||
/***** Start frame *****/
|
||||
Lay_StartRoundFrame (NULL,Txt_Enrollment,NULL,NULL);
|
||||
Lay_StartRoundFrame (NULL,Txt_Enrolment,NULL,NULL);
|
||||
|
||||
/***** Show message *****/
|
||||
sprintf (Gbl.Message,Txt_A_teacher_or_administrator_has_enrolled_you_as_X_into_the_course_Y,
|
||||
sprintf (Gbl.Message,Txt_A_teacher_or_administrator_has_enroled_you_as_X_into_the_course_Y,
|
||||
Txt_ROLES_SINGUL_abc[Gbl.Usrs.Me.UsrDat.RoleInCurrentCrsDB][Gbl.Usrs.Me.UsrDat.Sex],
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Message);
|
||||
|
@ -365,7 +365,7 @@ void Enr_ReqAcceptRegisterInCrs (void)
|
|||
/***** Send button to accept register in the current course *****/
|
||||
Act_FormStart (Gbl.Usrs.Me.UsrDat.RoleInCurrentCrsDB == Rol_STUDENT ? ActAccEnrStd :
|
||||
ActAccEnrTch);
|
||||
Lay_PutCreateButtonInline (Txt_Confirm_my_enrollment);
|
||||
Lay_PutCreateButtonInline (Txt_Confirm_my_enrolment);
|
||||
Act_FormEnd ();
|
||||
|
||||
/***** Send button to refuse register in the current course *****/
|
||||
|
@ -378,18 +378,18 @@ void Enr_ReqAcceptRegisterInCrs (void)
|
|||
Lay_EndRoundFrame ();
|
||||
|
||||
/***** Mark possible notification as seen *****/
|
||||
Ntf_MarkNotifAsSeen (Gbl.Usrs.Me.UsrDat.RoleInCurrentCrsDB == Rol_STUDENT ? Ntf_EVENT_ENROLLMENT_STUDENT :
|
||||
Ntf_EVENT_ENROLLMENT_TEACHER,
|
||||
Ntf_MarkNotifAsSeen (Gbl.Usrs.Me.UsrDat.RoleInCurrentCrsDB == Rol_STUDENT ? Ntf_EVENT_ENROLMENT_STUDENT :
|
||||
Ntf_EVENT_ENROLMENT_TEACHER,
|
||||
-1L,Gbl.CurrentCrs.Crs.CrsCod,
|
||||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************** Put an enrollment into a notification ********************/
|
||||
/****************** Put an enrolment into a notification ********************/
|
||||
/*****************************************************************************/
|
||||
// This function may be called inside a web service, so don't report error
|
||||
|
||||
void Enr_GetNotifEnrollment (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
|
||||
void Enr_GetNotifEnrolment (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
|
||||
long CrsCod,long UsrCod)
|
||||
{
|
||||
extern const char *Txt_ROLES_SINGUL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
||||
|
@ -588,7 +588,7 @@ static void Enr_ShowFormRegRemSeveralUsrs (Rol_Role_t Role)
|
|||
extern const char *Txt_Step_3_Optionally_select_groups;
|
||||
extern const char *Txt_Select_the_groups_in_from_which_you_want_to_register_remove_users_;
|
||||
extern const char *Txt_No_groups_have_been_created_in_the_course_X_Therefore_;
|
||||
extern const char *Txt_Step_4_Confirm_the_enrollment_removing;
|
||||
extern const char *Txt_Step_4_Confirm_the_enrolment_removing;
|
||||
extern const char *Txt_Confirm;
|
||||
|
||||
/***** Put contextual links *****/
|
||||
|
@ -604,7 +604,7 @@ static void Enr_ShowFormRegRemSeveralUsrs (Rol_Role_t Role)
|
|||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
|
||||
/***** Form to send students to be enrolled / removed *****/
|
||||
/***** Form to send students to be enroled / removed *****/
|
||||
Act_FormStart (Role == Rol_STUDENT ? ActRcvFrmEnrSevStd :
|
||||
ActRcvFrmEnrSevTch);
|
||||
|
||||
|
@ -615,7 +615,7 @@ static void Enr_ShowFormRegRemSeveralUsrs (Rol_Role_t Role)
|
|||
NULL,
|
||||
Hlp_USERS_Administration_administer_multiple_users);
|
||||
|
||||
/***** Step 1: List of students to be enrolled / removed *****/
|
||||
/***** Step 1: List of students to be enroled / removed *****/
|
||||
fprintf (Gbl.F.Out,"<div class=\"%s LEFT_MIDDLE\">"
|
||||
"%s"
|
||||
"</div>",
|
||||
|
@ -660,7 +660,7 @@ static void Enr_ShowFormRegRemSeveralUsrs (Rol_Role_t Role)
|
|||
"%s"
|
||||
"</div>",
|
||||
The_ClassTitle[Gbl.Prefs.Theme],
|
||||
Txt_Step_4_Confirm_the_enrollment_removing);
|
||||
Txt_Step_4_Confirm_the_enrolment_removing);
|
||||
Pwd_AskForConfirmationOnDangerousAction ();
|
||||
|
||||
/***** Send button and end frame *****/
|
||||
|
@ -693,8 +693,8 @@ void Enr_AskRemoveOldUsrs (void)
|
|||
{
|
||||
extern const char *The_ClassForm[The_NUM_THEMES];
|
||||
extern const char *Txt_Eliminate_old_users;
|
||||
extern const char *Txt_Eliminate_all_users_who_are_not_enrolled_on_any_courses_PART_1_OF_2;
|
||||
extern const char *Txt_Eliminate_all_users_who_are_not_enrolled_on_any_courses_PART_2_OF_2;
|
||||
extern const char *Txt_Eliminate_all_users_who_are_not_enroled_on_any_courses_PART_1_OF_2;
|
||||
extern const char *Txt_Eliminate_all_users_who_are_not_enroled_on_any_courses_PART_2_OF_2;
|
||||
extern const char *Txt_Eliminate;
|
||||
unsigned Months;
|
||||
|
||||
|
@ -707,7 +707,7 @@ void Enr_AskRemoveOldUsrs (void)
|
|||
/***** Form to request number of months without clicks *****/
|
||||
fprintf (Gbl.F.Out,"<label class=\"%s\">%s ",
|
||||
The_ClassForm[Gbl.Prefs.Theme],
|
||||
Txt_Eliminate_all_users_who_are_not_enrolled_on_any_courses_PART_1_OF_2);
|
||||
Txt_Eliminate_all_users_who_are_not_enroled_on_any_courses_PART_1_OF_2);
|
||||
fprintf (Gbl.F.Out,"<select name=\"Months\">");
|
||||
for (Months = Usr_MIN_MONTHS_WITHOUT_ACCESS_TO_REMOVE_OLD_USRS;
|
||||
Months <= Usr_MAX_MONTHS_WITHOUT_ACCESS_TO_REMOVE_OLD_USRS;
|
||||
|
@ -719,7 +719,7 @@ void Enr_AskRemoveOldUsrs (void)
|
|||
fprintf (Gbl.F.Out,">%u</option>",Months);
|
||||
}
|
||||
fprintf (Gbl.F.Out,"</select> ");
|
||||
fprintf (Gbl.F.Out,Txt_Eliminate_all_users_who_are_not_enrolled_on_any_courses_PART_2_OF_2,
|
||||
fprintf (Gbl.F.Out,Txt_Eliminate_all_users_who_are_not_enroled_on_any_courses_PART_2_OF_2,
|
||||
Cfg_PLATFORM_SHORT_NAME);
|
||||
fprintf (Gbl.F.Out,"</label>");
|
||||
|
||||
|
@ -736,7 +736,7 @@ void Enr_AskRemoveOldUsrs (void)
|
|||
|
||||
void Enr_RemoveOldUsrs (void)
|
||||
{
|
||||
extern const char *Txt_Eliminating_X_users_who_were_not_enrolled_in_any_course_and_with_more_than_Y_months_without_access_to_Z;
|
||||
extern const char *Txt_Eliminating_X_users_who_were_not_enroled_in_any_course_and_with_more_than_Y_months_without_access_to_Z;
|
||||
extern const char *Txt_X_users_have_been_eliminated;
|
||||
unsigned MonthsWithoutAccess;
|
||||
time_t SecondsWithoutAccess;
|
||||
|
@ -771,7 +771,7 @@ void Enr_RemoveOldUsrs (void)
|
|||
(unsigned long) SecondsWithoutAccess);
|
||||
if ((NumUsrs = DB_QuerySELECT (Query,&mysql_res,"can not get old users")))
|
||||
{
|
||||
sprintf (Gbl.Message,Txt_Eliminating_X_users_who_were_not_enrolled_in_any_course_and_with_more_than_Y_months_without_access_to_Z,
|
||||
sprintf (Gbl.Message,Txt_Eliminating_X_users_who_were_not_enroled_in_any_course_and_with_more_than_Y_months_without_access_to_Z,
|
||||
NumUsrs,
|
||||
MonthsWithoutAccess,
|
||||
Cfg_PLATFORM_SHORT_NAME);
|
||||
|
@ -811,7 +811,7 @@ void Enr_RemoveOldUsrs (void)
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/***** Put text area to enter/paste IDs of users to be enrolled/removed ******/
|
||||
/***** Put text area to enter/paste IDs of users to be enroled/removed ******/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Enr_PutAreaToEnterUsrsIDs (void)
|
||||
|
@ -1262,16 +1262,16 @@ void Enr_ReceiveFormAdminTchs (void)
|
|||
|
||||
static void Enr_ReceiveFormUsrsCrs (Rol_Role_t Role)
|
||||
{
|
||||
extern const char *Txt_In_a_type_of_group_with_single_enrollment_students_can_not_be_registered_in_more_than_one_group;
|
||||
extern const char *Txt_In_a_type_of_group_with_single_enrolment_students_can_not_be_registered_in_more_than_one_group;
|
||||
extern const char *Txt_No_user_has_been_eliminated;
|
||||
extern const char *Txt_One_user_has_been_eliminated;
|
||||
extern const char *Txt_No_user_has_been_removed;
|
||||
extern const char *Txt_One_user_has_been_removed;
|
||||
extern const char *Txt_X_users_have_been_eliminated;
|
||||
extern const char *Txt_X_users_have_been_removed;
|
||||
extern const char *Txt_No_user_has_been_enrolled;
|
||||
extern const char *Txt_One_user_has_been_enrolled;
|
||||
extern const char *Txt_X_users_have_been_enrolled_including_possible_repetitions;
|
||||
extern const char *Txt_No_user_has_been_enroled;
|
||||
extern const char *Txt_One_user_has_been_enroled;
|
||||
extern const char *Txt_X_users_have_been_enroled_including_possible_repetitions;
|
||||
struct
|
||||
{
|
||||
bool RemoveUsrs;
|
||||
|
@ -1380,11 +1380,11 @@ static void Enr_ReceiveFormUsrsCrs (Rol_Role_t Role)
|
|||
if (WhatToDo.RegisterUsrs &&
|
||||
Role == Rol_STUDENT &&
|
||||
LstGrps.NumGrps >= 2)
|
||||
/* Check if I have selected more than one group of single enrollment */
|
||||
/* Check if I have selected more than one group of single enrolment */
|
||||
if (!Grp_CheckIfSelectionGrpsIsValid (&LstGrps))
|
||||
{
|
||||
/* Show warning message and exit */
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_In_a_type_of_group_with_single_enrollment_students_can_not_be_registered_in_more_than_one_group);
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_In_a_type_of_group_with_single_enrolment_students_can_not_be_registered_in_more_than_one_group);
|
||||
|
||||
/* Free memory used by lists of groups and abort */
|
||||
Grp_FreeListCodGrp (&LstGrps);
|
||||
|
@ -1614,7 +1614,7 @@ static void Enr_ReceiveFormUsrsCrs (Rol_Role_t Role)
|
|||
/***** Move unused contents of messages to table of deleted contents of messages *****/
|
||||
Msg_MoveUnusedMsgsContentToDeleted ();
|
||||
|
||||
/***** Write messages with the number of users enrolled/removed *****/
|
||||
/***** Write messages with the number of users enroled/removed *****/
|
||||
if (WhatToDo.RemoveUsrs)
|
||||
{
|
||||
if (WhatToDo.EliminateUsrs) // Eliminate completely from the platform
|
||||
|
@ -1652,13 +1652,13 @@ static void Enr_ReceiveFormUsrsCrs (Rol_Role_t Role)
|
|||
switch (NumUsrsRegistered)
|
||||
{
|
||||
case 0:
|
||||
Lay_ShowAlert (Lay_INFO,Txt_No_user_has_been_enrolled);
|
||||
Lay_ShowAlert (Lay_INFO,Txt_No_user_has_been_enroled);
|
||||
break;
|
||||
case 1:
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_One_user_has_been_enrolled);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_One_user_has_been_enroled);
|
||||
break;
|
||||
default:
|
||||
sprintf (Gbl.Message,Txt_X_users_have_been_enrolled_including_possible_repetitions,
|
||||
sprintf (Gbl.Message,Txt_X_users_have_been_enroled_including_possible_repetitions,
|
||||
NumUsrsRegistered);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
|
||||
break;
|
||||
|
@ -1837,13 +1837,13 @@ unsigned Enr_RemAllStdsInCrs (struct Course *Crs)
|
|||
|
||||
void Enr_ReqSignUpInCrs (void)
|
||||
{
|
||||
extern const char *Txt_You_were_already_enrolled_as_X_in_the_course_Y;
|
||||
extern const char *Txt_You_were_already_enroled_as_X_in_the_course_Y;
|
||||
extern const char *Txt_ROLES_SINGUL_abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
||||
|
||||
/***** Check if I already belong to course *****/
|
||||
if (Gbl.Usrs.Me.UsrDat.RoleInCurrentCrsDB >= Rol_STUDENT)
|
||||
{
|
||||
sprintf (Gbl.Message,Txt_You_were_already_enrolled_as_X_in_the_course_Y,
|
||||
sprintf (Gbl.Message,Txt_You_were_already_enroled_as_X_in_the_course_Y,
|
||||
Txt_ROLES_SINGUL_abc[Gbl.Usrs.Me.UsrDat.RoleInCurrentCrsDB][Gbl.Usrs.Me.UsrDat.Sex],
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Message);
|
||||
|
@ -1862,9 +1862,9 @@ void Enr_ReqSignUpInCrs (void)
|
|||
|
||||
void Enr_SignUpInCrs (void)
|
||||
{
|
||||
extern const char *Txt_You_were_already_enrolled_as_X_in_the_course_Y;
|
||||
extern const char *Txt_You_were_already_enroled_as_X_in_the_course_Y;
|
||||
extern const char *Txt_ROLES_SINGUL_abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
||||
extern const char *Txt_Your_request_for_enrollment_as_X_in_the_course_Y_has_been_accepted_for_processing;
|
||||
extern const char *Txt_Your_request_for_enrolment_as_X_in_the_course_Y_has_been_accepted_for_processing;
|
||||
char Query[512];
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
|
@ -1875,7 +1875,7 @@ void Enr_SignUpInCrs (void)
|
|||
/***** Check if I already belong to course *****/
|
||||
if (Gbl.Usrs.Me.UsrDat.RoleInCurrentCrsDB >= Rol_STUDENT)
|
||||
{
|
||||
sprintf (Gbl.Message,Txt_You_were_already_enrolled_as_X_in_the_course_Y,
|
||||
sprintf (Gbl.Message,Txt_You_were_already_enroled_as_X_in_the_course_Y,
|
||||
Txt_ROLES_SINGUL_abc[Gbl.Usrs.Me.UsrDat.RoleInCurrentCrsDB][Gbl.Usrs.Me.UsrDat.Sex],
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Message);
|
||||
|
@ -1899,7 +1899,7 @@ void Enr_SignUpInCrs (void)
|
|||
" WHERE CrsCod=%ld AND UsrCod=%ld",
|
||||
Gbl.CurrentCrs.Crs.CrsCod,
|
||||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
if (DB_QuerySELECT (Query,&mysql_res,"can not get enrollment request"))
|
||||
if (DB_QuerySELECT (Query,&mysql_res,"can not get enrolment request"))
|
||||
{
|
||||
row = mysql_fetch_row (mysql_res);
|
||||
/* Get request code (row[0]) */
|
||||
|
@ -1917,7 +1917,7 @@ void Enr_SignUpInCrs (void)
|
|||
ReqCod,
|
||||
Gbl.CurrentCrs.Crs.CrsCod,
|
||||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
DB_QueryUPDATE (Query,"can not update enrollment request");
|
||||
DB_QueryUPDATE (Query,"can not update enrolment request");
|
||||
}
|
||||
else // No request in database for this user in this course
|
||||
{
|
||||
|
@ -1928,32 +1928,32 @@ void Enr_SignUpInCrs (void)
|
|||
Gbl.CurrentCrs.Crs.CrsCod,
|
||||
Gbl.Usrs.Me.UsrDat.UsrCod,
|
||||
(unsigned) RoleFromForm);
|
||||
ReqCod = DB_QueryINSERTandReturnCode (Query,"can not save enrollment request");
|
||||
ReqCod = DB_QueryINSERTandReturnCode (Query,"can not save enrolment request");
|
||||
}
|
||||
|
||||
/***** Show confirmation message *****/
|
||||
sprintf (Gbl.Message,Txt_Your_request_for_enrollment_as_X_in_the_course_Y_has_been_accepted_for_processing,
|
||||
sprintf (Gbl.Message,Txt_Your_request_for_enrolment_as_X_in_the_course_Y_has_been_accepted_for_processing,
|
||||
Txt_ROLES_SINGUL_abc[RoleFromForm][Gbl.Usrs.Me.UsrDat.Sex],
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
|
||||
|
||||
/***** Notify teachers or admins by email about the new enrollment request *****/
|
||||
/***** Notify teachers or admins by email about the new enrolment request *****/
|
||||
// If this course has teachers ==> send notification to teachers
|
||||
// If this course has no teachers and I want to be a teacher ==> send notification to administrators or superusers
|
||||
if (Gbl.CurrentCrs.Crs.NumTchs || RoleFromForm == Rol_TEACHER)
|
||||
{
|
||||
NumUsrsToBeNotifiedByEMail = Ntf_StoreNotifyEventsToAllUsrs (Ntf_EVENT_ENROLLMENT_REQUEST,ReqCod);
|
||||
NumUsrsToBeNotifiedByEMail = Ntf_StoreNotifyEventsToAllUsrs (Ntf_EVENT_ENROLMENT_REQUEST,ReqCod);
|
||||
Ntf_ShowAlertNumUsrsToBeNotifiedByEMail (NumUsrsToBeNotifiedByEMail);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************** Put an enrollment request into a notification *****************/
|
||||
/************** Put an enrolment request into a notification *****************/
|
||||
/*****************************************************************************/
|
||||
// This function may be called inside a web service, so don't report error
|
||||
|
||||
void Enr_GetNotifEnrollmentRequest (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
|
||||
void Enr_GetNotifEnrolmentRequest (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
|
||||
char **ContentStr,
|
||||
long ReqCod,bool GetContent)
|
||||
{
|
||||
|
@ -2008,13 +2008,13 @@ void Enr_GetNotifEnrollmentRequest (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****** Ask if reject the request for enrollment of a user in a course *******/
|
||||
/****** Ask if reject the request for enrolment of a user in a course *******/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Enr_AskIfRejectSignUp (void)
|
||||
{
|
||||
extern const char *Txt_THE_USER_X_is_already_enrolled_in_the_course_Y;
|
||||
extern const char *Txt_Do_you_really_want_to_reject_the_enrollment_request_;
|
||||
extern const char *Txt_THE_USER_X_is_already_enroled_in_the_course_Y;
|
||||
extern const char *Txt_Do_you_really_want_to_reject_the_enrolment_request_;
|
||||
extern const char *Txt_ROLES_SINGUL_abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
||||
extern const char *Txt_Reject;
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
|
@ -2031,13 +2031,13 @@ void Enr_AskIfRejectSignUp (void)
|
|||
false))
|
||||
{
|
||||
/* User already belongs to this course */
|
||||
sprintf (Gbl.Message,Txt_THE_USER_X_is_already_enrolled_in_the_course_Y,
|
||||
sprintf (Gbl.Message,Txt_THE_USER_X_is_already_enroled_in_the_course_Y,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,Gbl.CurrentCrs.Crs.FullName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Message);
|
||||
Rec_ShowSharedRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat);
|
||||
|
||||
/* Remove inscription request because it has not sense */
|
||||
Enr_RemoveEnrollmentRequest (Gbl.CurrentCrs.Crs.CrsCod,Gbl.Usrs.Other.UsrDat.UsrCod);
|
||||
Enr_RemoveEnrolmentRequest (Gbl.CurrentCrs.Crs.CrsCod,Gbl.Usrs.Other.UsrDat.UsrCod);
|
||||
}
|
||||
else // User does not belong to this course
|
||||
{
|
||||
|
@ -2046,7 +2046,7 @@ void Enr_AskIfRejectSignUp (void)
|
|||
Role == Rol_TEACHER)
|
||||
{
|
||||
/* Ask if reject */
|
||||
sprintf (Gbl.Message,Txt_Do_you_really_want_to_reject_the_enrollment_request_,
|
||||
sprintf (Gbl.Message,Txt_Do_you_really_want_to_reject_the_enrolment_request_,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,
|
||||
Txt_ROLES_SINGUL_abc[Role][Gbl.Usrs.Other.UsrDat.Sex],
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
|
@ -2069,13 +2069,13 @@ void Enr_AskIfRejectSignUp (void)
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********* Reject the request for enrollment of a user in a course ***********/
|
||||
/********* Reject the request for enrolment of a user in a course ***********/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Enr_RejectSignUp (void)
|
||||
{
|
||||
extern const char *Txt_THE_USER_X_is_already_enrolled_in_the_course_Y;
|
||||
extern const char *Txt_Enrollment_of_X_rejected;
|
||||
extern const char *Txt_THE_USER_X_is_already_enroled_in_the_course_Y;
|
||||
extern const char *Txt_Enrolment_of_X_rejected;
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
|
||||
/***** Get user's code *****/
|
||||
|
@ -2088,17 +2088,17 @@ void Enr_RejectSignUp (void)
|
|||
false))
|
||||
{
|
||||
/* User already belongs to this course */
|
||||
sprintf (Gbl.Message,Txt_THE_USER_X_is_already_enrolled_in_the_course_Y,
|
||||
sprintf (Gbl.Message,Txt_THE_USER_X_is_already_enroled_in_the_course_Y,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,Gbl.CurrentCrs.Crs.FullName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Message);
|
||||
Rec_ShowSharedRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat);
|
||||
}
|
||||
|
||||
/* Remove inscription request */
|
||||
Enr_RemoveEnrollmentRequest (Gbl.CurrentCrs.Crs.CrsCod,Gbl.Usrs.Other.UsrDat.UsrCod);
|
||||
Enr_RemoveEnrolmentRequest (Gbl.CurrentCrs.Crs.CrsCod,Gbl.Usrs.Other.UsrDat.UsrCod);
|
||||
|
||||
/* Confirmation message */
|
||||
sprintf (Gbl.Message,Txt_Enrollment_of_X_rejected,
|
||||
sprintf (Gbl.Message,Txt_Enrolment_of_X_rejected,
|
||||
Gbl.Usrs.Other.UsrDat.FullName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
|
||||
}
|
||||
|
@ -2106,27 +2106,27 @@ void Enr_RejectSignUp (void)
|
|||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
|
||||
/* Show again the rest of registrarion requests */
|
||||
Enr_ShowEnrollmentRequests ();
|
||||
Enr_ShowEnrolmentRequests ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******** Show pending requests for enrollment in the current course *********/
|
||||
/******** Show pending requests for enrolment in the current course *********/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Enr_ShowEnrollmentRequests (void)
|
||||
void Enr_ShowEnrolmentRequests (void)
|
||||
{
|
||||
/***** Show enrollment request (default roles depend on my logged role) *****/
|
||||
/***** Show enrolment request (default roles depend on my logged role) *****/
|
||||
switch (Gbl.Usrs.Me.LoggedRole)
|
||||
{
|
||||
case Rol_TEACHER:
|
||||
Enr_ShowEnrollmentRequestsGivenRoles ((1 << Rol_STUDENT) |
|
||||
Enr_ShowEnrolmentRequestsGivenRoles ((1 << Rol_STUDENT) |
|
||||
(1 << Rol_TEACHER));
|
||||
break;
|
||||
case Rol_DEG_ADM:
|
||||
case Rol_CTR_ADM:
|
||||
case Rol_INS_ADM:
|
||||
case Rol_SYS_ADM:
|
||||
Enr_ShowEnrollmentRequestsGivenRoles (1 << Rol_TEACHER);
|
||||
Enr_ShowEnrolmentRequestsGivenRoles (1 << Rol_TEACHER);
|
||||
break;
|
||||
default:
|
||||
Lay_ShowErrorAndExit ("You don't have permission to list requesters.");
|
||||
|
@ -2135,30 +2135,30 @@ void Enr_ShowEnrollmentRequests (void)
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******* Update pending requests for enrollment in the current course ********/
|
||||
/******* Update pending requests for enrolment in the current course ********/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Enr_UpdateEnrollmentRequests (void)
|
||||
void Enr_UpdateEnrolmentRequests (void)
|
||||
{
|
||||
unsigned RolesSelected;
|
||||
|
||||
/***** Get selected roles *****/
|
||||
RolesSelected = Rol_GetSelectedRoles ();
|
||||
|
||||
/***** Update enrollment requests *****/
|
||||
Enr_ShowEnrollmentRequestsGivenRoles (RolesSelected);
|
||||
/***** Update enrolment requests *****/
|
||||
Enr_ShowEnrolmentRequestsGivenRoles (RolesSelected);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************* Show pending requests for enrollment given roles **************/
|
||||
/************* Show pending requests for enrolment given roles **************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Enr_ShowEnrollmentRequestsGivenRoles (unsigned RolesSelected)
|
||||
static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected)
|
||||
{
|
||||
extern const char *Hlp_USERS_Requests;
|
||||
extern const char *Sco_ScopeDB[Sco_NUM_SCOPES];
|
||||
extern const char *The_ClassForm[The_NUM_THEMES];
|
||||
extern const char *Txt_Enrollment_requests;
|
||||
extern const char *Txt_Enrolment_requests;
|
||||
extern const char *Txt_Scope;
|
||||
extern const char *Txt_Users;
|
||||
extern const char *Txt_Course;
|
||||
|
@ -2170,7 +2170,7 @@ static void Enr_ShowEnrollmentRequestsGivenRoles (unsigned RolesSelected)
|
|||
extern const char *Txt_ROLES_SINGUL_abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
||||
extern const char *Txt_Register;
|
||||
extern const char *Txt_Reject;
|
||||
extern const char *Txt_No_enrollment_requests;
|
||||
extern const char *Txt_No_enrolment_requests;
|
||||
char Query[1024];
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
|
@ -2186,8 +2186,8 @@ static void Enr_ShowEnrollmentRequestsGivenRoles (unsigned RolesSelected)
|
|||
char PhotoURL[PATH_MAX + 1];
|
||||
Rol_Role_t DesiredRole;
|
||||
|
||||
/***** Remove expired enrollment requests *****/
|
||||
Enr_RemoveExpiredEnrollmentRequests ();
|
||||
/***** Remove expired enrolment requests *****/
|
||||
Enr_RemoveExpiredEnrolmentRequests ();
|
||||
|
||||
/***** Get scope *****/
|
||||
Gbl.Scope.Allowed = 1 << Sco_SCOPE_SYS |
|
||||
|
@ -2200,7 +2200,7 @@ static void Enr_ShowEnrollmentRequestsGivenRoles (unsigned RolesSelected)
|
|||
Sco_GetScope ("ScopeEnr");
|
||||
|
||||
/***** Start frame *****/
|
||||
Lay_StartRoundFrame ("100%",Txt_Enrollment_requests,NULL,Hlp_USERS_Requests);
|
||||
Lay_StartRoundFrame ("100%",Txt_Enrolment_requests,NULL,Hlp_USERS_Requests);
|
||||
|
||||
/***** Selection of scope and roles *****/
|
||||
/* Start form */
|
||||
|
@ -2667,7 +2667,7 @@ static void Enr_ShowEnrollmentRequestsGivenRoles (unsigned RolesSelected)
|
|||
break;
|
||||
}
|
||||
|
||||
NumRequests = (unsigned) DB_QuerySELECT (Query,&mysql_res,"can not get requests for enrollment");
|
||||
NumRequests = (unsigned) DB_QuerySELECT (Query,&mysql_res,"can not get requests for enrolment");
|
||||
|
||||
/***** List requests *****/
|
||||
if (NumRequests)
|
||||
|
@ -2809,12 +2809,12 @@ static void Enr_ShowEnrollmentRequestsGivenRoles (unsigned RolesSelected)
|
|||
"</tr>");
|
||||
|
||||
/***** Mark possible notification as seen *****/
|
||||
Ntf_MarkNotifAsSeen (Ntf_EVENT_ENROLLMENT_REQUEST,
|
||||
Ntf_MarkNotifAsSeen (Ntf_EVENT_ENROLMENT_REQUEST,
|
||||
ReqCod,Gbl.CurrentCrs.Crs.CrsCod,
|
||||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
}
|
||||
else // User does not exists or user already belongs to course ==> remove pair from crs_usr_requests table
|
||||
Enr_RemoveEnrollmentRequest (Crs.CrsCod,UsrDat.UsrCod);
|
||||
Enr_RemoveEnrolmentRequest (Crs.CrsCod,UsrDat.UsrCod);
|
||||
}
|
||||
|
||||
/* End table */
|
||||
|
@ -2824,17 +2824,17 @@ static void Enr_ShowEnrollmentRequestsGivenRoles (unsigned RolesSelected)
|
|||
Usr_UsrDataDestructor (&UsrDat);
|
||||
}
|
||||
else // There are no requests
|
||||
Lay_ShowAlert (Lay_INFO,Txt_No_enrollment_requests);
|
||||
Lay_ShowAlert (Lay_INFO,Txt_No_enrolment_requests);
|
||||
|
||||
/***** End frame *****/
|
||||
Lay_EndRoundFrame ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********************* Remove a request for enrollment ***********************/
|
||||
/********************* Remove a request for enrolment ***********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Enr_RemoveEnrollmentRequest (long CrsCod,long UsrCod)
|
||||
static void Enr_RemoveEnrolmentRequest (long CrsCod,long UsrCod)
|
||||
{
|
||||
char Query[256];
|
||||
MYSQL_RES *mysql_res;
|
||||
|
@ -2854,23 +2854,23 @@ static void Enr_RemoveEnrollmentRequest (long CrsCod,long UsrCod)
|
|||
ReqCod = Str_ConvertStrCodToLongCod (row[0]);
|
||||
|
||||
/* Mark possible notifications as removed */
|
||||
Ntf_MarkNotifAsRemoved (Ntf_EVENT_ENROLLMENT_REQUEST,ReqCod);
|
||||
Ntf_MarkNotifAsRemoved (Ntf_EVENT_ENROLMENT_REQUEST,ReqCod);
|
||||
}
|
||||
/* Free structure that stores the query result */
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
|
||||
/***** Remove enrollment request *****/
|
||||
/***** Remove enrolment request *****/
|
||||
sprintf (Query,"DELETE FROM crs_usr_requests"
|
||||
" WHERE CrsCod=%ld AND UsrCod=%ld",
|
||||
CrsCod,UsrCod);
|
||||
DB_QueryDELETE (Query,"can not remove a request for enrollment");
|
||||
DB_QueryDELETE (Query,"can not remove a request for enrolment");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************* Remove expired requests for enrollment ******************/
|
||||
/******************* Remove expired requests for enrolment ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Enr_RemoveExpiredEnrollmentRequests (void)
|
||||
static void Enr_RemoveExpiredEnrolmentRequests (void)
|
||||
{
|
||||
char Query[512];
|
||||
|
||||
|
@ -2882,15 +2882,15 @@ static void Enr_RemoveExpiredEnrollmentRequests (void)
|
|||
" AND notif.Cod=crs_usr_requests.ReqCod"
|
||||
" AND crs_usr_requests.RequestTime<FROM_UNIXTIME(UNIX_TIMESTAMP()-'%lu')",
|
||||
(unsigned) Ntf_STATUS_BIT_REMOVED,
|
||||
(unsigned) Ntf_EVENT_ENROLLMENT_REQUEST,
|
||||
Cfg_TIME_TO_DELETE_ENROLLMENT_REQUESTS);
|
||||
(unsigned) Ntf_EVENT_ENROLMENT_REQUEST,
|
||||
Cfg_TIME_TO_DELETE_ENROLMENT_REQUESTS);
|
||||
DB_QueryUPDATE (Query,"can not set notification(s) as removed");
|
||||
|
||||
/***** Remove expired requests for enrollment *****/
|
||||
/***** Remove expired requests for enrolment *****/
|
||||
sprintf (Query,"DELETE FROM crs_usr_requests"
|
||||
" WHERE RequestTime<FROM_UNIXTIME(UNIX_TIMESTAMP()-'%lu')",
|
||||
Cfg_TIME_TO_DELETE_ENROLLMENT_REQUESTS);
|
||||
DB_QueryDELETE (Query,"can not remove expired requests for enrollment");
|
||||
Cfg_TIME_TO_DELETE_ENROLMENT_REQUESTS);
|
||||
DB_QueryDELETE (Query,"can not remove expired requests for enrolment");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -3048,14 +3048,14 @@ static void Enr_AskIfRegRemAnotherUsr (Rol_Role_t Role)
|
|||
if (Gbl.Usrs.Other.UsrDat.UsrCod > 0)
|
||||
{
|
||||
/***** If UsrCod is present in parameters,
|
||||
use this parameter to identify the user to be enrolled / removed *****/
|
||||
use this parameter to identify the user to be enroled / removed *****/
|
||||
ListUsrCods.NumUsrs = 1;
|
||||
Usr_AllocateListUsrCods (&ListUsrCods);
|
||||
ListUsrCods.Lst[0] = Gbl.Usrs.Other.UsrDat.UsrCod;
|
||||
}
|
||||
else // Parameter with user code not present
|
||||
/***** If UsrCod is not present in parameters from form,
|
||||
use user's ID to identify the user to be enrolled /removed *****/
|
||||
use user's ID to identify the user to be enroled /removed *****/
|
||||
Usr_GetParamOtherUsrIDNickOrEMailAndGetUsrCods (&ListUsrCods);
|
||||
|
||||
Enr_AskIfRegRemUsr (&ListUsrCods,Role);
|
||||
|
@ -3068,9 +3068,9 @@ static void Enr_AskIfRegRemAnotherUsr (Rol_Role_t Role)
|
|||
static void Enr_AskIfRegRemUsr (struct ListUsrCods *ListUsrCods,Rol_Role_t Role)
|
||||
{
|
||||
extern const char *Txt_There_are_X_users_with_the_ID_Y;
|
||||
extern const char *Txt_THE_USER_X_is_already_enrolled_in_the_course_Y;
|
||||
extern const char *Txt_THE_USER_X_is_already_in_the_course_Y_but_has_not_yet_accepted_the_enrollment;
|
||||
extern const char *Txt_THE_USER_X_already_exists_in_Y_but_is_not_yet_enrolled_in_the_course_Z;
|
||||
extern const char *Txt_THE_USER_X_is_already_enroled_in_the_course_Y;
|
||||
extern const char *Txt_THE_USER_X_is_already_in_the_course_Y_but_has_not_yet_accepted_the_enrolment;
|
||||
extern const char *Txt_THE_USER_X_already_exists_in_Y_but_is_not_yet_enroled_in_the_course_Z;
|
||||
extern const char *Txt_THE_USER_X_already_exists_in_Y;
|
||||
extern const char *Txt_The_user_is_new_not_yet_in_X;
|
||||
extern const char *Txt_If_this_is_a_new_user_in_X_you_should_indicate_her_his_ID;
|
||||
|
@ -3107,10 +3107,10 @@ static void Enr_AskIfRegRemUsr (struct ListUsrCods *ListUsrCods,Rol_Role_t Role)
|
|||
Gbl.CurrentCrs.Crs.CrsCod,
|
||||
true);
|
||||
if (Gbl.Usrs.Other.UsrDat.Accepted)
|
||||
sprintf (Gbl.Message,Txt_THE_USER_X_is_already_enrolled_in_the_course_Y,
|
||||
sprintf (Gbl.Message,Txt_THE_USER_X_is_already_enroled_in_the_course_Y,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,Gbl.CurrentCrs.Crs.FullName);
|
||||
else // Enrollment not yet accepted
|
||||
sprintf (Gbl.Message,Txt_THE_USER_X_is_already_in_the_course_Y_but_has_not_yet_accepted_the_enrollment,
|
||||
else // Enrolment not yet accepted
|
||||
sprintf (Gbl.Message,Txt_THE_USER_X_is_already_in_the_course_Y_but_has_not_yet_accepted_the_enrolment,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,Gbl.CurrentCrs.Crs.FullName);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Message);
|
||||
|
||||
|
@ -3118,7 +3118,7 @@ static void Enr_AskIfRegRemUsr (struct ListUsrCods *ListUsrCods,Rol_Role_t Role)
|
|||
}
|
||||
else // User does not belong to the current course
|
||||
{
|
||||
sprintf (Gbl.Message,Txt_THE_USER_X_already_exists_in_Y_but_is_not_yet_enrolled_in_the_course_Z,
|
||||
sprintf (Gbl.Message,Txt_THE_USER_X_already_exists_in_Y_but_is_not_yet_enroled_in_the_course_Z,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,Cfg_PLATFORM_SHORT_NAME,Gbl.CurrentCrs.Crs.FullName);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Message);
|
||||
|
||||
|
@ -3141,7 +3141,7 @@ static void Enr_AskIfRegRemUsr (struct ListUsrCods *ListUsrCods,Rol_Role_t Role)
|
|||
else // No users found, he/she is a new user
|
||||
{
|
||||
/***** If UsrCod is not present in parameters from form,
|
||||
use user's ID to identify the user to be enrolled *****/
|
||||
use user's ID to identify the user to be enroled *****/
|
||||
if (Gbl.Usrs.Other.UsrDat.IDs.List)
|
||||
NewUsrIDValid = ID_CheckIfUsrIDIsValid (Gbl.Usrs.Other.UsrDat.IDs.List[0].ID); // Check the first element of the list
|
||||
else
|
||||
|
@ -3261,7 +3261,7 @@ static void Enr_RegisterAdmin (struct UsrData *UsrDat,Sco_Scope_t Scope,long Cod
|
|||
{
|
||||
extern const char *Sco_ScopeDB[Sco_NUM_SCOPES];
|
||||
extern const char *Txt_THE_USER_X_is_already_an_administrator_of_Y;
|
||||
extern const char *Txt_THE_USER_X_has_been_enrolled_as_administrator_of_Y;
|
||||
extern const char *Txt_THE_USER_X_has_been_enroled_as_administrator_of_Y;
|
||||
char Query[512];
|
||||
|
||||
/***** Check if user was and administrator of current institution/centre/degree *****/
|
||||
|
@ -3278,7 +3278,7 @@ static void Enr_RegisterAdmin (struct UsrData *UsrDat,Sco_Scope_t Scope,long Cod
|
|||
UsrDat->UsrCod,Sco_ScopeDB[Scope],Cod);
|
||||
DB_QueryREPLACE (Query,"can not create administrator");
|
||||
|
||||
sprintf (Gbl.Message,Txt_THE_USER_X_has_been_enrolled_as_administrator_of_Y,
|
||||
sprintf (Gbl.Message,Txt_THE_USER_X_has_been_enroled_as_administrator_of_Y,
|
||||
UsrDat->FullName,InsCtrDegName);
|
||||
}
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
|
||||
|
@ -3525,25 +3525,25 @@ static void Enr_ReqAddAdm (Sco_Scope_t Scope,long Cod,const char *InsCtrDegName)
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*************** Accept my enrollment in the current course ******************/
|
||||
/*************** Accept my enrolment in the current course ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Enr_AcceptRegisterMeInCrs (void)
|
||||
{
|
||||
extern const char *Txt_You_have_confirmed_your_enrollment_in_the_course_X;
|
||||
extern const char *Txt_You_have_confirmed_your_enrolment_in_the_course_X;
|
||||
|
||||
/***** Confirm my enrollment *****/
|
||||
/***** Confirm my enrolment *****/
|
||||
Enr_AcceptUsrInCrs (Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
|
||||
/***** Mark all notifications about enrollment (as student or as teacher)
|
||||
/***** Mark all notifications about enrolment (as student or as teacher)
|
||||
in current course as removed *****/
|
||||
Ntf_MarkNotifToOneUsrAsRemoved (Ntf_EVENT_ENROLLMENT_STUDENT,-1L,
|
||||
Ntf_MarkNotifToOneUsrAsRemoved (Ntf_EVENT_ENROLMENT_STUDENT,-1L,
|
||||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
Ntf_MarkNotifToOneUsrAsRemoved (Ntf_EVENT_ENROLLMENT_TEACHER,-1L,
|
||||
Ntf_MarkNotifToOneUsrAsRemoved (Ntf_EVENT_ENROLMENT_TEACHER,-1L,
|
||||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
|
||||
/***** Confirmation message *****/
|
||||
sprintf (Gbl.Message,Txt_You_have_confirmed_your_enrollment_in_the_course_X,
|
||||
sprintf (Gbl.Message,Txt_You_have_confirmed_your_enrolment_in_the_course_X,
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
|
||||
}
|
||||
|
@ -3556,7 +3556,7 @@ void Enr_CreateNewUsr1 (void)
|
|||
{
|
||||
extern const char *Txt_The_role_of_THE_USER_X_in_the_course_Y_has_changed_from_A_to_B;
|
||||
extern const char *Txt_ROLES_SINGUL_abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
||||
extern const char *Txt_THE_USER_X_has_been_enrolled_in_the_course_Y;
|
||||
extern const char *Txt_THE_USER_X_has_been_enroled_in_the_course_Y;
|
||||
extern const char *Txt_The_ID_X_is_not_valid;
|
||||
Rol_Role_t OldRole;
|
||||
Rol_Role_t NewRole;
|
||||
|
@ -3612,7 +3612,7 @@ void Enr_CreateNewUsr1 (void)
|
|||
|
||||
/* Success message */
|
||||
Gbl.AlertType = Lay_SUCCESS;
|
||||
sprintf (Gbl.Message,Txt_THE_USER_X_has_been_enrolled_in_the_course_Y,
|
||||
sprintf (Gbl.Message,Txt_THE_USER_X_has_been_enroled_in_the_course_Y,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,Gbl.CurrentCrs.Crs.FullName);
|
||||
}
|
||||
}
|
||||
|
@ -3662,7 +3662,7 @@ void Enr_ModifyUsr1 (void)
|
|||
{
|
||||
extern const char *Txt_The_role_of_THE_USER_X_in_the_course_Y_has_changed_from_A_to_B;
|
||||
extern const char *Txt_ROLES_SINGUL_abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
||||
extern const char *Txt_THE_USER_X_has_been_enrolled_in_the_course_Y;
|
||||
extern const char *Txt_THE_USER_X_has_been_enroled_in_the_course_Y;
|
||||
bool ItsMe;
|
||||
Rol_Role_t OldRole;
|
||||
Rol_Role_t NewRole;
|
||||
|
@ -3726,7 +3726,7 @@ void Enr_ModifyUsr1 (void)
|
|||
|
||||
/* Show success message */
|
||||
Gbl.AlertType = Lay_SUCCESS;
|
||||
sprintf (Gbl.Message,Txt_THE_USER_X_has_been_enrolled_in_the_course_Y,
|
||||
sprintf (Gbl.Message,Txt_THE_USER_X_has_been_enroled_in_the_course_Y,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,Gbl.CurrentCrs.Crs.FullName);
|
||||
}
|
||||
|
||||
|
@ -3857,11 +3857,11 @@ void Enr_AcceptUsrInCrs (long UsrCod)
|
|||
{
|
||||
char Query[512];
|
||||
|
||||
/***** Set enrollment of a user to "accepted" in the current course *****/
|
||||
/***** Set enrolment of a user to "accepted" in the current course *****/
|
||||
sprintf (Query,"UPDATE crs_usr SET Accepted='Y'"
|
||||
" WHERE CrsCod=%ld AND UsrCod=%ld",
|
||||
Gbl.CurrentCrs.Crs.CrsCod,UsrCod);
|
||||
DB_QueryUPDATE (Query,"can not confirm user's enrollment");
|
||||
DB_QueryUPDATE (Query,"can not confirm user's enrolment");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
|
@ -1,4 +1,4 @@
|
|||
// swad_enrollment.h: enrollment (registration) or removing of users
|
||||
// swad_enrolment.h: enrolment (registration) or removing of users
|
||||
|
||||
#ifndef _SWAD_ENR
|
||||
#define _SWAD_ENR
|
||||
|
@ -70,8 +70,8 @@ typedef enum
|
|||
/****************************** Public prototypes ****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Enr_PutButtonToEnrollStudents (void);
|
||||
void Enr_PutButtonToEnrollOneTeacher (void);
|
||||
void Enr_PutButtonToEnrolStudents (void);
|
||||
void Enr_PutButtonToEnrolOneTeacher (void);
|
||||
|
||||
void Enr_PutLinkToRequestSignUp (void);
|
||||
|
||||
|
@ -82,7 +82,7 @@ void Enr_RegisterUsrInCurrentCrs (struct UsrData *UsrDat,Rol_Role_t NewRole,
|
|||
void Enr_WriteFormToReqAnotherUsrID (Act_Action_t NextAction);
|
||||
|
||||
void Enr_ReqAcceptRegisterInCrs (void);
|
||||
void Enr_GetNotifEnrollment (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
|
||||
void Enr_GetNotifEnrolment (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
|
||||
long CrsCod,long UsrCod);
|
||||
void Enr_UpdateUsrData (struct UsrData *UsrDat);
|
||||
void Enr_FilterUsrDat (struct UsrData *UsrDat);
|
||||
|
@ -106,13 +106,13 @@ void Enr_RemAllStdsThisCrs (void);
|
|||
unsigned Enr_RemAllStdsInCrs (struct Course *Crs);
|
||||
void Enr_ReqSignUpInCrs (void);
|
||||
void Enr_SignUpInCrs (void);
|
||||
void Enr_GetNotifEnrollmentRequest (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
|
||||
void Enr_GetNotifEnrolmentRequest (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
|
||||
char **ContentStr,
|
||||
long ReqCod,bool GetContent);
|
||||
void Enr_AskIfRejectSignUp (void);
|
||||
void Enr_RejectSignUp (void);
|
||||
void Enr_ShowEnrollmentRequests (void);
|
||||
void Enr_UpdateEnrollmentRequests (void);
|
||||
void Enr_ShowEnrolmentRequests (void);
|
||||
void Enr_UpdateEnrolmentRequests (void);
|
||||
|
||||
void Enr_PutLinkToAdminOneUsr (Act_Action_t NextAction);
|
||||
|
|
@ -2389,7 +2389,7 @@ static void Brw_GetDataCurrentGrp (void)
|
|||
Gbl.CurrentCrs.Grps.MaxStudents = GrpDat.MaxStudents;
|
||||
Gbl.CurrentCrs.Grps.Open = GrpDat.Open;
|
||||
Gbl.CurrentCrs.Grps.FileZones = GrpDat.FileZones;
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.MultipleEnrollment = GrpDat.MultipleEnrollment;
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.MultipleEnrolment = GrpDat.MultipleEnrolment;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@ void Fol_PutLinkWhoToFollow (void)
|
|||
|
||||
void Fol_SuggestUsrsToFollowMainZone (void)
|
||||
{
|
||||
extern const char *Hlp_SOCIAL_Profiles_who_to_follow;
|
||||
extern const char *Hlp_SOCIAL_Follow;
|
||||
extern const char *Txt_Who_to_follow;
|
||||
extern const char *Txt_No_user_to_whom_you_can_follow_Try_again_later;
|
||||
MYSQL_RES *mysql_res;
|
||||
|
@ -131,7 +131,7 @@ void Fol_SuggestUsrsToFollowMainZone (void)
|
|||
/***** Start frame *****/
|
||||
Lay_StartRoundFrameTable ("560px",Txt_Who_to_follow,
|
||||
Fol_PutIconsWhoToFollow,
|
||||
Hlp_SOCIAL_Profiles_who_to_follow,2);
|
||||
Hlp_SOCIAL_Follow,2);
|
||||
|
||||
/***** Initialize structure with user's data *****/
|
||||
Usr_UsrDataConstructor (&UsrDat);
|
||||
|
|
|
@ -316,8 +316,8 @@ void Gbl_InitializeGlobals (void)
|
|||
Gbl.CurrentCrs.Grps.GrpTypes.Num = 0;
|
||||
Gbl.CurrentCrs.Grps.GrpTypes.NestedCalls = 0;
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.GrpTypName[0] = '\0';
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.MandatoryEnrollment = true;
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.MultipleEnrollment = false;
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.MandatoryEnrolment = true;
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.MultipleEnrolment = false;
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.MustBeOpened = false;
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.OpenTimeUTC = (time_t) 0;
|
||||
Gbl.CurrentCrs.Grps.GrpCod = -1L; // -1L stands for the whole course
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
#include "swad_cryptography.h"
|
||||
#include "swad_department.h"
|
||||
#include "swad_degree_type.h"
|
||||
#include "swad_enrollment.h"
|
||||
#include "swad_enrolment.h"
|
||||
#include "swad_exam.h"
|
||||
#include "swad_file.h"
|
||||
#include "swad_file_browser.h"
|
||||
|
@ -402,7 +402,7 @@ struct Globals
|
|||
} Connected;
|
||||
char FileNamePhoto[NAME_MAX + 1]; // File name (with no path and no .jpg) of the temporary file with the selected face
|
||||
bool Error; // To signal that an error has happened
|
||||
Enr_RegRemOneUsrAction_t RegRemAction; // Enrollment action
|
||||
Enr_RegRemOneUsrAction_t RegRemAction; // Enrolment action
|
||||
} Usrs;
|
||||
struct
|
||||
{
|
||||
|
|
194
swad_group.c
194
swad_group.c
|
@ -81,7 +81,7 @@ static void Grp_PutFormToCreateGroupType (void);
|
|||
static void Grp_PutFormToCreateGroup (void);
|
||||
static unsigned Grp_CountNumGrpsInThisCrsOfType (long GrpTypCod);
|
||||
static void Grp_GetDataOfGroupTypeByCod (struct GroupType *GrpTyp);
|
||||
static bool Grp_GetMultipleEnrollmentOfAGroupType (long GrpTypCod);
|
||||
static bool Grp_GetMultipleEnrolmentOfAGroupType (long GrpTypCod);
|
||||
static long Grp_GetTypeOfGroupOfAGroup (long GrpCod);
|
||||
static unsigned Grp_CountNumStdsInNoGrpsOfType (long GrpTypCod);
|
||||
static long Grp_GetFirstCodGrpStdBelongsTo (long GrpTypCod,long UsrCod);
|
||||
|
@ -472,7 +472,7 @@ void Grp_ChangeMyGrps (void)
|
|||
{
|
||||
extern const char *Txt_The_requested_group_changes_were_successful;
|
||||
extern const char *Txt_There_has_been_no_change_in_groups;
|
||||
extern const char *Txt_In_a_type_of_group_with_single_enrollment_students_can_not_be_registered_in_more_than_one_group;
|
||||
extern const char *Txt_In_a_type_of_group_with_single_enrolment_students_can_not_be_registered_in_more_than_one_group;
|
||||
struct ListCodGrps LstGrpsIWant;
|
||||
bool MySelectionIsValid = true;
|
||||
|
||||
|
@ -484,9 +484,9 @@ void Grp_ChangeMyGrps (void)
|
|||
LstGrpsIWant.NumGrps = 0; // Initialized to avoid bug reported by Coverity
|
||||
Grp_GetLstCodsGrpWanted (&LstGrpsIWant);
|
||||
|
||||
/***** A student can not be enrolled in more than one group
|
||||
if the type of group is of single enrollment *****/
|
||||
// As the form to register in groups of single enrollment...
|
||||
/***** A student can not be enroled in more than one group
|
||||
if the type of group is of single enrolment *****/
|
||||
// As the form to register in groups of single enrolment...
|
||||
// ...is a radio-based form and not a checkbox-based form...
|
||||
// ...this check is made only to avoid problems...
|
||||
// ...if the student manipulates the form
|
||||
|
@ -508,7 +508,7 @@ void Grp_ChangeMyGrps (void)
|
|||
Lay_ShowAlert (Lay_WARNING,Txt_There_has_been_no_change_in_groups);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_In_a_type_of_group_with_single_enrollment_students_can_not_be_registered_in_more_than_one_group);
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_In_a_type_of_group_with_single_enrolment_students_can_not_be_registered_in_more_than_one_group);
|
||||
|
||||
/***** Free memory with the list of groups which I want to belong to *****/
|
||||
Grp_FreeListCodGrp (&LstGrpsIWant);
|
||||
|
@ -522,7 +522,7 @@ void Grp_ChangeOtherUsrGrps (void)
|
|||
{
|
||||
extern const char *Txt_The_requested_group_changes_were_successful;
|
||||
extern const char *Txt_There_has_been_no_change_in_groups;
|
||||
extern const char *Txt_In_a_type_of_group_with_single_enrollment_students_can_not_be_registered_in_more_than_one_group;
|
||||
extern const char *Txt_In_a_type_of_group_with_single_enrolment_students_can_not_be_registered_in_more_than_one_group;
|
||||
struct ListCodGrps LstGrpsUsrWants;
|
||||
bool SelectionIsValid = true;
|
||||
|
||||
|
@ -534,8 +534,8 @@ void Grp_ChangeOtherUsrGrps (void)
|
|||
LstGrpsUsrWants.NumGrps = 0; // Initialized to avoid bug reported by Coverity
|
||||
Grp_GetLstCodsGrpWanted (&LstGrpsUsrWants);
|
||||
|
||||
/***** A student can not be enrolled in more than one group
|
||||
if the type of group is of single enrollment *****/
|
||||
/***** A student can not be enroled in more than one group
|
||||
if the type of group is of single enrolment *****/
|
||||
if (Gbl.Usrs.Other.UsrDat.RoleInCurrentCrsDB == Rol_STUDENT &&
|
||||
LstGrpsUsrWants.NumGrps >= 2)
|
||||
SelectionIsValid = Grp_CheckIfSelectionGrpsIsValid (&LstGrpsUsrWants);
|
||||
|
@ -554,7 +554,7 @@ void Grp_ChangeOtherUsrGrps (void)
|
|||
Lay_ShowAlert (Lay_WARNING,Txt_There_has_been_no_change_in_groups);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_In_a_type_of_group_with_single_enrollment_students_can_not_be_registered_in_more_than_one_group);
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_In_a_type_of_group_with_single_enrolment_students_can_not_be_registered_in_more_than_one_group);
|
||||
|
||||
/***** Free memory with the list of groups to/from which register/remove users *****/
|
||||
Grp_FreeListCodGrp (&LstGrpsUsrWants);
|
||||
|
@ -792,7 +792,7 @@ bool Grp_ChangeGrpsOtherUsrAtomically (struct ListCodGrps *LstGrpsUsrWants)
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/***** Check if no se ha selected más of a group of single enrollment ********/
|
||||
/***** Check if no se ha selected más of a group of single enrolment ********/
|
||||
/*****************************************************************************/
|
||||
|
||||
bool Grp_CheckIfSelectionGrpsIsValid (struct ListCodGrps *LstGrps)
|
||||
|
@ -813,7 +813,7 @@ bool Grp_CheckIfSelectionGrpsIsValid (struct ListCodGrps *LstGrps)
|
|||
NumCodGrp++)
|
||||
{
|
||||
GrpTypCod = Grp_GetTypeOfGroupOfAGroup (LstGrps->GrpCods[NumCodGrp]);
|
||||
if (!Grp_GetMultipleEnrollmentOfAGroupType (GrpTypCod))
|
||||
if (!Grp_GetMultipleEnrolmentOfAGroupType (GrpTypCod))
|
||||
for (NumGrpTyp = 0;
|
||||
NumGrpTyp < Gbl.CurrentCrs.Grps.GrpTypes.Num;
|
||||
NumGrpTyp++)
|
||||
|
@ -873,13 +873,13 @@ static void Grp_DestructorListGrpAlreadySelec (struct ListGrpsAlreadySelec **Alr
|
|||
void Grp_RegisterUsrIntoGroups (struct UsrData *UsrDat,struct ListCodGrps *LstGrps)
|
||||
{
|
||||
extern const char *Txt_THE_USER_X_has_been_removed_from_the_group_of_type_Y_to_which_it_belonged;
|
||||
extern const char *Txt_THE_USER_X_has_been_enrolled_in_the_group_of_type_Y_Z;
|
||||
extern const char *Txt_THE_USER_X_has_been_enroled_in_the_group_of_type_Y_Z;
|
||||
struct ListCodGrps LstGrpsHeBelongs;
|
||||
unsigned NumGrpTyp;
|
||||
unsigned NumGrpSel;
|
||||
unsigned NumGrpThisType;
|
||||
unsigned NumGrpHeBelongs;
|
||||
bool MultipleEnrollment;
|
||||
bool MultipleEnrolment;
|
||||
bool AlreadyRegisteredInGrp;
|
||||
|
||||
/***** For each existing type of group in the course... *****/
|
||||
|
@ -887,7 +887,7 @@ void Grp_RegisterUsrIntoGroups (struct UsrData *UsrDat,struct ListCodGrps *LstGr
|
|||
NumGrpTyp < Gbl.CurrentCrs.Grps.GrpTypes.Num;
|
||||
NumGrpTyp++)
|
||||
{
|
||||
MultipleEnrollment = Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MultipleEnrollment;
|
||||
MultipleEnrolment = Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MultipleEnrolment;
|
||||
|
||||
/***** Query in the database the group codes of any group of this type the student belongs to *****/
|
||||
LstGrpsHeBelongs.NumGrps = 0; // Initialized to avoid bug reported by Coverity
|
||||
|
@ -914,9 +914,9 @@ void Grp_RegisterUsrIntoGroups (struct UsrData *UsrDat,struct ListCodGrps *LstGr
|
|||
NumGrpHeBelongs++)
|
||||
if (LstGrps->GrpCods[NumGrpSel] == LstGrpsHeBelongs.GrpCods[NumGrpHeBelongs])
|
||||
AlreadyRegisteredInGrp = true;
|
||||
else if (!MultipleEnrollment) // If the type of group is of single enrollment
|
||||
else if (!MultipleEnrolment) // If the type of group is of single enrolment
|
||||
{
|
||||
/* If the enrollment is single and the group to which the user belongs is different from the selected ==>
|
||||
/* If the enrolment is single and the group to which the user belongs is different from the selected ==>
|
||||
remove user from the group to which he belongs */
|
||||
Grp_RemoveUsrFromGroup (UsrDat->UsrCod,LstGrpsHeBelongs.GrpCods[NumGrpHeBelongs]);
|
||||
sprintf (Gbl.Message,Txt_THE_USER_X_has_been_removed_from_the_group_of_type_Y_to_which_it_belonged,
|
||||
|
@ -927,7 +927,7 @@ void Grp_RegisterUsrIntoGroups (struct UsrData *UsrDat,struct ListCodGrps *LstGr
|
|||
if (!AlreadyRegisteredInGrp) // If the user does not belong to the selected group
|
||||
{
|
||||
Grp_AddUsrToGroup (UsrDat,LstGrps->GrpCods[NumGrpSel]);
|
||||
sprintf (Gbl.Message,Txt_THE_USER_X_has_been_enrolled_in_the_group_of_type_Y_Z,
|
||||
sprintf (Gbl.Message,Txt_THE_USER_X_has_been_enroled_in_the_group_of_type_Y_Z,
|
||||
UsrDat->FullName,Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypName,
|
||||
Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].LstGrps[NumGrpThisType].GrpName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
|
||||
|
@ -1127,17 +1127,17 @@ static void Grp_ListGroupTypesForEdition (void)
|
|||
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">");
|
||||
Act_FormStart (ActChgMdtGrpTyp);
|
||||
Grp_PutParamGrpTypCod (Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
|
||||
fprintf (Gbl.F.Out,"<select name=\"MandatoryEnrollment\""
|
||||
fprintf (Gbl.F.Out,"<select name=\"MandatoryEnrolment\""
|
||||
" style=\"width:150px;\""
|
||||
" onchange=\"document.getElementById('%s').submit();\">"
|
||||
"<option value=\"N\"",
|
||||
Gbl.Form.Id);
|
||||
if (!Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MandatoryEnrollment)
|
||||
if (!Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MandatoryEnrolment)
|
||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
||||
fprintf (Gbl.F.Out,">%s</option>"
|
||||
"<option value=\"Y\"",
|
||||
Txt_It_is_optional_to_choose_a_group);
|
||||
if (Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MandatoryEnrollment)
|
||||
if (Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MandatoryEnrolment)
|
||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
||||
fprintf (Gbl.F.Out,">%s</option>"
|
||||
"</select>",
|
||||
|
@ -1149,17 +1149,17 @@ static void Grp_ListGroupTypesForEdition (void)
|
|||
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">");
|
||||
Act_FormStart (ActChgMulGrpTyp);
|
||||
Grp_PutParamGrpTypCod (Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
|
||||
fprintf (Gbl.F.Out,"<select name=\"MultipleEnrollment\""
|
||||
fprintf (Gbl.F.Out,"<select name=\"MultipleEnrolment\""
|
||||
" style=\"width:150px;\""
|
||||
" onchange=\"document.getElementById('%s').submit();\">"
|
||||
"<option value=\"N\"",
|
||||
Gbl.Form.Id);
|
||||
if (!Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MultipleEnrollment)
|
||||
if (!Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MultipleEnrolment)
|
||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
||||
fprintf (Gbl.F.Out,">%s</option>"
|
||||
"<option value=\"Y\"",
|
||||
Txt_A_student_can_only_belong_to_one_group);
|
||||
if (Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MultipleEnrollment)
|
||||
if (Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MultipleEnrolment)
|
||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
||||
fprintf (Gbl.F.Out,">%s</option>"
|
||||
"</select>",
|
||||
|
@ -1220,8 +1220,8 @@ static void Grp_WriteHeadingGroupTypes (void)
|
|||
{
|
||||
extern const char *Txt_Type_of_group;
|
||||
extern const char *Txt_eg_Lectures_Practicals;
|
||||
extern const char *Txt_Mandatory_enrollment;
|
||||
extern const char *Txt_Multiple_enrollment;
|
||||
extern const char *Txt_Mandatory_enrolment;
|
||||
extern const char *Txt_Multiple_enrolment;
|
||||
extern const char *Txt_Opening_of_groups;
|
||||
extern const char *Txt_No_of_BR_groups;
|
||||
|
||||
|
@ -1244,8 +1244,8 @@ static void Grp_WriteHeadingGroupTypes (void)
|
|||
"</th>"
|
||||
"</tr>",
|
||||
Txt_Type_of_group,Txt_eg_Lectures_Practicals,
|
||||
Txt_Mandatory_enrollment,
|
||||
Txt_Multiple_enrollment,
|
||||
Txt_Mandatory_enrolment,
|
||||
Txt_Multiple_enrolment,
|
||||
Txt_Opening_of_groups,
|
||||
Txt_No_of_BR_groups);
|
||||
}
|
||||
|
@ -1514,7 +1514,7 @@ void Grp_ShowLstGrpsToChgMyGrps (bool ShowWarningsToStudents)
|
|||
extern const char *Hlp_USERS_Groups;
|
||||
extern const char *Txt_My_groups;
|
||||
extern const char *Txt_Change_my_groups;
|
||||
extern const char *Txt_Enroll_in_groups;
|
||||
extern const char *Txt_Enrol_in_groups;
|
||||
extern const char *Txt_No_groups_have_been_created_in_the_course_X;
|
||||
extern const char *Txt_Create_group;
|
||||
unsigned NumGrpTyp;
|
||||
|
@ -1530,7 +1530,7 @@ void Grp_ShowLstGrpsToChgMyGrps (bool ShowWarningsToStudents)
|
|||
Grp_GetListGrpTypesAndGrpsInThisCrs (Grp_ONLY_GROUP_TYPES_WITH_GROUPS);
|
||||
|
||||
/***** Show warnings to students *****/
|
||||
// Students are required to join groups with mandatory enrollment; teachers don't
|
||||
// Students are required to join groups with mandatory enrolment; teachers don't
|
||||
if (ShowWarningsToStudents)
|
||||
Grp_ShowWarningToStdsToChangeGrps ();
|
||||
}
|
||||
|
@ -1560,7 +1560,7 @@ void Grp_ShowLstGrpsToChgMyGrps (bool ShowWarningsToStudents)
|
|||
if (PutFormToChangeGrps)
|
||||
{
|
||||
Lay_PutConfirmButton (NumGrpsIBelong ? Txt_Change_my_groups :
|
||||
Txt_Enroll_in_groups);
|
||||
Txt_Enrol_in_groups);
|
||||
Act_FormEnd ();
|
||||
}
|
||||
}
|
||||
|
@ -1623,10 +1623,10 @@ static void Grp_ShowWarningToStdsToChangeGrps (void)
|
|||
if (Grp_GetFirstCodGrpStdBelongsTo (GrpTyp->GrpTypCod,Gbl.Usrs.Me.UsrDat.UsrCod) < 0) // If the student does not belong to any group
|
||||
if (Grp_GetIfGrpIsAvailable (GrpTyp->GrpTypCod)) // If there is any group of this type available
|
||||
{
|
||||
if (GrpTyp->MandatoryEnrollment)
|
||||
if (GrpTyp->MandatoryEnrolment)
|
||||
{
|
||||
sprintf (Gbl.Message,
|
||||
GrpTyp->MultipleEnrollment ? Txt_You_have_to_register_compulsorily_at_least_in_one_group_of_type_X :
|
||||
GrpTyp->MultipleEnrolment ? Txt_You_have_to_register_compulsorily_at_least_in_one_group_of_type_X :
|
||||
Txt_You_have_to_register_compulsorily_in_one_group_of_type_X,
|
||||
GrpTyp->GrpTypName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Message);
|
||||
|
@ -1634,7 +1634,7 @@ static void Grp_ShowWarningToStdsToChangeGrps (void)
|
|||
else
|
||||
{
|
||||
sprintf (Gbl.Message,
|
||||
GrpTyp->MultipleEnrollment ? Txt_You_can_register_voluntarily_in_one_or_more_groups_of_type_X :
|
||||
GrpTyp->MultipleEnrolment ? Txt_You_can_register_voluntarily_in_one_or_more_groups_of_type_X :
|
||||
Txt_You_can_register_voluntarily_in_one_group_of_type_X,
|
||||
GrpTyp->GrpTypName);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Message);
|
||||
|
@ -1680,17 +1680,17 @@ static unsigned Grp_ListGrpsForChange (struct GroupType *GrpTyp)
|
|||
fprintf (Gbl.F.Out,"\">"
|
||||
"<input type=\"");
|
||||
|
||||
// If user is a student and the enrollment is single
|
||||
// If user is a student and the enrolment is single
|
||||
// and there are more than a group, put a radio item
|
||||
if (Gbl.Usrs.Me.LoggedRole == Rol_STUDENT &&
|
||||
!GrpTyp->MultipleEnrollment &&
|
||||
!GrpTyp->MultipleEnrolment &&
|
||||
GrpTyp->NumGrps > 1)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"radio\" id=\"Grp%ld\" name=\"GrpCod%ld\""
|
||||
" value=\"%ld\"",
|
||||
Grp->GrpCod,GrpTyp->GrpTypCod,
|
||||
Grp->GrpCod);
|
||||
if (!GrpTyp->MandatoryEnrollment) // If the enrollment is not mandatory, I can select no groups
|
||||
if (!GrpTyp->MandatoryEnrolment) // If the enrolment is not mandatory, I can select no groups
|
||||
fprintf (Gbl.F.Out," onclick=\"selectUnselectRadio(this,this.form.GrpCod%ld,%u)\"",
|
||||
GrpTyp->GrpTypCod,GrpTyp->NumGrps);
|
||||
}
|
||||
|
@ -2091,15 +2091,15 @@ static void Grp_PutFormToCreateGroupType (void)
|
|||
|
||||
/***** Is it mandatory to register in any groups of this type? *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">"
|
||||
"<select name=\"MandatoryEnrollment\""
|
||||
"<select name=\"MandatoryEnrolment\""
|
||||
" style=\"width:150px;\">"
|
||||
"<option value=\"N\"");
|
||||
if (!Gbl.CurrentCrs.Grps.GrpTyp.MandatoryEnrollment)
|
||||
if (!Gbl.CurrentCrs.Grps.GrpTyp.MandatoryEnrolment)
|
||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
||||
fprintf (Gbl.F.Out,">%s</option>"
|
||||
"<option value=\"Y\"",
|
||||
Txt_It_is_optional_to_choose_a_group);
|
||||
if (Gbl.CurrentCrs.Grps.GrpTyp.MandatoryEnrollment)
|
||||
if (Gbl.CurrentCrs.Grps.GrpTyp.MandatoryEnrolment)
|
||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
||||
fprintf (Gbl.F.Out,">%s</option>"
|
||||
"</select>"
|
||||
|
@ -2108,15 +2108,15 @@ static void Grp_PutFormToCreateGroupType (void)
|
|||
|
||||
/***** Is it possible to register in multiple groups of this type? *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">"
|
||||
"<select name=\"MultipleEnrollment\""
|
||||
"<select name=\"MultipleEnrolment\""
|
||||
" style=\"width:150px;\">"
|
||||
"<option value=\"N\"");
|
||||
if (!Gbl.CurrentCrs.Grps.GrpTyp.MultipleEnrollment)
|
||||
if (!Gbl.CurrentCrs.Grps.GrpTyp.MultipleEnrolment)
|
||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
||||
fprintf (Gbl.F.Out,">%s</option>"
|
||||
"<option value=\"Y\"",
|
||||
Txt_A_student_can_only_belong_to_one_group);
|
||||
if (Gbl.CurrentCrs.Grps.GrpTyp.MultipleEnrollment)
|
||||
if (Gbl.CurrentCrs.Grps.GrpTyp.MultipleEnrolment)
|
||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
||||
fprintf (Gbl.F.Out,">%s</option>"
|
||||
"</select>"
|
||||
|
@ -2338,10 +2338,10 @@ void Grp_GetListGrpTypesInThisCrs (Grp_WhichGroupTypes_t WhichGroupTypes)
|
|||
Grp_MAX_BYTES_GROUP_TYPE_NAME);
|
||||
|
||||
/* Is it mandatory to register in any groups of this type? (row[2]) */
|
||||
Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumRow].MandatoryEnrollment = (row[2][0] == 'Y');
|
||||
Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumRow].MandatoryEnrolment = (row[2][0] == 'Y');
|
||||
|
||||
/* Is it possible to register in multiple groups of this type? (row[3]) */
|
||||
Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumRow].MultipleEnrollment = (row[3][0] == 'Y');
|
||||
Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumRow].MultipleEnrolment = (row[3][0] == 'Y');
|
||||
|
||||
/* Groups of this type must be opened? (row[4]) */
|
||||
Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumRow].MustBeOpened = (row[4][0] == 'Y');
|
||||
|
@ -2596,8 +2596,8 @@ static void Grp_GetDataOfGroupTypeByCod (struct GroupType *GrpTyp)
|
|||
row = mysql_fetch_row (mysql_res);
|
||||
Str_Copy (GrpTyp->GrpTypName,row[0],
|
||||
Grp_MAX_BYTES_GROUP_TYPE_NAME);
|
||||
GrpTyp->MandatoryEnrollment = (row[1][0] == 'Y');
|
||||
GrpTyp->MultipleEnrollment = (row[2][0] == 'Y');
|
||||
GrpTyp->MandatoryEnrolment = (row[1][0] == 'Y');
|
||||
GrpTyp->MultipleEnrolment = (row[2][0] == 'Y');
|
||||
GrpTyp->MustBeOpened = (row[3][0] == 'Y');
|
||||
GrpTyp->OpenTimeUTC = Dat_GetUNIXTimeFromStr (row[4]);
|
||||
|
||||
|
@ -2606,30 +2606,30 @@ static void Grp_GetDataOfGroupTypeByCod (struct GroupType *GrpTyp)
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************* Check if a group type has multiple enrollment *****************/
|
||||
/************* Check if a group type has multiple enrolment *****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static bool Grp_GetMultipleEnrollmentOfAGroupType (long GrpTypCod)
|
||||
static bool Grp_GetMultipleEnrolmentOfAGroupType (long GrpTypCod)
|
||||
{
|
||||
char Query[128];
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
bool MultipleEnrollment;
|
||||
bool MultipleEnrolment;
|
||||
|
||||
/***** Get data of a type of group from database *****/
|
||||
sprintf (Query,"SELECT Multiple FROM crs_grp_types WHERE GrpTypCod=%ld",
|
||||
GrpTypCod);
|
||||
if (DB_QuerySELECT (Query,&mysql_res,"can not get if type of group has multiple enrollment") != 1)
|
||||
if (DB_QuerySELECT (Query,&mysql_res,"can not get if type of group has multiple enrolment") != 1)
|
||||
Lay_ShowErrorAndExit ("Error when getting type of group.");
|
||||
|
||||
/***** Get multiple enrollment *****/
|
||||
/***** Get multiple enrolment *****/
|
||||
row = mysql_fetch_row (mysql_res);
|
||||
MultipleEnrollment = (row[0][0] == 'Y');
|
||||
MultipleEnrolment = (row[0][0] == 'Y');
|
||||
|
||||
/***** Free structure that stores the query result *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
|
||||
return MultipleEnrollment;
|
||||
return MultipleEnrolment;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -2652,7 +2652,7 @@ void Grp_GetDataOfGroupByCod (struct GroupData *GrpDat)
|
|||
GrpDat->Vacant = 0;
|
||||
GrpDat->Open = false;
|
||||
GrpDat->FileZones = false;
|
||||
GrpDat->MultipleEnrollment = false;
|
||||
GrpDat->MultipleEnrolment = false;
|
||||
|
||||
if (GrpDat->GrpCod > 0)
|
||||
{
|
||||
|
@ -2685,7 +2685,7 @@ void Grp_GetDataOfGroupByCod (struct GroupData *GrpDat)
|
|||
Grp_MAX_BYTES_GROUP_TYPE_NAME);
|
||||
|
||||
/* Get whether a student may be in one or multiple groups (row[3]) */
|
||||
GrpDat->MultipleEnrollment = (row[3][0] == 'Y');
|
||||
GrpDat->MultipleEnrolment = (row[3][0] == 'Y');
|
||||
|
||||
/* Get the name of the group (row[4]) */
|
||||
Str_Copy (GrpDat->GrpName,row[4],
|
||||
|
@ -2876,7 +2876,7 @@ bool Grp_GetIfIBelongToGrp (long GrpCod)
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**** Get the number of types of group with mandatory enrollment *****/
|
||||
/**** Get the number of types of group with mandatory enrolment *****/
|
||||
/**** that have any group open and with any vacant *****/
|
||||
/**** and I don't belong to any of these groups as student *****/
|
||||
/*****************************************************************************/
|
||||
|
@ -2886,7 +2886,7 @@ unsigned Grp_NumGrpTypesMandatIDontBelong (void)
|
|||
char Query[4096];
|
||||
unsigned NumGrpTypes;
|
||||
|
||||
/***** Get the number of types of groups with mandatory enrollment which I don't belong to, from database *****/
|
||||
/***** Get the number of types of groups with mandatory enrolment which I don't belong to, from database *****/
|
||||
sprintf (Query,"SELECT COUNT(DISTINCT GrpTypCod) FROM"
|
||||
" (SELECT crs_grp_types.GrpTypCod AS GrpTypCod,"
|
||||
"COUNT(*) AS NumStudents,"
|
||||
|
@ -3132,10 +3132,10 @@ void Grp_RecFormNewGrpTyp (void)
|
|||
Grp_MAX_BYTES_GROUP_TYPE_NAME);
|
||||
|
||||
/* Get whether it is mandatory to regisrer in any group of this type */
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.MandatoryEnrollment = Par_GetParToBool ("MandatoryEnrollment");
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.MandatoryEnrolment = Par_GetParToBool ("MandatoryEnrolment");
|
||||
|
||||
/* Get whether it is possible to register in multiple groups of this type */
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.MultipleEnrollment = Par_GetParToBool ("MultipleEnrollment");
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.MultipleEnrolment = Par_GetParToBool ("MultipleEnrolment");
|
||||
|
||||
/* Get open time */
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.OpenTimeUTC = Dat_GetTimeUTCFromForm ("OpenTimeUTC");
|
||||
|
@ -3271,9 +3271,9 @@ static void Grp_CreateGroupType (void)
|
|||
" VALUES"
|
||||
" (%ld,'%s','%c','%c','%c',FROM_UNIXTIME(%ld))",
|
||||
Gbl.CurrentCrs.Crs.CrsCod,Gbl.CurrentCrs.Grps.GrpTyp.GrpTypName,
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.MandatoryEnrollment ? 'Y' :
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.MandatoryEnrolment ? 'Y' :
|
||||
'N',
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.MultipleEnrollment ? 'Y' :
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.MultipleEnrolment ? 'Y' :
|
||||
'N',
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.MustBeOpened ? 'Y' :
|
||||
'N',
|
||||
|
@ -3735,104 +3735,104 @@ void Grp_ChangeGroupType (void)
|
|||
|
||||
void Grp_ChangeMandatGrpTyp (void)
|
||||
{
|
||||
extern const char *Txt_The_type_of_enrollment_of_the_type_of_group_X_has_not_changed;
|
||||
extern const char *Txt_The_enrollment_of_students_into_groups_of_type_X_is_now_mandatory;
|
||||
extern const char *Txt_The_enrollment_of_students_into_groups_of_type_X_is_now_voluntary;
|
||||
extern const char *Txt_The_type_of_enrolment_of_the_type_of_group_X_has_not_changed;
|
||||
extern const char *Txt_The_enrolment_of_students_into_groups_of_type_X_is_now_mandatory;
|
||||
extern const char *Txt_The_enrolment_of_students_into_groups_of_type_X_is_now_voluntary;
|
||||
char Query[1024];
|
||||
bool NewMandatoryEnrollment;
|
||||
bool NewMandatoryEnrolment;
|
||||
|
||||
/***** Get parameters of the form *****/
|
||||
/* Get the código of type of group */
|
||||
if ((Gbl.CurrentCrs.Grps.GrpTyp.GrpTypCod = Grp_GetParamGrpTypCod ()) < 0)
|
||||
Lay_ShowErrorAndExit ("Code of type of group is missing.");
|
||||
|
||||
/* Get the new type of enrollment (mandatory or voluntaria) of this type of group */
|
||||
NewMandatoryEnrollment = Par_GetParToBool ("MandatoryEnrollment");
|
||||
/* Get the new type of enrolment (mandatory or voluntaria) of this type of group */
|
||||
NewMandatoryEnrolment = Par_GetParToBool ("MandatoryEnrolment");
|
||||
|
||||
/* Get from the database the name of the type and the old type of enrollment */
|
||||
/* Get from the database the name of the type and the old type of enrolment */
|
||||
Grp_GetDataOfGroupTypeByCod (&Gbl.CurrentCrs.Grps.GrpTyp);
|
||||
|
||||
/***** Check if the old type of enrollment match the new
|
||||
/***** Check if the old type of enrolment match the new
|
||||
(this happens when return is pressed without changes in the form) *****/
|
||||
if (Gbl.CurrentCrs.Grps.GrpTyp.MandatoryEnrollment == NewMandatoryEnrollment)
|
||||
if (Gbl.CurrentCrs.Grps.GrpTyp.MandatoryEnrolment == NewMandatoryEnrolment)
|
||||
{
|
||||
sprintf (Gbl.Message,Txt_The_type_of_enrollment_of_the_type_of_group_X_has_not_changed,
|
||||
sprintf (Gbl.Message,Txt_The_type_of_enrolment_of_the_type_of_group_X_has_not_changed,
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.GrpTypName);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Message);
|
||||
}
|
||||
else
|
||||
{
|
||||
/***** Update of the table of types of group changing the old type of enrollment by the new *****/
|
||||
/***** Update of the table of types of group changing the old type of enrolment by the new *****/
|
||||
sprintf (Query,"UPDATE crs_grp_types SET Mandatory='%c' WHERE GrpTypCod=%ld",
|
||||
NewMandatoryEnrollment ? 'Y' :
|
||||
NewMandatoryEnrolment ? 'Y' :
|
||||
'N',
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.GrpTypCod);
|
||||
DB_QueryUPDATE (Query,"can not update enrollment type of a type of group");
|
||||
DB_QueryUPDATE (Query,"can not update enrolment type of a type of group");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Message,
|
||||
NewMandatoryEnrollment ? Txt_The_enrollment_of_students_into_groups_of_type_X_is_now_mandatory :
|
||||
Txt_The_enrollment_of_students_into_groups_of_type_X_is_now_voluntary,
|
||||
NewMandatoryEnrolment ? Txt_The_enrolment_of_students_into_groups_of_type_X_is_now_mandatory :
|
||||
Txt_The_enrolment_of_students_into_groups_of_type_X_is_now_voluntary,
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.GrpTypName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.MandatoryEnrollment = NewMandatoryEnrollment;
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.MandatoryEnrolment = NewMandatoryEnrolment;
|
||||
Grp_ReqEditGroups ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******** Change multiple enrollment to one or more groups of a type *********/
|
||||
/******** Change multiple enrolment to one or more groups of a type *********/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Grp_ChangeMultiGrpTyp (void)
|
||||
{
|
||||
extern const char *Txt_The_type_of_enrollment_of_the_type_of_group_X_has_not_changed;
|
||||
extern const char *Txt_The_type_of_enrolment_of_the_type_of_group_X_has_not_changed;
|
||||
extern const char *Txt_Now_each_student_can_belong_to_multiple_groups_of_type_X;
|
||||
extern const char *Txt_Now_each_student_can_only_belong_to_a_group_of_type_X;
|
||||
char Query[1024];
|
||||
bool NewMultipleEnrollment;
|
||||
bool NewMultipleEnrolment;
|
||||
|
||||
/***** Get parameters from the form *****/
|
||||
/* Get the code of type of group */
|
||||
if ((Gbl.CurrentCrs.Grps.GrpTyp.GrpTypCod = Grp_GetParamGrpTypCod ()) < 0)
|
||||
Lay_ShowErrorAndExit ("Code of type of group is missing.");
|
||||
|
||||
/* Get the new type of enrollment (single or multiple) of this type of group */
|
||||
NewMultipleEnrollment = Par_GetParToBool ("MultipleEnrollment");
|
||||
/* Get the new type of enrolment (single or multiple) of this type of group */
|
||||
NewMultipleEnrolment = Par_GetParToBool ("MultipleEnrolment");
|
||||
|
||||
/* Get from the database the name of the type and the old type of enrollment */
|
||||
/* Get from the database the name of the type and the old type of enrolment */
|
||||
Grp_GetDataOfGroupTypeByCod (&Gbl.CurrentCrs.Grps.GrpTyp);
|
||||
|
||||
/***** Check if the old type of enrollment match the new one
|
||||
/***** Check if the old type of enrolment match the new one
|
||||
(this happends when return is pressed without changes) *****/
|
||||
if (Gbl.CurrentCrs.Grps.GrpTyp.MultipleEnrollment == NewMultipleEnrollment)
|
||||
if (Gbl.CurrentCrs.Grps.GrpTyp.MultipleEnrolment == NewMultipleEnrolment)
|
||||
{
|
||||
sprintf (Gbl.Message,Txt_The_type_of_enrollment_of_the_type_of_group_X_has_not_changed,
|
||||
sprintf (Gbl.Message,Txt_The_type_of_enrolment_of_the_type_of_group_X_has_not_changed,
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.GrpTypName);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Message);
|
||||
}
|
||||
else
|
||||
{
|
||||
/***** Update of the table of types of group changing the old type of enrollment by the new *****/
|
||||
/***** Update of the table of types of group changing the old type of enrolment by the new *****/
|
||||
sprintf (Query,"UPDATE crs_grp_types SET Multiple='%c'"
|
||||
" WHERE GrpTypCod=%ld",
|
||||
NewMultipleEnrollment ? 'Y' :
|
||||
NewMultipleEnrolment ? 'Y' :
|
||||
'N',
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.GrpTypCod);
|
||||
DB_QueryUPDATE (Query,"can not update enrollment type of a type of group");
|
||||
DB_QueryUPDATE (Query,"can not update enrolment type of a type of group");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Message,
|
||||
NewMultipleEnrollment ? Txt_Now_each_student_can_belong_to_multiple_groups_of_type_X :
|
||||
NewMultipleEnrolment ? Txt_Now_each_student_can_belong_to_multiple_groups_of_type_X :
|
||||
Txt_Now_each_student_can_only_belong_to_a_group_of_type_X,
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.GrpTypName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.MultipleEnrollment = NewMultipleEnrollment;
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.MultipleEnrolment = NewMultipleEnrolment;
|
||||
Grp_ReqEditGroups ();
|
||||
}
|
||||
|
||||
|
@ -3857,7 +3857,7 @@ void Grp_ChangeOpenTimeGrpTyp (void)
|
|||
Gbl.CurrentCrs.Grps.GrpTyp.MustBeOpened = Grp_CheckIfOpenTimeInTheFuture (Gbl.CurrentCrs.Grps.GrpTyp.OpenTimeUTC);
|
||||
|
||||
/***** Update the table of types of group
|
||||
changing the old open time of enrollment by the new *****/
|
||||
changing the old open time of enrolment by the new *****/
|
||||
sprintf (Query,"UPDATE crs_grp_types"
|
||||
" SET MustBeOpened='%c',OpenTime=FROM_UNIXTIME(%ld)"
|
||||
" WHERE GrpTypCod=%ld",
|
||||
|
@ -3865,7 +3865,7 @@ void Grp_ChangeOpenTimeGrpTyp (void)
|
|||
'N',
|
||||
(long) Gbl.CurrentCrs.Grps.GrpTyp.OpenTimeUTC,
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.GrpTypCod);
|
||||
DB_QueryUPDATE (Query,"can not update enrollment type of a type of group");
|
||||
DB_QueryUPDATE (Query,"can not update enrolment type of a type of group");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_The_date_time_of_opening_of_groups_has_changed);
|
||||
|
@ -4156,7 +4156,7 @@ void Grp_GetLstCodsGrpWanted (struct ListCodGrps *LstGrpsWanted)
|
|||
|
||||
/***** Allocate memory for the strings with group codes in each type *****/
|
||||
if ((LstStrCodGrps = (char **) calloc (Gbl.CurrentCrs.Grps.GrpTypes.Num,sizeof (char *))) == NULL)
|
||||
Lay_ShowErrorAndExit ("Not enough memory to store codes of groups in which a user wants to be enrolled.");
|
||||
Lay_ShowErrorAndExit ("Not enough memory to store codes of groups in which a user wants to be enroled.");
|
||||
|
||||
/***** Get lists with the groups that I want in each type
|
||||
in order to count the total number of groups selected *****/
|
||||
|
@ -4167,7 +4167,7 @@ void Grp_GetLstCodsGrpWanted (struct ListCodGrps *LstGrpsWanted)
|
|||
/***** Allocate memory for the list of group codes of this type *****/
|
||||
if ((LstStrCodGrps[NumGrpTyp] = (char *) malloc ((size_t) ((1 + 10 + 1) *
|
||||
Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].NumGrps))) == NULL)
|
||||
Lay_ShowErrorAndExit ("Not enough memory to store codes of groups in which a user wants to be enrolled.");
|
||||
Lay_ShowErrorAndExit ("Not enough memory to store codes of groups in which a user wants to be enroled.");
|
||||
|
||||
/***** Get the multiple parameter code of group of this type *****/
|
||||
sprintf (Param,"GrpCod%ld",Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
|
||||
|
@ -4191,7 +4191,7 @@ void Grp_GetLstCodsGrpWanted (struct ListCodGrps *LstGrpsWanted)
|
|||
if (LstGrpsWanted->NumGrps)
|
||||
{
|
||||
if ((LstGrpsWanted->GrpCods = (long *) calloc (LstGrpsWanted->NumGrps,sizeof (long))) == NULL)
|
||||
Lay_ShowErrorAndExit ("Not enoguh memory to store codes of groups in which a user wants to be enrolled.");
|
||||
Lay_ShowErrorAndExit ("Not enoguh memory to store codes of groups in which a user wants to be enroled.");
|
||||
|
||||
/***** Get the groups *****/
|
||||
for (NumGrpTyp = 0, NumGrpWanted = 0;
|
||||
|
|
|
@ -66,7 +66,7 @@ struct GroupData
|
|||
int Vacant;
|
||||
bool Open; // Group is open?
|
||||
bool FileZones; // Group has file zones?
|
||||
bool MultipleEnrollment;
|
||||
bool MultipleEnrolment;
|
||||
};
|
||||
|
||||
struct Group
|
||||
|
@ -84,8 +84,8 @@ struct GroupType
|
|||
{
|
||||
long GrpTypCod; // Code of type of group
|
||||
char GrpTypName[Grp_MAX_BYTES_GROUP_TYPE_NAME + 1]; // Name of type of group
|
||||
bool MandatoryEnrollment; // Enrollment is mandatory?
|
||||
bool MultipleEnrollment; // Enrollment is multiple?
|
||||
bool MandatoryEnrolment; // Enrolment is mandatory?
|
||||
bool MultipleEnrolment; // Enrolment is multiple?
|
||||
bool MustBeOpened; // Groups must be opened?
|
||||
time_t OpenTimeUTC; // Open groups automatically in this date-time. If == 0, don't open.
|
||||
unsigned NumGrps; // Number of groups of this type
|
||||
|
|
12
swad_help.c
12
swad_help.c
|
@ -70,8 +70,8 @@ static void Hlp_ShowRowHelpWhatWouldYouLikeToDo (const char *Description,
|
|||
|
||||
void Hlp_ShowHelpWhatWouldYouLikeToDo (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_You_are_not_enroled_in_any_course[Usr_NUM_SEXS];
|
||||
extern const char *Txt_You_can_search_for_courses_select_them_and_request_your_enrolment_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_Register_students_in_the_course_X;
|
||||
|
@ -108,8 +108,8 @@ void Hlp_ShowHelpWhatWouldYouLikeToDo (void)
|
|||
!Gbl.Usrs.Me.MyCrss.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_You_are_not_enroled_in_any_course[Gbl.Usrs.Me.UsrDat.Sex],
|
||||
Txt_You_can_search_for_courses_select_them_and_request_your_enrolment_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);
|
||||
}
|
||||
|
@ -147,13 +147,13 @@ void Hlp_ShowHelpWhatWouldYouLikeToDo (void)
|
|||
}
|
||||
}
|
||||
|
||||
if (Gbl.Usrs.Me.MyCrss.Num) // I am enrolled in some courses
|
||||
if (Gbl.Usrs.Me.MyCrss.Num) // I am enroled in some courses
|
||||
{
|
||||
if (Gbl.CurrentCrs.Crs.CrsCod > 0 && // Course selected
|
||||
!Gbl.CurrentCrs.Crs.NumStds && // Current course has no students
|
||||
Gbl.Usrs.Me.UsrDat.RoleInCurrentCrsDB == Rol_TEACHER) // I am a teacher in current course
|
||||
{
|
||||
/* Request students enrollment */
|
||||
/* Request students enrolment */
|
||||
sprintf (Gbl.Title,Txt_Register_students_in_the_course_X,
|
||||
Gbl.CurrentCrs.Crs.ShrtName);
|
||||
Hlp_ShowRowHelpWhatWouldYouLikeToDo (Gbl.Title,
|
||||
|
|
|
@ -1708,25 +1708,25 @@ const char *Hlp_SOCIAL_Profiles_view_public_profile =
|
|||
"SOCIAL.Profiles#view-public-profile";
|
||||
#endif
|
||||
|
||||
const char *Hlp_SOCIAL_Profiles_who_to_follow =
|
||||
const char *Hlp_SOCIAL_Follow =
|
||||
#if L==1
|
||||
"SOCIAL.Profiles#who-to-follow";
|
||||
"SOCIAL.Follow";
|
||||
#elif L==2
|
||||
"SOCIAL.Profiles#who-to-follow";
|
||||
"SOCIAL.Follow";
|
||||
#elif L==3
|
||||
"SOCIAL.Profiles#who-to-follow";
|
||||
"SOCIAL.Follow";
|
||||
#elif L==4
|
||||
"SOCIAL.Profiles.es#a-qui%C3%A9n-seguir";
|
||||
"SOCIAL.Follow.es";
|
||||
#elif L==5
|
||||
"SOCIAL.Profiles#who-to-follow";
|
||||
"SOCIAL.Follow";
|
||||
#elif L==6
|
||||
"SOCIAL.Profiles#who-to-follow";
|
||||
"SOCIAL.Follow";
|
||||
#elif L==7
|
||||
"SOCIAL.Profiles#who-to-follow";
|
||||
"SOCIAL.Follow";
|
||||
#elif L==8
|
||||
"SOCIAL.Profiles#who-to-follow";
|
||||
"SOCIAL.Follow";
|
||||
#elif L==9
|
||||
"SOCIAL.Profiles#who-to-follow";
|
||||
"SOCIAL.Follow";
|
||||
#endif
|
||||
|
||||
const char *Hlp_SOCIAL_Forums =
|
||||
|
@ -3045,7 +3045,7 @@ const char *Hlp_PROFILE_Photo =
|
|||
#elif L==3
|
||||
"PROFILE.Photo";
|
||||
#elif L==4
|
||||
"PROFILE.Photo";
|
||||
"PROFILE.Photo.es";
|
||||
#elif L==5
|
||||
"PROFILE.Photo";
|
||||
#elif L==6
|
||||
|
@ -3066,7 +3066,7 @@ const char *Hlp_PROFILE_Preferences_language =
|
|||
#elif L==3
|
||||
"PROFILE.Preferences#language";
|
||||
#elif L==4
|
||||
"PROFILE.Preferences#language";
|
||||
"PROFILE.Preferences.es#idioma";
|
||||
#elif L==5
|
||||
"PROFILE.Preferences#language";
|
||||
#elif L==6
|
||||
|
@ -3087,7 +3087,7 @@ const char *Hlp_PROFILE_Preferences_calendar =
|
|||
#elif L==3
|
||||
"PROFILE.Preferences#calendar";
|
||||
#elif L==4
|
||||
"PROFILE.Preferences#calendar";
|
||||
"PROFILE.Preferences.es#calendario";
|
||||
#elif L==5
|
||||
"PROFILE.Preferences#calendar";
|
||||
#elif L==6
|
||||
|
@ -3108,7 +3108,7 @@ const char *Hlp_PROFILE_Preferences_icons =
|
|||
#elif L==3
|
||||
"PROFILE.Preferences#icons";
|
||||
#elif L==4
|
||||
"PROFILE.Preferences#icons";
|
||||
"PROFILE.Preferences.es#iconos";
|
||||
#elif L==5
|
||||
"PROFILE.Preferences#icons";
|
||||
#elif L==6
|
||||
|
@ -3129,7 +3129,7 @@ const char *Hlp_PROFILE_Preferences_theme =
|
|||
#elif L==3
|
||||
"PROFILE.Preferences#theme";
|
||||
#elif L==4
|
||||
"PROFILE.Preferences#theme";
|
||||
"PROFILE.Preferences.es#tema";
|
||||
#elif L==5
|
||||
"PROFILE.Preferences#theme";
|
||||
#elif L==6
|
||||
|
@ -3150,7 +3150,7 @@ const char *Hlp_PROFILE_Preferences_menu =
|
|||
#elif L==3
|
||||
"PROFILE.Preferences#menu";
|
||||
#elif L==4
|
||||
"PROFILE.Preferences#menu";
|
||||
"PROFILE.Preferences.es#men%C3%BA";
|
||||
#elif L==5
|
||||
"PROFILE.Preferences#menu";
|
||||
#elif L==6
|
||||
|
@ -3171,7 +3171,7 @@ const char *Hlp_PROFILE_Preferences_columns =
|
|||
#elif L==3
|
||||
"PROFILE.Preferences#columns";
|
||||
#elif L==4
|
||||
"PROFILE.Preferences#columns";
|
||||
"PROFILE.Preferences.es#columnas";
|
||||
#elif L==5
|
||||
"PROFILE.Preferences#columns";
|
||||
#elif L==6
|
||||
|
@ -3192,7 +3192,7 @@ const char *Hlp_PROFILE_Preferences_privacy =
|
|||
#elif L==3
|
||||
"PROFILE.Preferences#privacy";
|
||||
#elif L==4
|
||||
"PROFILE.Preferences#privacy";
|
||||
"PROFILE.Preferences.es#privacidad";
|
||||
#elif L==5
|
||||
"PROFILE.Preferences#privacy";
|
||||
#elif L==6
|
||||
|
@ -3213,7 +3213,7 @@ const char *Hlp_PROFILE_Preferences_notifications =
|
|||
#elif L==3
|
||||
"PROFILE.Preferences#notifications";
|
||||
#elif L==4
|
||||
"PROFILE.Preferences#notifications";
|
||||
"PROFILE.Preferences.es#notificaciones";
|
||||
#elif L==5
|
||||
"PROFILE.Preferences#notifications";
|
||||
#elif L==6
|
||||
|
@ -3234,7 +3234,7 @@ const char *Hlp_PROFILE_Briefcase =
|
|||
#elif L==3
|
||||
"PROFILE.Briefcase";
|
||||
#elif L==4
|
||||
"PROFILE.Briefcase";
|
||||
"PROFILE.Briefcase.es";
|
||||
#elif L==5
|
||||
"PROFILE.Briefcase";
|
||||
#elif L==6
|
||||
|
|
|
@ -261,7 +261,7 @@ void Ins_ShowConfiguration (void)
|
|||
{
|
||||
Ins_Configuration (false);
|
||||
|
||||
/***** Show help to enroll me *****/
|
||||
/***** Show help to enrol me *****/
|
||||
Hlp_ShowHelpWhatWouldYouLikeToDo ();
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include "swad_config.h"
|
||||
#include "swad_config.h"
|
||||
#include "swad_database.h"
|
||||
#include "swad_enrollment.h"
|
||||
#include "swad_enrolment.h"
|
||||
#include "swad_exam.h"
|
||||
#include "swad_follow.h"
|
||||
#include "swad_global.h"
|
||||
|
@ -72,9 +72,9 @@ const char *Ntf_WSNotifyEvents[Ntf_NUM_NOTIFY_EVENTS] =
|
|||
"marksFile", // Ntf_EVENT_MARKS_FILE
|
||||
|
||||
/* Users tab */
|
||||
"enrollmentStudent", // Ntf_EVENT_ENROLLMENT_STUDENT
|
||||
"enrollmentTeacher", // Ntf_EVENT_ENROLLMENT_TEACHER
|
||||
"enrollmentRequest", // Ntf_EVENT_ENROLLMENT_REQUEST
|
||||
"enrollmentStudent", // Ntf_EVENT_ENROLMENT_STUDENT // TODO: Change to "enrolmentStudent" carefully in future versions
|
||||
"enrollmentTeacher", // Ntf_EVENT_ENROLMENT_TEACHER // TODO: Change to "enrolmentTeacher" carefully in future versions
|
||||
"enrollmentRequest", // Ntf_EVENT_ENROLMENT_REQUEST // TODO: Change to "enrolmentRequest" carefully in future versions
|
||||
|
||||
/* Social tab */
|
||||
"timelineComment", // Ntf_EVENT_TIMELINE_COMMENT
|
||||
|
@ -110,9 +110,9 @@ static const Act_Action_t Ntf_DefaultActions[Ntf_NUM_NOTIFY_EVENTS] =
|
|||
ActSeeAdmMrk, // Ntf_EVENT_MARKS_FILE
|
||||
|
||||
/* Users tab */
|
||||
ActReqAccEnrStd, // Ntf_EVENT_ENROLLMENT_STUDENT
|
||||
ActReqAccEnrTch, // Ntf_EVENT_ENROLLMENT_TEACHER
|
||||
ActSeeSignUpReq, // Ntf_EVENT_ENROLLMENT_REQUEST
|
||||
ActReqAccEnrStd, // Ntf_EVENT_ENROLMENT_STUDENT
|
||||
ActReqAccEnrTch, // Ntf_EVENT_ENROLMENT_TEACHER
|
||||
ActSeeSignUpReq, // Ntf_EVENT_ENROLMENT_REQUEST
|
||||
|
||||
/* Social tab */
|
||||
ActSeeSocTmlGbl, // Ntf_EVENT_TIMELINE_COMMENT
|
||||
|
@ -153,9 +153,9 @@ static const char *Ntf_ParamNotifMeAboutNotifyEvents[Ntf_NUM_NOTIFY_EVENTS] =
|
|||
"NotifyNtfEventMarksFile", // Ntf_EVENT_MARKS_FILE
|
||||
|
||||
/* Users tab */
|
||||
"NotifyNtfEventEnrollmentStudent", // Ntf_EVENT_ENROLLMENT_STUDENT
|
||||
"NotifyNtfEventEnrollmentTeacher", // Ntf_EVENT_ENROLLMENT_TEACHER
|
||||
"NotifyNtfEventEnrollmentRequest", // Ntf_EVENT_ENROLLMENT_REQUEST
|
||||
"NotifyNtfEventEnrolmentStudent", // Ntf_EVENT_ENROLMENT_STUDENT
|
||||
"NotifyNtfEventEnrolmentTeacher", // Ntf_EVENT_ENROLMENT_TEACHER
|
||||
"NotifyNtfEventEnrolmentRequest", // Ntf_EVENT_ENROLMENT_REQUEST
|
||||
|
||||
/* Social tab */
|
||||
"NotifyNtfEventTimelineComment", // Ntf_EVENT_TIMELINE_COMMENT
|
||||
|
@ -192,9 +192,9 @@ static const char *Ntf_ParamEmailMeAboutNotifyEvents[Ntf_NUM_NOTIFY_EVENTS] =
|
|||
"EmailNtfEventMarksFile", // Ntf_EVENT_MARKS_FILE
|
||||
|
||||
/* Users tab */
|
||||
"EmailNtfEventEnrollmentStudent", // Ntf_EVENT_ENROLLMENT_STUDENT
|
||||
"EmailNtfEventEnrollmentTeacher", // Ntf_EVENT_ENROLLMENT_TEACHER
|
||||
"EmailNtfEventEnrollmentRequest", // Ntf_EVENT_ENROLLMENT_REQUEST
|
||||
"EmailNtfEventEnrolmentStudent", // Ntf_EVENT_ENROLMENT_STUDENT
|
||||
"EmailNtfEventEnrolmentTeacher", // Ntf_EVENT_ENROLMENT_TEACHER
|
||||
"EmailNtfEventEnrolmentRequest", // Ntf_EVENT_ENROLMENT_REQUEST
|
||||
|
||||
/* Social tab */
|
||||
"EmailNtfEventTimelineComment", // Ntf_EVENT_TIMELINE_COMMENT
|
||||
|
@ -231,9 +231,9 @@ static const char *Ntf_Icons[Ntf_NUM_NOTIFY_EVENTS] =
|
|||
"grades16x16.gif", // Ntf_EVENT_MARKS_FILE
|
||||
|
||||
/* Users tab */
|
||||
"adduser16x16.gif", // Ntf_EVENT_ENROLLMENT_STUDENT
|
||||
"adduser16x16.gif", // Ntf_EVENT_ENROLLMENT_TEACHER
|
||||
"enrollmentrequest16x16.gif", // Ntf_EVENT_ENROLLMENT_REQUEST
|
||||
"adduser16x16.gif", // Ntf_EVENT_ENROLMENT_STUDENT
|
||||
"adduser16x16.gif", // Ntf_EVENT_ENROLMENT_TEACHER
|
||||
"enrollmentrequest16x16.gif", // Ntf_EVENT_ENROLMENT_REQUEST
|
||||
|
||||
/* Social tab */
|
||||
"soc64x64.png", // Ntf_EVENT_TIMELINE_COMMENT
|
||||
|
@ -887,12 +887,12 @@ void Ntf_GetNotifSummaryAndContent (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
|
|||
case Ntf_EVENT_MARKS_FILE:
|
||||
Mrk_GetNotifMyMarks (SummaryStr,ContentStr,Cod,UsrCod,GetContent);
|
||||
break;
|
||||
case Ntf_EVENT_ENROLLMENT_STUDENT:
|
||||
case Ntf_EVENT_ENROLLMENT_TEACHER:
|
||||
Enr_GetNotifEnrollment (SummaryStr,CrsCod,UsrCod);
|
||||
case Ntf_EVENT_ENROLMENT_STUDENT:
|
||||
case Ntf_EVENT_ENROLMENT_TEACHER:
|
||||
Enr_GetNotifEnrolment (SummaryStr,CrsCod,UsrCod);
|
||||
break;
|
||||
case Ntf_EVENT_ENROLLMENT_REQUEST:
|
||||
Enr_GetNotifEnrollmentRequest (SummaryStr,ContentStr,Cod,GetContent);
|
||||
case Ntf_EVENT_ENROLMENT_REQUEST:
|
||||
Enr_GetNotifEnrolmentRequest (SummaryStr,ContentStr,Cod,GetContent);
|
||||
break;
|
||||
case Ntf_EVENT_TIMELINE_COMMENT:
|
||||
case Ntf_EVENT_TIMELINE_FAV:
|
||||
|
@ -1236,7 +1236,7 @@ unsigned Ntf_StoreNotifyEventsToAllUsrs (Ntf_NotifyEvent_t NotifyEvent,long Cod)
|
|||
}
|
||||
break;
|
||||
case Ntf_EVENT_ASSIGNMENT:
|
||||
// 1. If the assignment is available for the whole course ==> get all users enrolled in the course except me
|
||||
// 1. If the assignment is available for the whole course ==> get all users enroled in the course except me
|
||||
// 2. If the assignment is available only for some groups ==> get all users who belong to any of the groups except me
|
||||
// Cases 1 and 2 are mutually exclusive, so the union returns the case 1 or 2
|
||||
sprintf (Query,"(SELECT crs_usr.UsrCod"
|
||||
|
@ -1262,10 +1262,10 @@ unsigned Ntf_StoreNotifyEventsToAllUsrs (Ntf_NotifyEvent_t NotifyEvent,long Cod)
|
|||
Gbl.CurrentCrs.Crs.CrsCod,
|
||||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
break;
|
||||
case Ntf_EVENT_ENROLLMENT_STUDENT: // This function should not be called in this case
|
||||
case Ntf_EVENT_ENROLLMENT_TEACHER: // This function should not be called in this case
|
||||
case Ntf_EVENT_ENROLMENT_STUDENT: // This function should not be called in this case
|
||||
case Ntf_EVENT_ENROLMENT_TEACHER: // This function should not be called in this case
|
||||
return 0;
|
||||
case Ntf_EVENT_ENROLLMENT_REQUEST:
|
||||
case Ntf_EVENT_ENROLMENT_REQUEST:
|
||||
if (Gbl.CurrentCrs.Crs.NumTchs)
|
||||
// If this course has teachers ==> send notification to teachers
|
||||
sprintf (Query,"SELECT UsrCod FROM crs_usr"
|
||||
|
@ -1337,7 +1337,7 @@ unsigned Ntf_StoreNotifyEventsToAllUsrs (Ntf_NotifyEvent_t NotifyEvent,long Cod)
|
|||
case Ntf_EVENT_MESSAGE: // This function should not be called in this case
|
||||
return 0;
|
||||
case Ntf_EVENT_SURVEY: // Only surveys for a course are notified, not surveys for a degree or global
|
||||
// 1. If the survey is available for the whole course ==> get users enrolled in the course whose role is available in survey, except me
|
||||
// 1. If the survey is available for the whole course ==> get users enroled in the course whose role is available in survey, except me
|
||||
// 2. If the survey is available only for some groups ==> get users who belong to any of the groups and whose role is available in survey, except me
|
||||
// Cases 1 and 2 are mutually exclusive, so the union returns the case 1 or 2
|
||||
sprintf (Query,"(SELECT crs_usr.UsrCod"
|
||||
|
@ -1664,9 +1664,9 @@ static void Ntf_SendPendingNotifByEMailToOneUsr (struct UsrData *ToUsrDat,unsign
|
|||
case Ntf_EVENT_ASSIGNMENT:
|
||||
case Ntf_EVENT_EXAM_ANNOUNCEMENT:
|
||||
case Ntf_EVENT_MARKS_FILE:
|
||||
case Ntf_EVENT_ENROLLMENT_STUDENT:
|
||||
case Ntf_EVENT_ENROLLMENT_TEACHER:
|
||||
case Ntf_EVENT_ENROLLMENT_REQUEST:
|
||||
case Ntf_EVENT_ENROLMENT_STUDENT:
|
||||
case Ntf_EVENT_ENROLMENT_TEACHER:
|
||||
case Ntf_EVENT_ENROLMENT_REQUEST:
|
||||
case Ntf_EVENT_NOTICE:
|
||||
case Ntf_EVENT_MESSAGE:
|
||||
case Ntf_EVENT_SURVEY:
|
||||
|
|
|
@ -55,34 +55,34 @@ typedef enum
|
|||
|
||||
/* Course tab */
|
||||
Ntf_EVENT_DOCUMENT_FILE = 1,
|
||||
Ntf_EVENT_TEACHERS_FILE = 2, // TODO: Change all the numbers >= 2
|
||||
Ntf_EVENT_SHARED_FILE = 3, // Old 2
|
||||
Ntf_EVENT_TEACHERS_FILE = 2,
|
||||
Ntf_EVENT_SHARED_FILE = 3,
|
||||
|
||||
/* Assessment tab */
|
||||
Ntf_EVENT_ASSIGNMENT = 4, // Old 3
|
||||
Ntf_EVENT_EXAM_ANNOUNCEMENT = 5, // Old 4
|
||||
Ntf_EVENT_MARKS_FILE = 6, // Old 5
|
||||
Ntf_EVENT_ASSIGNMENT = 4,
|
||||
Ntf_EVENT_EXAM_ANNOUNCEMENT = 5,
|
||||
Ntf_EVENT_MARKS_FILE = 6,
|
||||
|
||||
/* Users tab */
|
||||
Ntf_EVENT_ENROLLMENT_STUDENT = 7, // Old 6
|
||||
Ntf_EVENT_ENROLLMENT_TEACHER = 8, // Old 7
|
||||
Ntf_EVENT_ENROLLMENT_REQUEST = 9, // Old 8
|
||||
Ntf_EVENT_ENROLMENT_STUDENT = 7,
|
||||
Ntf_EVENT_ENROLMENT_TEACHER = 8,
|
||||
Ntf_EVENT_ENROLMENT_REQUEST = 9,
|
||||
|
||||
/* Social tab */
|
||||
Ntf_EVENT_TIMELINE_COMMENT = 10, // Old 9 // New comment to one of my social publishings (notes or comments)
|
||||
Ntf_EVENT_TIMELINE_FAV = 11, // Old 10 // New fav of one of my social publishings (notes or comments)
|
||||
Ntf_EVENT_TIMELINE_SHARE = 12, // Old 11 // New sharing of one of my social notes
|
||||
Ntf_EVENT_TIMELINE_MENTION = 13, // Old 12 // New mention
|
||||
Ntf_EVENT_FOLLOWER = 14, // Old 13
|
||||
Ntf_EVENT_FORUM_POST_COURSE = 15, // Old 14 // New post in forums of my courses
|
||||
Ntf_EVENT_FORUM_REPLY = 16, // Old 15 // New reply to one of my posts in any forum
|
||||
Ntf_EVENT_TIMELINE_COMMENT = 10, // New comment to one of my social publishings (notes or comments)
|
||||
Ntf_EVENT_TIMELINE_FAV = 11, // New fav of one of my social publishings (notes or comments)
|
||||
Ntf_EVENT_TIMELINE_SHARE = 12, // New sharing of one of my social notes
|
||||
Ntf_EVENT_TIMELINE_MENTION = 13, // New mention
|
||||
Ntf_EVENT_FOLLOWER = 14,
|
||||
Ntf_EVENT_FORUM_POST_COURSE = 15, // New post in forums of my courses
|
||||
Ntf_EVENT_FORUM_REPLY = 16, // New reply to one of my posts in any forum
|
||||
|
||||
/* Messages tab */
|
||||
Ntf_EVENT_NOTICE = 17, // Old 16
|
||||
Ntf_EVENT_MESSAGE = 18, // Old 17
|
||||
Ntf_EVENT_NOTICE = 17,
|
||||
Ntf_EVENT_MESSAGE = 18,
|
||||
|
||||
/* Statistics tab */
|
||||
Ntf_EVENT_SURVEY = 19, // Old 18
|
||||
Ntf_EVENT_SURVEY = 19,
|
||||
|
||||
/* Profile tab */
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include <unistd.h> // For unlink
|
||||
|
||||
#include "swad_database.h"
|
||||
#include "swad_enrollment.h"
|
||||
#include "swad_enrolment.h"
|
||||
#include "swad_global.h"
|
||||
#include "swad_ID.h"
|
||||
#include "swad_password.h"
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include "swad_action.h"
|
||||
#include "swad_config.h"
|
||||
#include "swad_database.h"
|
||||
#include "swad_enrollment.h"
|
||||
#include "swad_enrolment.h"
|
||||
#include "swad_file.h"
|
||||
#include "swad_file_browser.h"
|
||||
#include "swad_global.h"
|
||||
|
|
|
@ -308,7 +308,7 @@ bool Prf_ShowUserProfile (struct UsrData *UsrDat)
|
|||
/* Get user's role in current course */
|
||||
UsrDat->RoleInCurrentCrsDB = Rol_GetRoleInCrs (Gbl.CurrentCrs.Crs.CrsCod,UsrDat->UsrCod);
|
||||
|
||||
/* Get if user has accepted enrollment in current course */
|
||||
/* Get if user has accepted enrolment in current course */
|
||||
UsrDat->Accepted = Usr_CheckIfUsrBelongsToCrs (UsrDat->UsrCod,
|
||||
Gbl.CurrentCrs.Crs.CrsCod,
|
||||
true);
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include "swad_action.h"
|
||||
#include "swad_config.h"
|
||||
#include "swad_database.h"
|
||||
#include "swad_enrollment.h"
|
||||
#include "swad_enrolment.h"
|
||||
#include "swad_follow.h"
|
||||
#include "swad_global.h"
|
||||
#include "swad_ID.h"
|
||||
|
@ -1063,7 +1063,7 @@ void Rec_GetUsrAndShowRecordOneStdCrs (void)
|
|||
|
||||
static void Rec_ShowRecordOneStdCrs (void)
|
||||
{
|
||||
/***** Get if student has accepted enrollment in current course *****/
|
||||
/***** Get if student has accepted enrolment in current course *****/
|
||||
Gbl.Usrs.Other.UsrDat.Accepted = Usr_CheckIfUsrBelongsToCrs (Gbl.Usrs.Other.UsrDat.UsrCod,
|
||||
Gbl.CurrentCrs.Crs.CrsCod,
|
||||
true);
|
||||
|
@ -1257,7 +1257,7 @@ static void Rec_ShowRecordOneTchCrs (void)
|
|||
/***** Width for office hours *****/
|
||||
sprintf (Width,"%upx",Rec_RECORD_WIDTH);
|
||||
|
||||
/***** Get if teacher has accepted enrollment in current course *****/
|
||||
/***** Get if teacher has accepted enrolment in current course *****/
|
||||
Gbl.Usrs.Other.UsrDat.Accepted = Usr_CheckIfUsrBelongsToCrs (Gbl.Usrs.Other.UsrDat.UsrCod,
|
||||
Gbl.CurrentCrs.Crs.CrsCod,
|
||||
true);
|
||||
|
@ -2785,7 +2785,7 @@ static void Rec_ShowRole (struct UsrData *UsrDat,
|
|||
ClassForm,Txt_Role);
|
||||
switch (TypeOfView)
|
||||
{
|
||||
case Rec_SHA_SIGN_UP_FORM: // I want to apply for enrollment
|
||||
case Rec_SHA_SIGN_UP_FORM: // I want to apply for enrolment
|
||||
DefaultRoleInCurrentCrs = ((UsrDat->Roles & (1 << Rol_TEACHER)) || // I am teacher in other courses
|
||||
UsrDat->UsrCod == Gbl.CurrentCrs.Crs.RequesterUsrCod) ? // I am the creator of the course
|
||||
Rol_TEACHER :
|
||||
|
|
|
@ -301,9 +301,9 @@ void Soc_ShowTimelineGbl2 (void)
|
|||
Soc_TOP_MESSAGE_NONE, // Ntf_EVENT_MARKS_FILE
|
||||
|
||||
/* Users tab */
|
||||
Soc_TOP_MESSAGE_NONE, // Ntf_EVENT_ENROLLMENT_STUDENT
|
||||
Soc_TOP_MESSAGE_NONE, // Ntf_EVENT_ENROLLMENT_TEACHER
|
||||
Soc_TOP_MESSAGE_NONE, // Ntf_EVENT_ENROLLMENT_REQUEST
|
||||
Soc_TOP_MESSAGE_NONE, // Ntf_EVENT_ENROLMENT_STUDENT
|
||||
Soc_TOP_MESSAGE_NONE, // Ntf_EVENT_ENROLMENT_TEACHER
|
||||
Soc_TOP_MESSAGE_NONE, // Ntf_EVENT_ENROLMENT_REQUEST
|
||||
|
||||
/* Social tab */
|
||||
Soc_TOP_MESSAGE_COMMENTED, // Ntf_EVENT_TIMELINE_COMMENT
|
||||
|
|
430
swad_text.c
430
swad_text.c
File diff suppressed because it is too large
Load Diff
38
swad_user.c
38
swad_user.c
|
@ -42,7 +42,7 @@
|
|||
#include "swad_course.h"
|
||||
#include "swad_database.h"
|
||||
#include "swad_duplicate.h"
|
||||
#include "swad_enrollment.h"
|
||||
#include "swad_enrolment.h"
|
||||
#include "swad_global.h"
|
||||
#include "swad_group.h"
|
||||
#include "swad_help.h"
|
||||
|
@ -1968,7 +1968,7 @@ void Usr_WriteFormLogout (void)
|
|||
/***** Form to change my role *****/
|
||||
Usr_ShowFormsLogoutAndRole ();
|
||||
|
||||
/***** Show help to enroll me *****/
|
||||
/***** Show help to enrol me *****/
|
||||
Hlp_ShowHelpWhatWouldYouLikeToDo ();
|
||||
}
|
||||
|
||||
|
@ -2130,7 +2130,7 @@ void Usr_WelcomeUsr (void)
|
|||
!Gbl.Usrs.Me.UsrDat.EmailConfirmed)
|
||||
Mai_PutButtonToCheckEmailAddress ();
|
||||
|
||||
/***** Show help to enroll me *****/
|
||||
/***** Show help to enrol me *****/
|
||||
Hlp_ShowHelpWhatWouldYouLikeToDo ();
|
||||
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
|
@ -3124,8 +3124,8 @@ static void Usr_InsertMyLastData (void)
|
|||
void Usr_WriteRowUsrMainData (unsigned NumUsr,struct UsrData *UsrDat,
|
||||
bool PutCheckBoxToSelectUsr)
|
||||
{
|
||||
extern const char *Txt_Enrollment_confirmed;
|
||||
extern const char *Txt_Enrollment_not_confirmed;
|
||||
extern const char *Txt_Enrolment_confirmed;
|
||||
extern const char *Txt_Enrolment_not_confirmed;
|
||||
char BgColor[Usr_MAX_BYTES_BG_COLOR + 1];
|
||||
char PhotoURL[PATH_MAX + 1];
|
||||
bool ShowPhoto;
|
||||
|
@ -3151,7 +3151,7 @@ void Usr_WriteRowUsrMainData (unsigned NumUsr,struct UsrData *UsrDat,
|
|||
fprintf (Gbl.F.Out,"</td>");
|
||||
}
|
||||
|
||||
/***** User has accepted enrollment? *****/
|
||||
/***** User has accepted enrolment? *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"");
|
||||
if (UsrIsTheMsgSender)
|
||||
fprintf (Gbl.F.Out,"BM_SEL");
|
||||
|
@ -3165,10 +3165,10 @@ void Usr_WriteRowUsrMainData (unsigned NumUsr,struct UsrData *UsrDat,
|
|||
Gbl.Prefs.IconsURL,
|
||||
UsrDat->Accepted ? "ok_on" :
|
||||
"tr",
|
||||
UsrDat->Accepted ? Txt_Enrollment_confirmed :
|
||||
Txt_Enrollment_not_confirmed,
|
||||
UsrDat->Accepted ? Txt_Enrollment_confirmed :
|
||||
Txt_Enrollment_not_confirmed);
|
||||
UsrDat->Accepted ? Txt_Enrolment_confirmed :
|
||||
Txt_Enrolment_not_confirmed,
|
||||
UsrDat->Accepted ? Txt_Enrolment_confirmed :
|
||||
Txt_Enrolment_not_confirmed);
|
||||
|
||||
/***** Write number of user in the list *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE %s\">"
|
||||
|
@ -4906,7 +4906,7 @@ static void Usr_GetListUsrsFromQuery (const char *Query,Rol_Role_t Role,Sco_Scop
|
|||
/* Get user's institution code (row[10]) */
|
||||
UsrInList->InsCod = Str_ConvertStrCodToLongCod (row[10]);
|
||||
|
||||
/* Get user's role and acceptance of enrollment in course(s)
|
||||
/* Get user's role and acceptance of enrolment in course(s)
|
||||
(row[11], row[12] if Scope == Sco_SCOPE_CRS) */
|
||||
switch (Role)
|
||||
{
|
||||
|
@ -5949,8 +5949,8 @@ static void Usr_ListMainDataStds (bool PutCheckBoxToSelectUsr)
|
|||
/***** Show warning indicating no students found *****/
|
||||
Usr_ShowWarningNoUsersFound (Rol_STUDENT);
|
||||
|
||||
/***** Button to enroll students *****/
|
||||
Enr_PutButtonToEnrollStudents ();
|
||||
/***** Button to enrol students *****/
|
||||
Enr_PutButtonToEnrolStudents ();
|
||||
}
|
||||
|
||||
/***** Free memory for students list *****/
|
||||
|
@ -6025,8 +6025,8 @@ static void Usr_ListMainDataTchs (bool PutCheckBoxToSelectUsr)
|
|||
/***** Show warning indicating no teachers found *****/
|
||||
Usr_ShowWarningNoUsersFound (Rol_TEACHER);
|
||||
|
||||
/***** Button to enroll a teacher *****/
|
||||
Enr_PutButtonToEnrollOneTeacher ();
|
||||
/***** Button to enrol a teacher *****/
|
||||
Enr_PutButtonToEnrolOneTeacher ();
|
||||
}
|
||||
|
||||
/***** Free memory for teachers list *****/
|
||||
|
@ -7409,8 +7409,8 @@ void Usr_SeeStudents (void)
|
|||
/***** Show warning indicating no students found *****/
|
||||
Usr_ShowWarningNoUsersFound (Rol_STUDENT);
|
||||
|
||||
/***** Button to enroll students *****/
|
||||
Enr_PutButtonToEnrollStudents ();
|
||||
/***** Button to enrol students *****/
|
||||
Enr_PutButtonToEnrolStudents ();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7561,8 +7561,8 @@ void Usr_SeeTeachers (void)
|
|||
/***** Show warning indicating no teachers found *****/
|
||||
Usr_ShowWarningNoUsersFound (Rol_TEACHER);
|
||||
|
||||
/***** Button to enroll a teacher *****/
|
||||
Enr_PutButtonToEnrollOneTeacher ();
|
||||
/***** Button to enrol a teacher *****/
|
||||
Enr_PutButtonToEnrolOneTeacher ();
|
||||
}
|
||||
|
||||
/***** End frame *****/
|
||||
|
|
|
@ -1689,11 +1689,11 @@ int swad__getGroupTypes (struct soap *soap,
|
|||
Str_Copy (getGroupTypesOut->groupTypesArray.__ptr[NumRow].groupTypeName,row[1],
|
||||
Grp_MAX_BYTES_GROUP_TYPE_NAME);
|
||||
|
||||
/* Get whether enrollment is mandatory ('Y') or voluntary ('N') (row[2]) */
|
||||
/* Get whether enrolment is mandatory ('Y') or voluntary ('N') (row[2]) */
|
||||
getGroupTypesOut->groupTypesArray.__ptr[NumRow].mandatory = (row[2][0] == 'Y') ? 1 :
|
||||
0;
|
||||
|
||||
/* Get whether user can enroll in multiple groups ('Y') or only in one group ('N') (row[3]) */
|
||||
/* Get whether user can enrol in multiple groups ('Y') or only in one group ('N') (row[3]) */
|
||||
getGroupTypesOut->groupTypesArray.__ptr[NumRow].multiple = (row[3][0] == 'Y') ? 1 :
|
||||
0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue