<form id="question-search-form" class="form-inline well well-sm" action="{{ path('course_set_manage_homework_question_picker', {id:courseSet.id,targetType:targetType,replace:replace}) }}" novalidate>
  <div class="form-group">
    <select class="form-control width-150" name="courseId" data-url="{{ path('course_set_manage_show_tasks',{courseSetId:courseSet.id})}}">
      <option value="0" {% if not app.request.get('courseId',0) %}selected{% endif %}>{{'course.question_manage.filter.course'|trans}}</option>
      {% for course in courses if course %}
        <option value="{{ course.id }}" {% if app.request.get('courseId','') == course.id %}selected{% endif %}>{{ get_course_title(course) }}</option>
      {% endfor %}
    </select>
    <select class="form-control width-150" {% if not courseTasks|default(null) %}style="display:none;"{% endif %} name="lessonId">
      <option value="0" {% if not app.request.get('courseId',0) %}selected{% endif %}>{{'course.question_manage.filter.select'|trans}}</option>
      {% for task in courseTasks|default([]) if task %}
        <option value="{{ task.id }}" {% if app.request.get('lessonId','') == task.id %}selected{% endif %}>{{ task.title }}</option>
      {% endfor %}
    </select>
  </div>

  <div class="form-group">
    <select class="form-control" name="type">
      <option value="">{{'course.question_manage.filter.question_type'|trans}}</option>
      {% for key,type in getQuestionTypes() %}
        <option value="{{ key }}" {% if app.request.get('type','') == key %}selected{% endif %}>{{ type }}</option>
      {% endfor %}
    </select>
  </div>

  <div class="form-group">
    <input type="text" id="keyword" name="keyword" class="form-control" value="{{ app.request.query.get('keyword') }}" placeholder="{{'course.question_manage.filter.keywords'|trans}}">
  </div>

  <input type="hidden" name="excludeIds" value="{{ conditions.excludeIds|default('')|join(',')|default(null) }}">

  <button class="btn btn-primary btn-sm search-question-btn" data-role="search-btn">{{'form.btn.search'|trans}}</button>

</form>
