function processSequenceEditorAction() { $ajax = new Ajax_SequenceEditorProcessor(); $data = $ajax->process($this->getRequest()->getPost()); $this->_helper->json($data); }
function test_size_2_sequence() { $this->clearAll(); $this->clearTemp(); $importer = $this->createXmlImporter($this->path); $importer->processFiles(); $this->assertRows(0, 'sequence_quiz'); $n = 2; $items = $this->createQuizzes($n); //return; //Create the sequence $seq = $this->createSequence("Sequence of size {$n}", $this->permissions_group); $data = array('id' => $seq->id, 'items' => $items); $ajax = new Ajax_SequenceEditorProcessor(); $res = $ajax->process($data); /* $this->login('hugo'); $this->dispatch('/auth/login'); $this->assert*/ //On student view I expect //Quiz 1 is available //Quiz 2 is blocked }