Skip to content

Commit

Permalink
S2U-16: Tests & Quizzes: Time limit per question or page (#11952)
Browse files Browse the repository at this point in the history
  • Loading branch information
frasese authored and Miguel Pellicer committed Nov 3, 2023
1 parent 9d48576 commit 8c02e1d
Show file tree
Hide file tree
Showing 60 changed files with 1,311 additions and 106 deletions.
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 @@ -475,6 +480,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;
}
}
}

.#{$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.
Original file line number Diff line number Diff line change
Expand Up @@ -896,3 +896,5 @@ no_answer.text = Unanswered
attachments.name = - Name:
audio.record = There is an audio recording
audio.no_record = There is no audio recording

timed=Timed
Original file line number Diff line number Diff line change
Expand Up @@ -890,3 +890,5 @@ no_answer.text = Sense Resposta
attachments.name = - Nom:
audio.record = Hi ha un Gravaci\u00f3 Audio
audio.no_record = No hi ha Gravaci\u00f3 Audio

timed=Temporitzat
Original file line number Diff line number Diff line change
Expand Up @@ -891,3 +891,5 @@ no_answer.text = Sin Respuesta
attachments.name = - Nombre:
audio.record = Hay una grabaci\u00f3n de audio
audio.no_record = No hay ninguna grabaci\u00f3n de audio

timed=Temporizado
Original file line number Diff line number Diff line change
Expand Up @@ -859,3 +859,5 @@ no_answer.text = Erantzun Gabe
attachments.name = - Izena:
audio.record = Audio grabaketa bat dago
audio.no_record = Ez dago audio grabaketarik

timed=Timed
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
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
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,13 @@ public class ItemBean
private boolean hasFavoriteList=false;
private ArrayList currentFavoriteList;

@Getter @Setter
private boolean timedQuestion = false;
@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 +2009,23 @@ public String getSiteId() {
return siteId;
}
}

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

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

//"timeLimit" is a virtual variable in seconds, calculated from timedHours & timedMinutes
public Integer getTimeLimit() {
return timedHours*3600 + timedMinutes*60;
}

//"timeLimit" is a virtual variable in seconds, calculated from timedHours & timedMinutes
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,9 @@ public class SectionBean implements Serializable {

private String outcome;

private boolean timedSection = false;
private Integer timedHours = 0;
private Integer timedMinutes = 0;

private List attachmentList;

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

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;
}

//"timeLimit" is a virtual variable in seconds, calculated from timedHours & timedMinutes
public Integer getTimeLimit() {
return timedHours*3600 + timedMinutes*60;
}

//"timeLimit" is a virtual variable in seconds, calculated from timedHours & timedMinutes
public void setTimeLimit(Integer timeLimit) {
this.timedHours = timeLimit/60/60;
this.timedMinutes = (timeLimit/60)%60;
}
}
Loading

0 comments on commit 8c02e1d

Please sign in to comment.