Version19.82.1

This commit is contained in:
Antonio Cañas Vargas 2019-12-03 15:39:48 +01:00
parent 27e4653e5a
commit 5233b622e2
5 changed files with 29 additions and 30 deletions

View File

@ -490,7 +490,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
En OpenSWAD:
ps2pdf source.ps destination.pdf
*/
#define Log_PLATFORM_VERSION "SWAD 19.82 (2019-12-03)"
#define Log_PLATFORM_VERSION "SWAD 19.82.1 (2019-12-03)"
#define CSS_FILE "swad19.82.css"
#define JS_FILE "swad19.70.js"
/*
@ -498,6 +498,9 @@ ps2pdf source.ps destination.pdf
// TODO: Impedir la creación y edición de proyectos si no son editables.
// TODO: En cada juego, poder listar los resultados en una tabla como la de resultados globales
Version 19.82.1: Dec 03, 2019 Fixed bug in surveys.
Fixed bug in statistics.
Fixed bug in matches. (247757 lines)
Version 19.82: Dec 03, 2019 Changes in feedback in matches. (247758 lines)
2 changes necessary in database:
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1808','es','N','Ver mi respuesta a pregunta en partida');

View File

@ -1628,10 +1628,10 @@ static void Mch_UpdateMatchStatusInDB (struct Match *Match)
char MchSubQuery[Mch_MAX_BYTES_SUBQUERY];
/***** Update end time only if match is currently being played *****/
if (Match->Status.Playing)
if (Match->Status.Playing) // Match is being played
Str_Copy (MchSubQuery,"mch_matches.EndTime=NOW(),",
Mch_MAX_BYTES_SUBQUERY);
else
else // Match is paused, not being played
MchSubQuery[0] = '\0';
/***** Update match status in database *****/
@ -1653,10 +1653,10 @@ static void Mch_UpdateMatchStatusInDB (struct Match *Match)
Match->Status.ShowQstResults ? 'Y' : 'N',
Match->MchCod,Gbl.Hierarchy.Crs.CrsCod);
if (Match->Status.Playing)
if (Match->Status.Playing) // Match is being played
/* Update match as being played */
Mch_UpdateMatchAsBeingPlayed (Match->MchCod);
else
else // Match is paused, not being played
/* Update match as not being played */
Mch_SetMatchAsNotBeingPlayed (Match->MchCod);
}
@ -1668,7 +1668,7 @@ static void Mch_UpdateMatchStatusInDB (struct Match *Match)
static void Mch_UpdateElapsedTimeInQuestion (struct Match *Match)
{
/***** Update elapsed time in current question in database *****/
if (Match->Status.Playing &&
if (Match->Status.Playing && // Match is being played
Match->Status.QstInd > 0 &&
Match->Status.QstInd < Mch_AFTER_LAST_QUESTION)
DB_QueryINSERT ("can not update elapsed time in question",
@ -1774,18 +1774,12 @@ void Mch_PlayPauseMatch (void)
Mch_GetDataOfMatchByCod (&Match);
/***** Update status *****/
if (Match.Status.Playing) // match is being played ==> pause it
if (Match.Status.Playing) // Match is being played ==> pause it
Match.Status.Playing = false; // Pause match
else // match is paused ==> play it
{
else // Match is paused, not being played ==> play it
/* If unfinished, update status */
if (Match.Status.QstInd < Mch_AFTER_LAST_QUESTION) // Unfinished
{
// if (Match.Status.QstInd == 0) // Match has been created, but it has not started
// Mch_SetMatchStatusToNext (&Match);
Match.Status.Playing = true; // Start/resume match
}
}
Match.Status.Playing = true; // Start/resume match
/***** Update match status in database *****/
Mch_UpdateMatchStatusInDB (&Match);
@ -2189,7 +2183,7 @@ static void Mch_ShowRefreshablePartTch (struct Match *Match)
HTM_Unsigned (NumAnswerersQst);
else
HTM_Hyphen ();
if (Match->Status.Playing)
if (Match->Status.Playing) // Match is being played
{
/* Get current number of players */
Mch_GetNumPlayers (Match);
@ -2245,8 +2239,9 @@ static void Mch_ShowLeftColumnStd (struct Match *Match,
/***** Write if question is answered *****/
Mch_PutIfAnswered (Match,Answered);
if (Match->Status.Showing == Mch_ANSWERS &&
Answered)
if (Match->Status.Playing && // Match is being played
Match->Status.Showing == Mch_ANSWERS && // Teacher's screen is showing question answers
Answered) // I have answered this question
/***** Put icon to view *****/
Mch_PutIconToRemoveMyAnswer (Match);
@ -2271,7 +2266,7 @@ static void Mch_ShowRightColumnStd (struct Match *Match,
Mch_ShowMatchTitle (Match);
/***** Bottom row *****/
if (Match->Status.Playing)
if (Match->Status.Playing) // Match is being played
{
if (Match->Status.QstInd < Mch_AFTER_LAST_QUESTION) // Match not over
{
@ -2289,7 +2284,7 @@ static void Mch_ShowRightColumnStd (struct Match *Match,
else // Match over
Mch_ShowWaitImage (Txt_Please_wait_);
}
else // Not being played
else // Match is not being played
Mch_ShowWaitImage (Txt_Please_wait_);
/***** End right container *****/
@ -2344,11 +2339,11 @@ static void Mch_PutMatchControlButtons (struct Match *Match)
/***** Center button *****/
HTM_DIV_Begin ("class=\"MCH_BUTTON_CENTER_CONTAINER\"");
if (Match->Status.Playing) // Being played
if (Match->Status.Playing) // Match is being played
/* Put button to pause match */
Mch_PutBigButton (ActPlyPauMch,"play_pause",Match->MchCod,
Mch_ICON_PAUSE,Txt_Pause);
else // Paused
else // Match is paused, not being played
{
if (Match->Status.QstInd < Mch_AFTER_LAST_QUESTION) // Not finished
/* Put button to play match */
@ -2621,12 +2616,12 @@ static void Mch_ShowQuestionAndAnswersTch (struct Match *Match)
/* Don't write anything */
break;
case Mch_ANSWERS:
if (Match->Status.Playing) // Being played
if (Match->Status.Playing) // Match is being played
/* Write answers */
Mch_WriteAnswersMatchResult (Match,
"MCH_TCH_ANS",
false); // Don't show result
else // Not being played
else // Match is paused, not being played
Mch_ShowWaitImage (Txt_MATCH_Paused);
break;
case Mch_RESULTS:
@ -3107,7 +3102,7 @@ bool Mch_RegisterMeAsPlayerInMatch (struct Match *Match)
return false;
/***** Trivial check: match must be being played *****/
if (!Match->Status.Playing) // Not playing
if (!Match->Status.Playing) // Match is paused, not being played
return false;
/***** Trivial check: match must not be over *****/
@ -3172,7 +3167,8 @@ void Mch_RemoveQuestionAnswer (void)
/***** Check that teacher's screen is showing answers
and question index is the current one being played *****/
if (Match.Status.Showing == Mch_ANSWERS && // Teacher's screen is showing answers
if (Match.Status.Playing && // Match is being played
Match.Status.Showing == Mch_ANSWERS && // Teacher's screen is showing answers
QstInd == Match.Status.QstInd) // Removing answer to the current question being played
/***** Remove answer to this question *****/
Mch_RemoveAnswerToMatchQuestion (&Match);

View File

@ -2263,7 +2263,7 @@ static void Pho_ShowOrPrintListDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrint)
HTM_TD_Begin ("class=\"DAT LM COLOR%u\"",Gbl.RowEvenOdd);
if (SeeOrPrint == Pho_DEGREES_SEE)
Deg_DrawDegreeLogoAndNameWithLink (&Deg,ActSeeDegInf,
"DAT","CT");
"BT_LINK DAT","CT");
else // Pho_DEGREES_PRINT
{
Log_DrawLogo (Hie_DEG,Deg.DegCod,Deg.ShrtName,20,"CT",true);
@ -2277,7 +2277,7 @@ static void Pho_ShowOrPrintListDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrint)
{
/***** Show average photo of students belonging to this degree *****/
Pho_GetNumStdsInDegree (Deg.DegCod,Sex,&NumStds,&NumStdsWithPhoto);
HTM_TD_Begin ("class=\"CLASSPHOTO CM COLOR%u\"",Gbl.RowEvenOdd);
HTM_TD_Begin ("class=\"CLASSPHOTO RM COLOR%u\"",Gbl.RowEvenOdd);
if (Gbl.Usrs.Listing.WithPhotos)
Pho_ShowDegreeAvgPhotoAndStat (&Deg,SeeOrPrint,Sex,NumStds,NumStdsWithPhoto);
else

View File

@ -3687,7 +3687,7 @@ static void Sta_WriteDegree (long DegCod)
/***** Form to go to degree *****/
Deg_DrawDegreeLogoAndNameWithLink (&Deg,ActSeeDegInf,
"LOG","CT");
"BT_LINK LOG","CT");
}
else // Hit with no degree selected
{

View File

@ -2778,7 +2778,7 @@ static void Svy_ShowFormEditOneQst (long SvyCod,struct SurveyQuestion *SvyQst,
/* Label with the number of the answer */
HTM_TD_Begin ("class=\"RT\"");
HTM_LABEL_Begin ("for=\"AnsStr%u\" class=\"%s\">",
HTM_LABEL_Begin ("for=\"AnsStr%u\" class=\"%s\"",
NumAns,The_ClassFormInBox[Gbl.Prefs.Theme]);
HTM_TxtF ("%u)",NumAns + 1);
HTM_LABEL_End ();