Skip to content

Fix to issue #13 #17

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion classes/controllers/responses.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function handle_request() {
case 'regradeall':

$this->RTQ->get_grader()->save_all_grades();
$this->RTQ->get_renderer()->setMessage('success', 'Successfully re-graded quiz');
$this->RTQ->get_renderer()->setMessage('success', get_string('regradeallgradessuccess', 'activequiz'));
$sessions = $this->RTQ->get_sessions();
$this->RTQ->get_renderer()->responses_header();
$this->RTQ->get_renderer()->select_session($sessions);
Expand Down
10 changes: 5 additions & 5 deletions js/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ activequiz.waitfor_question = function (questionid, questiontime, delay) {
var quizinfotime = document.createElement('div');

// set the timeLeft and then set interval to count down
quizinfotime.innerHTML = " " + delay.toString() + " seconds";
quizinfotime.innerHTML = " " + delay.toString() + " " + M.str.moodle.seconds;
activequiz.set('timeLeft', delay);

activequiz.counter = setInterval(function () {
Expand All @@ -302,7 +302,7 @@ activequiz.waitfor_question = function (questionid, questiontime, delay) {
clearInterval(activequiz.counter);
activequiz.goto_question(questionid, questiontime);
} else {
quizinfotime.innerHTML = " " + timeLeft.toString() + " seconds";
quizinfotime.innerHTML = " " + timeLeft.toString() + " " + M.str.moodle.seconds;
}
}, 1000);

Expand Down Expand Up @@ -352,7 +352,7 @@ activequiz.goto_question = function (questionid, questiontime) {

} else { // otherwise set up the timer
questiontimertext.innerHTML = M.util.get_string('timertext', 'activequiz');
questiontimer.innerHTML = " " + questiontime + ' seconds';
questiontimer.innerHTML = " " + questiontime + " " + M.str.moodle.seconds;


var questionend = new Date();
Expand Down Expand Up @@ -381,7 +381,7 @@ activequiz.goto_question = function (questionid, questiontime) {
var timeLeft = (activequiz.get('questionendtime') - currenttimetime) / 1000;
timeLeft = number_format(timeLeft, 0, '.', ',');

questiontimer.innerHTML = " " + timeLeft.toString() + " seconds";
questiontimer.innerHTML = " " + timeLeft.toString() + " " + M.str.moodle.seconds;
}
}, 1000);
}
Expand Down Expand Up @@ -613,4 +613,4 @@ function number_format(number, decimals, dec_point, thousands_sep) {
.join('0');
}
return s.join(dec);
}
}
3 changes: 3 additions & 0 deletions lang/en/activequiz.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
$string['qdeleteerror'] = 'Couldn\'t delete question';
$string['questionedit'] = 'Edit question';
$string['savequestion'] = 'Save question';
$string['questionlist'] = 'Question List';

$string['cantaddquestiontwice'] = 'You can not add the same question more than once to a quiz';

Expand Down Expand Up @@ -266,6 +267,8 @@
$string['selectsession'] = 'Select session to view:    ';
$string['activitygrades'] = 'Activity grades: ';
$string['groupmembership'] = 'Group membership';
$string['regradeallgrades'] = 'Regrade all grades';
$string['regradeallgradessuccess'] = 'Successfully re-graded quiz';

// session attempts table
$string['attemptno'] = 'Attempt Number';
Expand Down
5 changes: 4 additions & 1 deletion renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

require_once($CFG->libdir . '/questionlib.php');

global $PAGE;
$PAGE->requires->string_for_js('seconds', 'moodle');

/**
* Realtime quiz renderer
*
Expand Down Expand Up @@ -1167,4 +1170,4 @@ public function render_review_question($slot, $attempt) {
/** End attempt view rendering **/


}
}