Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S2U-16: Tests & Quizzes: Time limit per question or page #11952

Merged
merged 14 commits into from
Oct 17, 2023
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@
padding: 0 0 0 0;
}
}
ul.ulTimed{
list-style: none;
padding: 0 0 0 0;
}
.mcscFixUp > ul,.question-wrapper{
list-style: none;
padding: 0 0 0 0;
Expand Down Expand Up @@ -207,7 +211,8 @@
}

#assessmentSettingsAction input[type="radio"],
#assessmentSettingsAction input[type="checkbox"]{
#assessmentSettingsAction input[type="checkbox"],
.ulTimed input[type="radio"]{
margin-right: $standard-space;

@media #{$tablet}{
Expand Down Expand Up @@ -487,6 +492,21 @@
input[type="text"].hasDatepicker {
margin: 0 4px 4px 0;
}

.time-bar-container {
margin-top: 1em;
}

.time-bar-button-container{
margin-bottom: 1em;
}

.tableofcontents {
label {
padding-left: 5px;
cursor:pointer;
frasese marked this conversation as resolved.
Show resolved Hide resolved
}
}
}

.#{$namespace}sakai-samigo, .#{$namespace}toolBody--sakai-samigo {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public class ItemGradingData implements java.io.Serializable {
private String rationale;
private Boolean review;
private Date submittedDate;
private Date attemptDate;

public ItemGradingData() {}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/**********************************************************************************
* $URL$
* $Id$
***********************************************************************************
*
* Copyright (c) 2023 The Sakai Foundation
*
* Licensed under the Educational Community License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/licenses/ECL-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
**********************************************************************************/

package org.sakaiproject.tool.assessment.data.dao.grading;

import java.util.Date;

import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.NoArgsConstructor;

