original_string: public function login_prompt(lesson $lesson, $failedattempt = false) {
          global $CFG;
          $output  = $this->output->box_start('password-form');
          $output .= $this->output->box_start('generalbox boxaligncenter');
          $output .=  '<form id="password" method="post" action="'.$CFG->wwwroot.'/mod/lesson/view.php" autocomplete="off">';
          $output .=  '<fieldset class="invisiblefieldset center">';
          $output .=  '<input type="hidden" name="id" value="'. $this->page->cm->id .'" />';
          $output .=  '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
          if ($failedattempt) {
              $output .=  $this->output->notification(get_string('loginfail', 'lesson'));
          }
          $output .= get_string('passwordprotectedlesson', 'lesson', format_string($lesson->name)).'<br /><br />';
          $output .= get_string('enterpassword', 'lesson')." <input type=\"password\" name=\"userpassword\" /><br /><br />";
          $output .= "<div class='lessonbutton standardbutton submitbutton'><input type='submit' value='".get_string('continue', 'lesson')."' /></div>";
          $output .= " <div class='lessonbutton standardbutton submitbutton'><input type='submit' name='backtocourse' value='".get_string('cancel', 'lesson')."' /></div>";
          $output .=  '</fieldset></form>';
          $output .=  $this->output->box_end();
          $output .=  $this->output->box_end();
          return $output;
      }
code: public function login_prompt(lesson $lesson, $failedattempt = false) {
          global $CFG;
          $output  = $this->output->box_start('password-form');
          $output .= $this->output->box_start('generalbox boxaligncenter');
          $output .=  '<form id="password" method="post" action="'.$CFG->wwwroot.'/mod/lesson/view.php" autocomplete="off">';
          $output .=  '<fieldset class="invisiblefieldset center">';
          $output .=  '<input type="hidden" name="id" value="'. $this->page->cm->id .'" />';
          $output .=  '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
          if ($failedattempt) {
              $output .=  $this->output->notification(get_string('loginfail', 'lesson'));
          }
          $output .= get_string('passwordprotectedlesson', 'lesson', format_string($lesson->name)).'<br /><br />';
          $output .= get_string('enterpassword', 'lesson')." <input type=\"password\" name=\"userpassword\" /><br /><br />";
          $output .= "<div class='lessonbutton standardbutton submitbutton'><input type='submit' value='".get_string('continue', 'lesson')."' /></div>";
          $output .= " <div class='lessonbutton standardbutton submitbutton'><input type='submit' name='backtocourse' value='".get_string('cancel', 'lesson')."' /></div>";
          $output .=  '</fieldset></form>';
          $output .=  $this->output->box_end();
          $output .=  $this->output->box_end();
          return $output;
      }
code_tokens: public function login_prompt ( lesson $ lesson , $ failedattempt = false ) { global $ CFG ; $ output = $ this -> output -> box_start ( 'password-form' ) ; $ output .= $ this -> output -> box_start ( 'generalbox boxaligncenter' ) ; $ output .= '<form id="password" method="post" action="' . $ CFG -> wwwroot . '/mod/lesson/view.php" autocomplete="off">' ; $ output .= '<fieldset class="invisiblefieldset center">' ; $ output .= '<input type="hidden" name="id" value="' . $ this -> page -> cm -> id . '" />' ; $ output .= '<input type="hidden" name="sesskey" value="' . sesskey ( ) . '" />' ; if ( $ failedattempt ) { $ output .= $ this -> output -> notification ( get_string ( 'loginfail' , 'lesson' ) ) ; } $ output .= get_string ( 'passwordprotectedlesson' , 'lesson' , format_string ( $ lesson -> name ) ) . '<br /><br />' ; $ output .= get_string ( 'enterpassword' , 'lesson' ) . " <input type=\"password\" name=\"userpassword\" /><br /><br />" ; $ output .= "<div class='lessonbutton standardbutton submitbutton'><input type='submit' value='" . get_string ( 'continue' , 'lesson' ) . "' /></div>" ; $ output .= " <div class='lessonbutton standardbutton submitbutton'><input type='submit' name='backtocourse' value='" . get_string ( 'cancel' , 'lesson' ) . "' /></div>" ; $ output .= '</fieldset></form>' ; $ output .= $ this -> output -> box_end ( ) ; $ output .= $ this -> output -> box_end ( ) ; return $ output ; }
docstring: Returns HTML to prompt the user to log in
  @param lesson $lesson
  @param bool $failedattempt
  @return string
docstring_tokens: Returns HTML to prompt the user to log in