From 02be89e86ed4f53cc567c93f76b342e22b452f55 Mon Sep 17 00:00:00 2001 From: Nathan Wallach Date: Mon, 11 Jul 2022 14:06:29 +0300 Subject: [PATCH 1/3] Some small changes to what should be translated and to some strings provided for translation. --- lib/WeBWorK/ContentGenerator/Instructor/SendMail.pm | 4 ++-- .../ContentGenerator/Instructor/StudentProgress.pm | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/WeBWorK/ContentGenerator/Instructor/SendMail.pm b/lib/WeBWorK/ContentGenerator/Instructor/SendMail.pm index af99193f63..9eb543eb0b 100644 --- a/lib/WeBWorK/ContentGenerator/Instructor/SendMail.pm +++ b/lib/WeBWorK/ContentGenerator/Instructor/SendMail.pm @@ -696,8 +696,8 @@ sub print_form { name => 'send_to', values => [ 'all_students', 'studentID' ], labels => { - all_students => $r->maketext('all'), - studentID => $r->maketext('selected') + all_students => $r->maketext('all students'), + studentID => $r->maketext('selected students') }, default => $r->param('send_to') // 'studentID', linebreak => 0, diff --git a/lib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm b/lib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm index 8967278b6a..d57b14e9af 100644 --- a/lib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm +++ b/lib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm @@ -513,13 +513,13 @@ sub displaySets { last_name => $studentRecord->last_name(), first_name => $studentRecord->first_name(), score => 0, - total => $r->maketext('n/a'), + total => 'n/a', section => $studentRecord->section(), recitation => $studentRecord->recitation(), problemsRow => [$r->maketext('no attempt recorded')], email_address => $studentRecord->email_address(), - date => $r->maketext('none'), - testtime => $r->maketext('none'), + date => 'n/a', + testtime => 'n/a', }; } @@ -534,13 +534,13 @@ sub displaySets { last_name => $studentRecord->last_name(), first_name => $studentRecord->first_name(), score => 0, - total => $r->maketext('n/a'), + total => 'n/a', section => $studentRecord->section(), recitation => $studentRecord->recitation(), problemsRow => [' '], email_address => $studentRecord->email_address(), - date => $r->maketext('none'), - testtime => $r->maketext('none'), + date => 'n/a', + testtime => 'n/a', }; push(@score_list, 0); push(@augmentedUserRecords, $dataH); From 47ccbf041524c4bde1b6354cdaa0324fbe107569 Mon Sep 17 00:00:00 2001 From: Glenn Rice Date: Mon, 11 Jul 2022 07:05:02 -0500 Subject: [PATCH 2/3] Replace the "Sent do all/selected students" input group with separate radios. This is much better for translations. --- .../ContentGenerator/Instructor/SendMail.pm | 46 +++++++++++-------- 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/lib/WeBWorK/ContentGenerator/Instructor/SendMail.pm b/lib/WeBWorK/ContentGenerator/Instructor/SendMail.pm index 9eb543eb0b..0138d0d051 100644 --- a/lib/WeBWorK/ContentGenerator/Instructor/SendMail.pm +++ b/lib/WeBWorK/ContentGenerator/Instructor/SendMail.pm @@ -688,24 +688,34 @@ sub print_form { CGI::div( { class => 'col-md-6 mb-2' }, CGI::div( - { class => 'input-group input-group-sm mb-2' }, - CGI::span({ class => 'input-group-text' }, CGI::strong($r->maketext('Send to:'))), - CGI::div( - { class => 'input-group-text' }, - CGI::radio_group({ - name => 'send_to', - values => [ 'all_students', 'studentID' ], - labels => { - all_students => $r->maketext('all students'), - studentID => $r->maketext('selected students') - }, - default => $r->param('send_to') // 'studentID', - linebreak => 0, - class => 'form-check-input me-1', - labelattributes => { class => 'form-check-label mx-1' } - }) - ), - CGI::label({ for => 'classList', class => 'input-group-text' }, $r->maketext('students')), + { class => 'form-check' }, + CGI::input({ + name => 'send_to', + id => 'send_to_all', + value => 'all_students', + type => 'radio', + class => 'form-check-input', + (($r->param('send_to') // '') eq 'all_students') ? (checked => undef) : () + }), + CGI::label( + { for => 'send_to_all', class => 'form-check-label' }, + $r->maketext('Send to all students') + ) + ), + CGI::div( + { class => 'form-check' }, + CGI::input({ + name => 'send_to', + id => 'send_to_selected', + value => 'studentID', + type => 'radio', + class => 'form-check-input', + (!$r->param('send_to') || $r->param('send_to') eq 'studentID') ? (checked => undef) : () + }), + CGI::label( + { for => 'send_to_selected', class => 'form-check-label' }, + $r->maketext('Send to selected students') + ) ), CGI::div( { class => 'mb-2' }, From 2bec901a36394843ae80301aec1de17867238725 Mon Sep 17 00:00:00 2001 From: Nathan Wallach Date: Thu, 14 Jul 2022 12:07:19 +0300 Subject: [PATCH 3/3] Reword one phrase --- lib/WeBWorK/ContentGenerator/Instructor/SendMail.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/WeBWorK/ContentGenerator/Instructor/SendMail.pm b/lib/WeBWorK/ContentGenerator/Instructor/SendMail.pm index 0138d0d051..af689aeefe 100644 --- a/lib/WeBWorK/ContentGenerator/Instructor/SendMail.pm +++ b/lib/WeBWorK/ContentGenerator/Instructor/SendMail.pm @@ -714,7 +714,7 @@ sub print_form { }), CGI::label( { for => 'send_to_selected', class => 'form-check-label' }, - $r->maketext('Send to selected students') + $r->maketext('Send to the students selected below') ) ), CGI::div(