Update intervention locale and add explanation
This commit is contained in:
@@ -857,7 +857,9 @@ var CodeOceanEditor = {
|
||||
clearInterval(tid);
|
||||
// timeUntilIntervention passed
|
||||
if (editor.data('tips-interventions')) {
|
||||
$('#tips-intervention-modal').modal('show');
|
||||
const modal = $('#tips-intervention-modal');
|
||||
modal.find('.modal-footer').text(I18n.t("exercises.implement.intervention.explanation", {duration: Math.round(percentile75 / 60)}));
|
||||
modal.modal('show');
|
||||
$.ajax({
|
||||
data: {
|
||||
intervention_type: 'TipsIntervention'
|
||||
@@ -867,7 +869,9 @@ var CodeOceanEditor = {
|
||||
url: interventionSaveUrl
|
||||
});
|
||||
} else if (editor.data('break-interventions')) {
|
||||
$('#break-intervention-modal').modal('show');
|
||||
const modal = $('#break-intervention-modal');
|
||||
modal.find('.modal-footer').text(I18n.t("exercises.implement.intervention.explanation", {duration: Math.round(percentile75 / 60)}));
|
||||
modal.modal('show');
|
||||
$.ajax({
|
||||
data: {
|
||||
intervention_type: 'BreakIntervention'
|
||||
@@ -881,7 +885,12 @@ var CodeOceanEditor = {
|
||||
// only show intervention if user did not requested for a comment already
|
||||
if (!button.prop('disabled')) {
|
||||
$('#rfc_intervention_text').show();
|
||||
$('#comment-modal').modal('show');
|
||||
modal = $('#comment-modal');
|
||||
modal.find('.modal-footer').text(I18n.t("exercises.implement.intervention.explanation", {duration: Math.round(percentile75 / 60)}));
|
||||
modal.on('hidden.bs.modal', function () {
|
||||
modal.find('.modal-footer').text('');
|
||||
});
|
||||
modal.modal('show');
|
||||
$.ajax({
|
||||
data: {
|
||||
intervention_type: 'QuestionIntervention'
|
||||
|
@@ -1,10 +1,10 @@
|
||||
h5#rfc_intervention_text style='display: none;' = raw t('exercises.implement.rfc_intervention.text')
|
||||
h5 = raw t('exercises.implement.comment.question')
|
||||
#rfc_intervention_text style='display: none;' == t('exercises.implement.rfc_intervention.text')
|
||||
== t('exercises.implement.comment.question')
|
||||
|
||||
|
||||
textarea.form-control.flex-grow-1#question(style='resize:none;')
|
||||
textarea.form-control.flex-grow-1#question(style='resize:none; height: 15vh;')
|
||||
p = ''
|
||||
/ data-cause='requestComments' is not used here right now, we pass the button #requestComments (not askForCommentsButton) as initiator of the action.
|
||||
/ data-cause='requestComments' is not used here right now, we pass the button #requestComments (not askForCommentsButton) as initiator of the action.
|
||||
/ But if we use this button, it will work since the correct cause is supplied
|
||||
div
|
||||
button#askForCommentsButton.btn.btn-block.btn-primary(type='button' data-cause='requestComments' data-message-success=t('exercises.editor.request_for_comments_sent')) =t('exercises.implement.comment.request')
|
||||
|
@@ -1 +1 @@
|
||||
h5 = t('exercises.implement.break_intervention.text')
|
||||
== t('exercises.implement.break_intervention.text')
|
||||
|
@@ -1,3 +1,3 @@
|
||||
h5 == t('exercises.implement.tips_intervention.text')
|
||||
== t('exercises.implement.tips_intervention.text')
|
||||
|
||||
= render(partial: 'exercises/tips_content')
|
||||
|
Reference in New Issue
Block a user