@Getter
@Setter
@NoArgsConstructor
@EqualsAndHashCode
public class SectionGradingData implements java.io.Serializable {

private static final long serialVersionUID = 1L;

private Long sectionGradingId;
private Long assessmentGradingId;
private Long publishedSectionId;
private String agentId;
private Date attemptDate;
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ public interface ItemMetaDataIfc
public static final String SURVEY_YESNO= "YESNO";
public static final String SURVEY_SCALEFIVE= "SCALEFIVE";
public static final String SURVEY_SCALETEN= "SCALETEN";

public static final String TIMED = "QUESTION_TIMED";


Long getId();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public interface SectionMetaDataIfc
public static final String OBJECTIVES = "SECTION_OBJECTIVES";
public static final String RUBRICS = "SECTION_RUBRICS";
public static final String ATTACHMENTS = "ATTACHMENTS";
public static final String TIMED = "SECTION_TIMED";

Long getId();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,3 +445,9 @@ not be validated automatically

# S2U-5
associate_label_dyn=Create a dynamic rubric to grade this question

# S2U-16
part_timed_info=If timed, students have until the end of the time limit, or until the Final Submission Deadline, whichever comes first, to submit their work. Their answers will be automatically saved and submitted at the expiration of the timer.
question_timed_info=If timed, students have until the end of the time limit, or until the Final Submission Deadline, whichever comes first, to submit their work. Their answers will be automatically saved and submitted at the expiration of the timer.
part_timeSelect_error=Please specify a time limit in hours and/or minutes, or select the "No" option.
question_timeSelect_error=Please specify a time limit in hours and/or minutes, or select the "No" option.
Original file line number Diff line number Diff line change
Expand Up @@ -442,3 +442,9 @@ no pot ser validada autom\u00e0ticament

# S2U-5
associate_label_dyn=Crear una r\u00fabrica din\u00e0mica per a qualificar aquesta pregunta

# S2U-16
part_timed_info=Si la prova \u00e9s cronometrada, els estudiants podran fer el lliurament fins a exhaurir el temps fixat a la part o b\u00e9 fins a la data l\u00edmit final per als lliuraments, el que arribi abans. En exhaurir el temps disponible les seves respostes seran autom\u00e0ticament desades i lliurades.
question_timed_info=Si la prova \u00e9s cronometrada, els estudiants podran fer el lliurament fins a exhaurir el temps fixat a la pregunta o b\u00e9 fins a la data l\u00edmit final per als lliuraments, el que arribi abans. En exhaurir el temps disponible les seves respostes seran autom\u00e0ticament desades i lliurades.
part_timeSelect_error=Cal que especifiqueu un temps l\u00edmit en hores i/o minuts o b\u00e9 que seleccioneu l\u2019opci\u00f3 "No".
question_timeSelect_error=Cal que especifiqueu un temps l\u00edmit en hores i/o minuts o b\u00e9 que seleccioneu l\u2019opci\u00f3 "No".
Original file line number Diff line number Diff line change
Expand Up @@ -449,3 +449,9 @@ no se puede validar autom\u00e1ticamente

# S2U-5
associate_label_dyn=Crear una r\u00fabrica din\u00e1mica para evaluar esta pregunta

# S2U-16
part_timed_info=Si est\u00e1 temporizado, los estudiantes tienen de tiempo bien hasta que se acabe la temporizaci\u00f3n de la parte o bien cuando se llegue a la fecha de entrega. Sus respuestas ser\u00e1n guardadas y enviadas autom\u00e1ticamente.
question_timed_info=Si est\u00e1 temporizado, los estudiantes tienen de tiempo bien hasta que se acabe la temporizaci\u00f3n de la pregunta o bien cuando se llegue a la fecha de entrega. Sus respuestas ser\u00e1n guardadas y enviadas autom\u00e1ticamente.
part_timeSelect_error=Por favor, especifique un l\u00edmite de tiempo para la parte temporizada, o seleccione la opci\u00f3n "No"
question_timeSelect_error=Por favor, especifique un l\u00edmite de tiempo para la pregunta temporizada, o seleccione la opci\u00f3n "No"
Original file line number Diff line number Diff line change
Expand Up @@ -389,3 +389,9 @@ seb_exam_keys_recommended=Azterketara sartzeko pasahitza jartzea gomendagarria d

# S2U-5
associate_label_dyn=Sortu errubrika dinamikoa galdera hau kalifikatzeko

# S2U-16
part_timed_info=If timed, students have until the end of the time limit, or until the Final Submission Deadline, whichever comes first, to submit their work. Their answers will be automatically saved and submitted at the expiration of the timer.
question_timed_info=If timed, students have until the end of the time limit, or until the Final Submission Deadline, whichever comes first, to submit their work. Their answers will be automatically saved and submitted at the expiration of the timer.
part_timeSelect_error=Please specify a time limit in hours and/or minutes, or select the "No" option.
question_timeSelect_error=Please specify a time limit in hours and/or minutes, or select the "No" option.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PabloSanRoman could you please translate this? Thanks!

Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,7 @@ random_draw_msg=The questions for this part were generated from the question poo
random_draw_msg_published=The questions for this part were generated from the question pool, <b>{0}</b>, on <b>{1}</b> at <b>{2}</b>. To edit the questions in this part, click <b>Edit Questions</b>.
random_draw_msg_no_date=The questions for this part are generated randomly from a question pool. Click Preview Assessment to see a sample random draw.
random_update_questions=Update Questions
timed=Timed
frasese marked this conversation as resolved.
Show resolved Hide resolved

# for upload questions in editAssessment.jsp
upload_instruction=Choose a file to upload.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ random_draw_msg=Les preguntes d\u2019aquesta part s\u2019han generat a partir de
random_draw_msg_published=Les preguntes d\u2019aquesta part s\u2019han generat aleat\u00f2riament a partir del fons de preguntes, <b>{0}</b>, a <b>{1}</b> de <b>{2}</b>. Per editar les preguntes d\u2019aquesta part, feu clic a <b>Edita les preguntes</b>.
random_draw_msg_no_date=Les preguntes d\u2019aquesta part s\u2019han generat aleat\u00f2riament a partir d\u2019un fons de preguntes. Feu clic a \u2019Previsualitza la prova\u2019 per veure una bateria de preguntes d\u2019exemple generada aleat\u00f2riament.
random_update_questions=Actualitza les preguntes
timed=Temporitzat

# for upload questions in editAssessment.jsp
upload_instruction=Escolliu un fitxer per a pujar.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ random_draw_msg=Las preguntas de esta parte son generadas aleatoriamente a parti
random_draw_msg_published=Las preguntas de esta parte se generaron desde la bater\u00eda de preguntas, <b>{0}</b>, en <b>{1}</b> en <b>{2}</b>. Para editar las preguntas en esta parte, haga clic en <b>Editar preguntas</b>.
random_draw_msg_no_date=Las preguntas de esta parte son generadas aleatoriamente a partir de una bater\u00eda de preguntas. Haga clic en Vista previa para ver un ejemplo.
random_update_questions=Actualizar preguntas
timed=Temporizado

# for upload questions in editAssessment.jsp
upload_instruction=Elija un archivo para cargar.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,7 @@ random_draw_msg=Parte honetako galderak ausaz sortzen dira galdera-biltzaile bat
random_draw_msg_published=Parte honetako galderak galderen gordailuak sortu ditu, <b>{0}</b>, on <b>{1}</b> at <b>{2}</b>. Parte honetako galderak editatzeko, egin klik hemen\: <b>Editatu galderak</b>.
random_draw_msg_no_date=Parte honetako galderak ausaz sortzen dira galdera gordailu batetik. Egin klik \u2018Aurreko azterketa\u2019 dioen tokian lagin bat ausaz ateratzeko.
random_update_questions=Eguneratu galderak
timed=Timed
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PabloSanRoman could you please translate this? Thanks!


# for upload questions in editAssessment.jsp
upload_instruction=Klikatu "Nabigatzailea" zure fitxategia kokatzeko, eta gero klikatu "Igo" zure fitxategia kargatzeko.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -626,3 +626,15 @@ seb_download_seb=Download Safe Exam Browser
seb_launch_seb=Launch Safe Exam Browser
seb_quit_browser=Quit Safe Exam Browser
seb_preview_info=Assessments that are configured to use Safe Exam Browser can not be previewed.

#S2U-16 Timed Part/Question
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @PabloSanRoman, I just found more missing properties for S2U-16. Could you translate them as well please?

timed=Timed

timer_start=Start
partTimer_title=Time remaining for this part
partTimer_info_start=Timed part. Once you click \"Start\" you will have <b>{0}</b> to complete this part. It will be <b>submitted at that time</b>, regardless of whether you have answered all the questions.
partTimer_info_start_deadline=Timed part. Once you click \"Start\" you will have <b>{0} or until {1} whichever is shorter</b> to complete this part. It will be <b>submitted at that time</b>, regardless of whether you have answered all the questions.
partTimer_info_end=The time allowed for this part has expired.
questionTimer_title=Time remaining for this question
questionTimer_info_start=Timed question. Once you click \"Start\" you will have <b>{0}</b> to complete this question. It will be <b>submitted at that time</b>, regardless of whether you have answered it.
questionTimer_info_start_deadline=Timed question. Once you click \"Start\" you will have <b>{0} or until {1} whichever is shorter</b> to complete this question. It will be <b>submitted at that time</b>, regardless of whether you have answered it.
questionTimer_info_end=The time allowed for this question has expired.
title_not_available=Title not available yet

part_timed_info=If timed, students have until the end of the time limit, or until the Final Submission Deadline, whichever comes first, to submit their work. Their answers will be automatically saved and submitted at the expiration of the timer.
question_timed_info=If timed, students have until the end of the time limit, or until the Final Submission Deadline, whichever comes first, to submit their work. Their answers will be automatically saved and submitted at the expiration of the timer.
part_timeSelect_error=Please specify a time limit in hours and/or minutes, or select the "No" option.
question_timeSelect_error=Please specify a time limit in hours and/or minutes, or select the "No" option.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @stetsche , here they are:
timed=Tenporizatua

timer_start=Hasi
partTimer_title=Falta den denbora parte honetan
partTimer_info_start=Parte tenporizatua. "Hasi" botoia sakatu ondoren {0} izango duzu parte hau bukatzeko. Une horretan bidaliko da, galdera guztiak erantzun dituzun edo ez alde batera utzita.
partTimer_info_start_deadline= Parte tenporizatua. "Hasi" botoia sakatu ondoren {0} izango duzu partea bukatzeko, edo data hau arte, {1}, (lehenengo gertatzen dena). Une horretan bidaliko da, galdera guztiak erantzun dituzun edo ez alde batera utzita.
partTimer_info_end=Amaitu da parte hau egiteko denbora.
questionTimer_title=Galdera honetarako geratzen den denbora
questionTimer_info_start=Galdera tenporizatua. "Hasi" botoia sakatu ondoren, {0} izango duzu galderari erantzuteko. Une horretan bidaliko da, erantzun duzun edo ez alde batera utzita.
questionTimer_info_start_deadline=Galdea tenporizatua. "Hasi" botoia sakatu ondoren {0} izango duzu galderari erantzuteko, edo data hau arte, {1}, (lehenengo gertatzen dena). Une horretan bidaliko da, erantzun duzun edo ez alde batera utzita.
questionTimer_info_end=Galdera hau egiteko denbora agortu da.
title_not_available=Titulua ez dago erabilgarria oraindik

part_timed_info=Parte hau tenporizatuta badago ikasleek azterketa bidali ahalko dute denbora-muga hori amaitu arte edo azterketaren "Entregatzeko data berantiarra" arte, lehenengo gertatzen dena. Erantzunak automatikoki gorde eta bidaliko dira tenporizadorea amaitzen denean.
question_timed_info=Tenporizatuta badago, ikasleek azterketa bidali ahalko dute denbora-muga hori amaitu arte edo azterketaren "Entregatzeko data berantiarra" arte, lehenengo gertatzen dena. Erantzunak automatikoki gorde eta bidaliko dira tenporizadorea amaitzen denean.
part_timeSelect_error=Zehaztu denbora-muga bat ordu eta/edo minututan, edo hautatu "Ez" aukera.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @PabloSanRoman !

timer_start=Start
partTimer_title=Time remaining for this part
partTimer_info_start=Timed part. Once you click \"Start\" you will have <b>{0}</b> to complete this part. It will be <b>submitted at that time</b>, regardless of whether you have answered all the questions.
partTimer_info_start_deadline=Timed part. Once you click \"Start\" you will have <b>{0} or until {1} whichever is shorter</b> to complete this part. It will be <b>submitted at that time</b>, regardless of whether you have answered all the questions.
partTimer_info_end=The time allowed for this part has expired.
questionTimer_title=Time remaining for this question
questionTimer_info_start=Timed question. Once you click \"Start\" you will have <b>{0}</b> to complete this question. It will be <b>submitted at that time</b>, regardless of whether you have answered it.
questionTimer_info_start_deadline=Timed question. Once you click \"Start\" you will have <b>{0} or until {1} whichever is shorter</b> to complete this question. It will be <b>submitted at that time</b>, regardless of whether you have answered it.
questionTimer_info_end=The time allowed for this question has expired.
title_not_available=Title not available yet
Original file line number Diff line number Diff line change
Expand Up @@ -620,3 +620,16 @@ seb_download_seb=Descarregar Safe Exam Browser
seb_launch_seb=Executar Safe Exam Browser
seb_quit_browser=Eixir de Safe Exam Browser
seb_preview_info=Les proves que estan configurades per utilitzar Safe Exam Browser no es poden previsualitzar.


#S2U-16 Timed Part/Question
timer_start=Comen\u00e7ar
partTimer_title=Temps restant per a aquesta part
partTimer_info_start=Part temporitzada. Un cop feu clic a "Comen\u00e7ar", tindreu <b>{0}</b> per completar la part. La part <b>es lliurar\u00e0 quan s\u2019esgoti el termini</b>, sense tenir en compte si heu contestat totes les preguntes.
partTimer_info_start_deadline=Part temporitzada. Un cop feu clic a "Comen\u00e7ar", tindreu <b>{0} o fins a {1}, el que sigui m\u00e9s curt</b> per completar la part. La part <b>es lliurar\u00e0 quan s\u2019esgoti el termini</b>, sense tenir en compte si heu contestat totes les preguntes.
partTimer_info_end=El temps perm\u00E9s per a aquesta part ha expirat.
questionTimer_title=Temps restant per a aquesta pregunta
questionTimer_info_start=Pregunta temporitzada. Un cop feu clic a "Comen\u00e7ar", tindreu <b>{0}</b> per completar la pregunta. La pregunta <b>es lliurar\u00e0 quan s\u2019esgoti el termini</b>, sense tenir en compte si heu contestat.
questionTimer_info_start_deadline=Pregunta temporitzada. Un cop feu clic a "Comen\u00e7ar", tindreu <b>{0} o fins a {1}, el que sigui m\u00e9s curt</b> per completar la pregunta. La pregunta <b>es lliurar\u00e0 quan s\u2019esgoti el termini</b>, sense tenir en compte si heu contestat.
questionTimer_info_end=El temps perm\u00E9s per a aquesta pregunta ha expirat.
title_not_available=T\u00EDtol encara no disponible
Original file line number Diff line number Diff line change
Expand Up @@ -611,3 +611,15 @@ seb_download_seb=Descargar Safe Exam Browser
seb_launch_seb=Ejecutar Safe Exam Browser
seb_quit_browser=Salir de Safe Exam Browser
seb_preview_info=Los ex\u00e1menes configurados para utilizar Safe Exam Browser no se pueden previsualizar.

#S2U-16 Timed Part/Question
timer_start=Comenzar
partTimer_title=Tiempo restante para esta parte
partTimer_info_start=Parte temporizada. Una vez haga clic en "Comenzar", tendr\u00e1 <b>{0}</b> para poder completar esta parte. Ser\u00e1 <b>enviada transcurrido ese tiempo</b>, independientemente de si ha respondido todas las preguntas.
partTimer_info_start_deadline=Parte temporizada. Una vez haga clic en "Comenzar", tendr\u00e1 <b>{0} o hasta el {1}, lo que sea m\u00E1s corto</b> para poder completar esta parte. Ser\u00e1 <b>enviada transcurrido ese tiempo</b>, independientemente de si ha respondido todas las preguntas.
partTimer_info_end=El tiempo permitido para esta parte ha expirado.
questionTimer_title=Tiempo restante para esta pregunta
questionTimer_info_start=Pregunta temporizada. Una vez haga clic en "Comenzar", tendr\u00e1 <b>{0}</b> para poder completar esta pregunta. Ser\u00e1 <b>enviada transcurrido ese tiempo</b>, independientemente de si ha respondido.
questionTimer_info_start_deadline=Pregunta temporizada. Una vez haga clic en "Comenzar", tendr\u00e1 <b>{0} o hasta el {1}, lo que sea m\u00E1s corto</b> para poder completar esta pregunta. Ser\u00e1 <b>enviada transcurrido ese tiempo</b>, independientemente de si ha respondido.
questionTimer_info_end=El tiempo permitido para esta pregunta ha expirado.
title_not_available=T\u00EDtulo todav\u00EDa no disponible
mpellicer marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -578,3 +578,15 @@ seb_download_seb=Deskargatu Safe Exam Browser
seb_launch_seb=Exekutatu Safe Exam Browser
seb_quit_browser=Atera nabigatzaile segurutik (Safe Exam Browser)
seb_preview_info=Ezin dira aurreikusi Safe Exam Browserako konfiguratutako azterketak.

#S2U-16 Timed Part/Question
timer_start=Start
partTimer_title=Time remaining for this part
partTimer_info_start=Timed part. Once you click \"Start\" you will have <b>{0}</b> to complete this part. It will be <b>submitted at that time</b>, regardless of whether you have answered all the questions.
partTimer_info_start_deadline=Timed part. Once you click \"Start\" you will have <b>{0} or until {1} whichever is shorter</b> to complete this part. It will be <b>submitted at that time</b>, regardless of whether you have answered all the questions.
partTimer_info_end=The time allowed for this part has expired.
questionTimer_title=Time remaining for this question
questionTimer_info_start=Timed question. Once you click \"Start\" you will have <b>{0}</b> to complete this question. It will be <b>submitted at that time</b>, regardless of whether you have answered it.
questionTimer_info_start_deadline=Timed question. Once you click \"Start\" you will have <b>{0} or until {1} whichever is shorter</b> to complete this question. It will be <b>submitted at that time</b>, regardless of whether you have answered it.
questionTimer_info_end=The time allowed for this question has expired.
title_not_available=Title not available yet
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,15 @@ public class ItemBean
private boolean hasFavoriteList=false;
private ArrayList currentFavoriteList;

//S2U-16
frasese marked this conversation as resolved.
Show resolved Hide resolved
@Getter @Setter
private boolean timedQuestion = false;
//"timeLimit" is a virtual variable in seconds, calculated from timedHours & timedMinutes
frasese marked this conversation as resolved.
Show resolved Hide resolved
@Getter
private Integer timedHours = 0;
@Getter
private Integer timedMinutes = 0;

private static final ResourceLoader RB_AUTHOR_MESSAGES = new ResourceLoader("org.sakaiproject.tool.assessment.bundle.AuthorMessages");

/**
Expand Down Expand Up @@ -2002,4 +2011,24 @@ public String getSiteId() {
return siteId;
}
}

//S2U-16
frasese marked this conversation as resolved.
Show resolved Hide resolved
public void setTimedHours(Integer timedHours) {
this.timedHours = (timedHours != null) ? timedHours : 0;
}

public void setTimedMinutes(Integer timedMinutes) {
this.timedMinutes = (timedMinutes != null) ? timedMinutes : 0;
}

//calculated
public Integer getTimeLimit() {
return timedHours*3600 + timedMinutes*60;
}

//calculated
public void setTimeLimit(Integer timeLimit) {
this.timedHours = timeLimit/60/60;
this.timedMinutes = (timeLimit/60)%60;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
import org.sakaiproject.tool.assessment.data.ifc.assessment.AssessmentIfc;
import org.sakaiproject.tool.assessment.data.ifc.assessment.AttachmentIfc;
import org.sakaiproject.tool.assessment.data.ifc.assessment.SectionDataIfc;
import org.sakaiproject.tool.assessment.data.ifc.assessment.SectionMetaDataIfc;
import org.sakaiproject.tool.assessment.facade.AgentFacade;
import org.sakaiproject.tool.assessment.facade.QuestionPoolFacade;
import org.sakaiproject.tool.assessment.facade.SectionFacade;
Expand Down Expand Up @@ -111,6 +112,11 @@ public class SectionBean implements Serializable {

private String outcome;

//S2U-16
frasese marked this conversation as resolved.
Show resolved Hide resolved
private boolean timedSection = false;
//"timeLimit" is a virtual variable in seconds, calculated from timedHours & timedMinutes
private Integer timedHours = 0;
private Integer timedMinutes = 0;

private List attachmentList;

Expand Down Expand Up @@ -958,4 +964,40 @@ public void setDiscountValueHasOverrided(boolean discountValueHasOverrided)
{
this.discountValueHasOverrided = discountValueHasOverrided;
}

//S2U-16
public boolean isTimedSection() {
return this.timedSection;
}

public void setTimedSection(boolean timed) {
this.timedSection = timed;
}

public void setTimedHours(Integer timedHours) {
this.timedHours = (timedHours != null) ? timedHours : 0;
}

public Integer getTimedHours() {
return timedHours;
}

public void setTimedMinutes(Integer timedMinutes) {
this.timedMinutes = (timedMinutes != null) ? timedMinutes : 0;
}

public Integer getTimedMinutes() {
return timedMinutes;
}

//calculated
public Integer getTimeLimit() {
return timedHours*3600 + timedMinutes*60;
}

//calculated
public void setTimeLimit(Integer timeLimit) {
this.timedHours = timeLimit/60/60;
this.timedMinutes = (timeLimit/60)%60;
}
}
Loading
Loading