MDL-46514 behat: section should be set before switch-case

This commit is contained in:
Rajesh Taneja 2016-08-16 11:08:09 +08:00
parent 0c1bcb63c6
commit bdcd90b2f3
No known key found for this signature in database
GPG Key ID: B363F7FB787F80E4

View File

@ -76,10 +76,10 @@ switch($requestmethod) {
switch ($class) {
case 'section':
$table = 'quiz_sections';
$section = $structure->get_section_by_id($id);
switch ($field) {
case 'getsectiontitle':
require_capability('mod/quiz:manage', $modcontext);
$section = $structure->get_section_by_id($id);
echo json_encode(array('instancesection' => $section->heading));
break;
case 'updatesectiontitle':