mirror of
https://github.com/acanas/swad-core.git
synced 2024-09-20 00:02:42 +02:00
Version 16.65
This commit is contained in:
parent
c38153e71e
commit
2e38644b92
|
@ -166,17 +166,20 @@
|
||||||
|
|
||||||
// TODO: Default type of degree should be "Other" or empty by default
|
// TODO: Default type of degree should be "Other" or empty by default
|
||||||
|
|
||||||
|
// TODO: Change forms to change my webs / social networks to one unique form with a "Save changes" button
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 16.64.34 (2016-11-20)"
|
#define Log_PLATFORM_VERSION "SWAD 16.65 (2016-11-20)"
|
||||||
#define CSS_FILE "swad16.60.1.css"
|
#define CSS_FILE "swad16.60.1.css"
|
||||||
#define JS_FILE "swad16.46.1.js"
|
#define JS_FILE "swad16.46.1.js"
|
||||||
|
|
||||||
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
// 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
|
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1
|
||||||
/*
|
/*
|
||||||
|
Version 16.65: Nov 20, 2016 Changes in selector of my courses. (207369 lines)
|
||||||
Version 16.64.34: Nov 20, 2016 Input fields for URLs are changed from text to url. (207376 lines)
|
Version 16.64.34: Nov 20, 2016 Input fields for URLs are changed from text to url. (207376 lines)
|
||||||
Version 16.64.33: Nov 20, 2016 Input fields for email are changed from text to email. (207375 lines)
|
Version 16.64.33: Nov 20, 2016 Input fields for email are changed from text to email. (207375 lines)
|
||||||
Version 16.64.32: Nov 20, 2016 Input fields for phone numbers are changed from text to tel. (207374 lines)
|
Version 16.64.32: Nov 20, 2016 Input fields for phone numbers are changed from text to tel. (207374 lines)
|
||||||
|
|
|
@ -1087,7 +1087,6 @@ void Crs_WriteSelectorMyCourses (void)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Course;
|
extern const char *Txt_Course;
|
||||||
unsigned NumMyCrs;
|
unsigned NumMyCrs;
|
||||||
bool IBelongToCurrentCrs = false;
|
|
||||||
long CrsCod;
|
long CrsCod;
|
||||||
long DegCod;
|
long DegCod;
|
||||||
long LastDegCod;
|
long LastDegCod;
|
||||||
|
@ -1109,9 +1108,9 @@ void Crs_WriteSelectorMyCourses (void)
|
||||||
Gbl.Form.Id);
|
Gbl.Form.Id);
|
||||||
|
|
||||||
/***** Write an option when no course selected *****/
|
/***** Write an option when no course selected *****/
|
||||||
if (Gbl.CurrentCrs.Crs.CrsCod <= 0)
|
if (Gbl.CurrentCrs.Crs.CrsCod <= 0) // No course selected
|
||||||
fprintf (Gbl.F.Out,"<option value=\"-1\" disabled=\"disabled\""
|
fprintf (Gbl.F.Out,"<option value=\"-1\""
|
||||||
" selected=\"selected\">"
|
" disabled=\"disabled\" selected=\"selected\">"
|
||||||
"%s"
|
"%s"
|
||||||
"</option>",
|
"</option>",
|
||||||
Txt_Course);
|
Txt_Course);
|
||||||
|
@ -1130,41 +1129,33 @@ void Crs_WriteSelectorMyCourses (void)
|
||||||
|
|
||||||
if (DegCod != LastDegCod)
|
if (DegCod != LastDegCod)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,"<option value=\"-1\" disabled=\"disabled\">"
|
if (LastDegCod > 0)
|
||||||
"--- %s ---"
|
fprintf (Gbl.F.Out,"</optgroup>");
|
||||||
"</option>",
|
fprintf (Gbl.F.Out,"<optgroup label=\"%s\">",DegShortName);
|
||||||
DegShortName);
|
|
||||||
LastDegCod = DegCod;
|
LastDegCod = DegCod;
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<option value=\"%ld\"",
|
fprintf (Gbl.F.Out,"<option value=\"%ld\"",
|
||||||
Gbl.Usrs.Me.MyCrss.Crss[NumMyCrs].CrsCod);
|
Gbl.Usrs.Me.MyCrss.Crss[NumMyCrs].CrsCod);
|
||||||
if (Gbl.CurrentCrs.Crs.CrsCod > 0 &&
|
if (CrsCod == Gbl.CurrentCrs.Crs.CrsCod) // Course selected
|
||||||
CrsCod == Gbl.CurrentCrs.Crs.CrsCod)
|
|
||||||
{
|
|
||||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
fprintf (Gbl.F.Out," selected=\"selected\"");
|
||||||
IBelongToCurrentCrs = true;
|
|
||||||
}
|
|
||||||
fprintf (Gbl.F.Out,">%s</option>",CrsShortName);
|
fprintf (Gbl.F.Out,">%s</option>",CrsShortName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (LastDegCod > 0)
|
||||||
|
fprintf (Gbl.F.Out,"</optgroup>");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Gbl.CurrentCrs.Crs.CrsCod > 0)
|
/***** Write an option with the current course
|
||||||
{
|
when I don't belong to it *****/
|
||||||
if (!IBelongToCurrentCrs)
|
if (Gbl.CurrentCrs.Crs.CrsCod > 0 && // Course selected
|
||||||
{
|
!Gbl.Usrs.Me.IBelongToCurrentCrs) // I do not belong to it
|
||||||
/***** Blank option to separate *****/
|
fprintf (Gbl.F.Out,"<option value=\"%ld\""
|
||||||
if (Gbl.Usrs.Me.MyCrss.Num)
|
" disabled=\"disabled\" selected=\"selected\">"
|
||||||
fprintf (Gbl.F.Out,"<option value=\"-1\" disabled=\"disabled\">"
|
"%s"
|
||||||
"------------"
|
"</option>",
|
||||||
"</option>");
|
|
||||||
|
|
||||||
/***** Write an option with the current course *****/
|
|
||||||
fprintf (Gbl.F.Out,"<option value=\"%ld\" selected=\"selected\">%s</option>",
|
|
||||||
Gbl.CurrentCrs.Crs.CrsCod,
|
Gbl.CurrentCrs.Crs.CrsCod,
|
||||||
Gbl.CurrentCrs.Crs.ShrtName);
|
Gbl.CurrentCrs.Crs.ShrtName);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/***** End form *****/
|
/***** End form *****/
|
||||||
fprintf (Gbl.F.Out,"</select>");
|
fprintf (Gbl.F.Out,"</select>");
|
||||||
|
|
|
@ -343,7 +343,7 @@ void Net_ShowFormMyWebsAndSocialNets (void)
|
||||||
Net_COL2_WIDTH);
|
Net_COL2_WIDTH);
|
||||||
Act_FormStart (ActChgMyNet);
|
Act_FormStart (ActChgMyNet);
|
||||||
Par_PutHiddenParamUnsigned ("Web",(unsigned) NumURL);
|
Par_PutHiddenParamUnsigned ("Web",(unsigned) NumURL);
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"URL\""
|
fprintf (Gbl.F.Out,"<input type=\"url\" name=\"URL\""
|
||||||
" style=\"width:500px;\" maxlength=\"%u\" value=\"%s\""
|
" style=\"width:500px;\" maxlength=\"%u\" value=\"%s\""
|
||||||
" onchange=\"document.getElementById('%s').submit();\" />",
|
" onchange=\"document.getElementById('%s').submit();\" />",
|
||||||
Cns_MAX_LENGTH_URL,URL,
|
Cns_MAX_LENGTH_URL,URL,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user