Skip to content

Commit

Permalink
Merge pull request #31 from ucfopen/issue/30-scorescreen-qset
Browse files Browse the repository at this point in the history
Issue/30 scorescreen qset
  • Loading branch information
clpetersonucf authored Apr 23, 2024
2 parents 28afeec + 3d55741 commit 1adb8cb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
3 changes: 0 additions & 3 deletions src/_score/score_module.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ class Score_Modules_Hangman extends Score_Module

public function check_answer($log)
{
// get qset once for options
if (empty($this->inst->qset)) $this->inst->get_qset($this->inst->id);

$wrong_limit = $this->inst->qset->data['options']['attempts'];
$is_partial = $this->inst->qset->data['options']['partial'];

Expand Down
9 changes: 4 additions & 5 deletions src/scoreScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,17 @@ const ScoreScreenApp = props => {
<td>{row.data[1]}</td>
<td>{row.data[2]}</td>
</tr>
)}
) }
</table>
</div>
);
};

export default ScoreScreenApp;

const updateDisplay = (qset, scoreTable, title) => {
const updateDisplay = (scoreTable, title) => {
ReactDOM.render(
<ScoreScreenApp
qset={qset}
scoreTable={scoreTable}
title={title}
/>,
Expand All @@ -43,10 +42,10 @@ const updateDisplay = (qset, scoreTable, title) => {
const materiaCallbacks = {
start: (instance, qset, scoreTable, isPreview, qsetVersion) => {
title = instance.name;
updateDisplay(qset, scoreTable, title);
updateDisplay(scoreTable, title);
},
update: (qset, scoreTable) => {
updateDisplay(qset, scoreTable, title);
updateDisplay(scoreTable, title);
}
};

Expand Down

0 comments on commit 1adb8cb

Please sign in to comment.