Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 51... Línea 51...
51
        $rootnode = $this->field->getParent();
51
        $rootnode = $this->field->getParent();
52
        $input = $rootnode->find('css', 'input');
52
        $input = $rootnode->find('css', 'input');
53
        return $input->getValue();
53
        return $input->getValue();
54
    }
54
    }
Línea -... Línea 55...
-
 
55
 
-
 
56
    public function matches($expectedvalue) {
-
 
57
        $actualvalue = $this->get_value();
-
 
58
        $selectedcontainer = $this->field->find('css', '[data-selected-option]');
-
 
59
        $actualtext = $selectedcontainer ? $selectedcontainer->getText() : $this->field->getText();
-
 
60
 
-
 
61
        return ($expectedvalue == $actualvalue || $expectedvalue == $actualtext);
-
 
62
    }
55
 
63
 
56
    /**
64
    /**
57
     * Checks whether a given option exists in the select menu field.
65
     * Checks whether a given option exists in the select menu field.
58
     *
66
     *
59
     * @param string $option The string that is used to identify an option within the select menu. If the string
67
     * @param string $option The string that is used to identify an option within the select menu. If the string