Merge branch 'MDL-44535-master-v2' of https://github.com/jamiepratt/moodle
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
slot,subpart,modelresponse,actualresponse,totalcount,count1,count2,count3,count4,count5
|
||||
1,1,frog: insect,insect,2,2,0,0,0,0
|
||||
1,1,frog: insect,insect,3,3,0,0,0,0
|
||||
1,1,"frog: mammal",mammal,1,0,0,1,0,0
|
||||
1,2,"cat: insect",insect,2,1,1,0,0,0
|
||||
1,1,"frog: amphibian",amphibian,1,0,0,0,0,1
|
||||
1,2,"cat: insect",insect,3,2,1,0,0,0
|
||||
1,2,cat: amphibian,amphibian,1,1,0,0,0,0
|
||||
1,3,newt: insect,insect,2,2,0,0,0,0
|
||||
1,2,cat: mammal,mammal,2,0,0,0,0,2
|
||||
1,3,newt: insect,insect,3,3,0,0,0,0
|
||||
1,3,newt: amphibian,amphibian,2,0,0,0,0,2
|
||||
|
||||
|
+14
-1
@@ -16,4 +16,17 @@ quizattempt,firstname,lastname,responses.1.0,responses.1.1,responses.1.2,respons
|
||||
2,Mark,Jones,mammal,insect,insect,0,1,0
|
||||
2,Mark,Jones,mammal,insect,insect,1,0,0
|
||||
2,Mark,Jones,mammal,insect,insect,0,1,0
|
||||
2,Mark,Jones,mammal,insect,insect,1,0,1
|
||||
2,Mark,Jones,mammal,mammal,insect,1,0,0
|
||||
2,Mark,Jones,mammal,mammal,insect,0,1,0
|
||||
2,Mark,Jones,mammal,mammal,amphibian,1,0,1
|
||||
3,Michael,Jackson,insect,insect,insect,1,0,0
|
||||
3,Michael,Jackson,insect,insect,insect,0,1,0
|
||||
3,Michael,Jackson,insect,insect,insect,1,0,0
|
||||
3,Michael,Jackson,insect,insect,insect,0,1,0
|
||||
3,Michael,Jackson,insect,insect,insect,1,0,0
|
||||
3,Michael,Jackson,insect,insect,insect,0,1,0
|
||||
3,Michael,Jackson,insect,insect,insect,1,0,0
|
||||
3,Michael,Jackson,insect,insect,insect,0,1,0
|
||||
3,Michael,Jackson,insect,insect,insect,1,0,0
|
||||
3,Michael,Jackson,insect,insect,insect,0,1,0
|
||||
3,Michael,Jackson,amphibian,mammal,amphibian,1,0,1
|
||||
|
||||
|
@@ -35,6 +35,12 @@ defined('MOODLE_INTERNAL') || die();
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class analyser {
|
||||
/**
|
||||
* @var int When analysing responses and breaking down the count of responses per try, how many columns should we break down
|
||||
* tries into? This is set to 5 columns, any response in a try more than try 5 will be counted in the fifth column.
|
||||
*/
|
||||
const MAX_TRY_COUNTED = 5;
|
||||
|
||||
/** @var int Time after which responses are automatically reanalysed. */
|
||||
const TIME_TO_CACHE = 900; // 15 minutes.
|
||||
|
||||
|
||||
@@ -80,6 +80,9 @@ class analysis_for_actual_response {
|
||||
public function increment_count($try = 0) {
|
||||
$this->totalcount++;
|
||||
if ($try != 0) {
|
||||
if ($try > analyser::MAX_TRY_COUNTED) {
|
||||
$try = analyser::MAX_TRY_COUNTED;
|
||||
}
|
||||
if (!isset($this->trycount[$try])) {
|
||||
$this->trycount[$try] = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user