protected function add_item_dependencies($item, $element) {
        $allitems = $this->structure->get_items();
        if ($item->dependitem && ($this->mode == self::MODE_EDIT || $this->mode == self::MODE_VIEW_TEMPLATE)) {
            if (isset($allitems[$item->dependitem])) {
                $dependitem = $allitems[$item->dependitem];
                $name = $element->getLabel();
                $name .= html_writer::span(' ('.format_string($dependitem->label).'-&gt;'.$item->dependvalue.')',
                        'feedback_depend');
                $element->setLabel($name);
            }
        }
    }
protected function add_item_dependencies($item, $element) {
        $allitems = $this->structure->get_items();
        if ($item->dependitem && ($this->mode == self::MODE_EDIT || $this->mode == self::MODE_VIEW_TEMPLATE)) {
            if (isset($allitems[$item->dependitem])) {
                $dependitem = $allitems[$item->dependitem];
                $name = $element->getLabel();
                $name .= html_writer::span(' ('.format_string($dependitem->label).'-&gt;'.$item->dependvalue.')',
                        'feedback_depend');
                $element->setLabel($name);
            }
        }
    }
protected function add_item_dependencies ( $ item , $ element ) { $ allitems = $ this -> structure -> get_items ( ) ; if ( $ item -> dependitem && ( $ this -> mode == self :: MODE_EDIT || $ this -> mode == self :: MODE_VIEW_TEMPLATE ) ) { if ( isset ( $ allitems [ $ item -> dependitem ] ) ) { $ dependitem = $ allitems [ $ item -> dependitem ] ; $ name = $ element -> getLabel ( ) ; $ name .= html_writer :: span ( ' (' . format_string ( $ dependitem -> label ) . '-&gt;' . $ item -> dependvalue . ')' , 'feedback_depend' ) ; $ element -> setLabel ( $ name ) ; } } }
Adds a dependency description to the question name
@param stdClass $item
@param HTML_QuickForm_element $element
Adds a dependency description to the question name