original_string: protected function helper_user_plan_tasks(array $tasks) {
          $out = '';
          foreach ($tasks as $taskcode => $task) {
              $classes = '';
              $accessibilitytext = '';
              $icon = null;
              if ($task->completed === true) {
                  $classes .= ' completed';
                  $accessibilitytext .= get_string('taskdone', 'workshop') . ' ';
              } else if ($task->completed === false) {
                  $classes .= ' fail';
                  $accessibilitytext .= get_string('taskfail', 'workshop') . ' ';
              } else if ($task->completed === 'info') {
                  $classes .= ' info';
                  $accessibilitytext .= get_string('taskinfo', 'workshop') . ' ';
              } else {
                  $accessibilitytext .= get_string('tasktodo', 'workshop') . ' ';
              }
              if (is_null($task->link)) {
                  $title = html_writer::tag('span', $accessibilitytext, array('class' => 'accesshide'));
                  $title .= $task->title;
              } else {
                  $title = html_writer::tag('span', $accessibilitytext, array('class' => 'accesshide'));
                  $title .= html_writer::link($task->link, $task->title);
              }
              $title = $this->output->container($title, 'title');
              $details = $this->output->container($task->details, 'details');
              $out .= html_writer::tag('li', $title . $details, array('class' => $classes));
          }
          if ($out) {
              $out = html_writer::tag('ul', $out, array('class' => 'tasks'));
          }
          return $out;
      }
code: protected function helper_user_plan_tasks(array $tasks) {
          $out = '';
          foreach ($tasks as $taskcode => $task) {
              $classes = '';
              $accessibilitytext = '';
              $icon = null;
              if ($task->completed === true) {
                  $classes .= ' completed';
                  $accessibilitytext .= get_string('taskdone', 'workshop') . ' ';
              } else if ($task->completed === false) {
                  $classes .= ' fail';
                  $accessibilitytext .= get_string('taskfail', 'workshop') . ' ';
              } else if ($task->completed === 'info') {
                  $classes .= ' info';
                  $accessibilitytext .= get_string('taskinfo', 'workshop') . ' ';
              } else {
                  $accessibilitytext .= get_string('tasktodo', 'workshop') . ' ';
              }
              if (is_null($task->link)) {
                  $title = html_writer::tag('span', $accessibilitytext, array('class' => 'accesshide'));
                  $title .= $task->title;
              } else {
                  $title = html_writer::tag('span', $accessibilitytext, array('class' => 'accesshide'));
                  $title .= html_writer::link($task->link, $task->title);
              }
              $title = $this->output->container($title, 'title');
              $details = $this->output->container($task->details, 'details');
              $out .= html_writer::tag('li', $title . $details, array('class' => $classes));
          }
          if ($out) {
              $out = html_writer::tag('ul', $out, array('class' => 'tasks'));
          }
          return $out;
      }
code_tokens: protected function helper_user_plan_tasks ( array $ tasks ) { $ out = '' ; foreach ( $ tasks as $ taskcode => $ task ) { $ classes = '' ; $ accessibilitytext = '' ; $ icon = null ; if ( $ task -> completed === true ) { $ classes .= ' completed' ; $ accessibilitytext .= get_string ( 'taskdone' , 'workshop' ) . ' ' ; } else if ( $ task -> completed === false ) { $ classes .= ' fail' ; $ accessibilitytext .= get_string ( 'taskfail' , 'workshop' ) . ' ' ; } else if ( $ task -> completed === 'info' ) { $ classes .= ' info' ; $ accessibilitytext .= get_string ( 'taskinfo' , 'workshop' ) . ' ' ; } else { $ accessibilitytext .= get_string ( 'tasktodo' , 'workshop' ) . ' ' ; } if ( is_null ( $ task -> link ) ) { $ title = html_writer :: tag ( 'span' , $ accessibilitytext , array ( 'class' => 'accesshide' ) ) ; $ title .= $ task -> title ; } else { $ title = html_writer :: tag ( 'span' , $ accessibilitytext , array ( 'class' => 'accesshide' ) ) ; $ title .= html_writer :: link ( $ task -> link , $ task -> title ) ; } $ title = $ this -> output -> container ( $ title , 'title' ) ; $ details = $ this -> output -> container ( $ task -> details , 'details' ) ; $ out .= html_writer :: tag ( 'li' , $ title . $ details , array ( 'class' => $ classes ) ) ; } if ( $ out ) { $ out = html_writer :: tag ( 'ul' , $ out , array ( 'class' => 'tasks' ) ) ; } return $ out ; }
docstring: Renders the tasks for the single phase in the user plan
  
  @param stdClass $tasks
  @return string html code
docstring_tokens: Renders the tasks for the single phase in the user plan