mirror of
https://github.com/psychopy/psychojs.git
synced 2025-05-12 08:38:10 +00:00
Merge pull request #326 from RebeccaHirst/_addformComplete
add formComplete method (code cleanup)
This commit is contained in:
commit
2d299c7730
@ -329,9 +329,20 @@ export class Form extends util.mix(VisualStim).with(ColorMixin)
|
||||
// return a copy of this._items:
|
||||
return this._items.map(item => Object.assign({}, item));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Check if the form is complete.
|
||||
*
|
||||
* @name module:visual.Form#formComplete
|
||||
* @function
|
||||
* @public
|
||||
* @return {boolean} - whether there are any remaining incomplete responses.
|
||||
*/
|
||||
formComplete()
|
||||
{
|
||||
//same as complete but might be used by some experiments before 2020.2
|
||||
this.getData();
|
||||
return this._items._complete;
|
||||
}
|
||||
/**
|
||||
* Add the form data to the given experiment.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user