original_string: 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);
              }
          }
      }
code: 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);
              }
          }
      }
code_tokens: 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 ) ; } } }
docstring: Adds a dependency description to the question name
  @param stdClass $item
  @param HTML_QuickForm_element $element
docstring_tokens: Adds a dependency description to the question name