 
     @render_view()
        
-  get_next_submission: () ->
-    @backend.post('get_next', {}, @ajax_callback)
+  get_next_submission: (location) ->
+    @location = location
+    @list_view = false
+    @backend.post('get_next', {location}, @ajax_callback)
+
+  get_problem_list: () ->
+    @backend.post('get_problem_list', {}, @ajax_callback)
 
   submit_and_get_next: () ->
     data =

    @state = state_no_data

  render_view: () ->
    # make the view elements match the state.  Idempotent.
    show_grading_elements = false
    show_submit_button = true

    @message_container.html(@message)
    if @backend.mock_backend
      @message_container.append("<p>NOTE: Mocking backend.</p>")
    
    @error_container.html(@error_msg)

    if @state == state_error

      @setup_score_selection()
      
    else if @state == state_graded
      @set_button_text('Submit')

    else if @state == state_no_data
