English فارسی Suomi
Français Nederlands Translate
EDIT

Campsite 3.4

Campsite: OnlineInterviewPlugin

Online Interview Plugin

In this chapter:
  • Frontend/Template Engine
  • Admin Interface

 

Description

The Interview-Module allows to plan, manage and publish an interview on your publication website. The Interview can be announced and readers are invited to ask questions, which will be answered by the interview partner. In practice, this module operates a little bit like a forum but with one main protagonist who will reply to all questions posted. There is the possibility to schedule a time frame for the interview, but this is NOT a chat module. It is closer to a FAQ-tool.

Interview

An Interview is stored in the database in two tables. One keeps settings for the interview, and the other records multiple pairs of questions and answers ("interview items") for each interview.

4 User Roles:

  • Reader of your page can visit an interview. If subscribed to the page, he can submit own questions to an interview
  • Guest is the person who answers the questions
  • Moderator have to moderator incoming questions
  • Admin can create new interviews and edit any property

4 Status:
  • Draft: A new interview, which just occurs on the admin screen
  • Pending: The interview is waiting for questions and answers
  • Published: The interview is done, and the results are published on the website
  • Rejected: Used to hide it from the website

Interview Items

Each pair of question and it answer is called interview item. They have similar 4 status stages:
  • Draft: A new question send by an reader, and waiting for moderation (accept/reject)
  • Pending: The question was accepted, and waits to be answered by the guest
  • Published: The answer is given, and the item is ready to be shown on the website.
  • Rejected: If moderator reject item, it will not appear on the guest screen nor on the website
The normal workflow would be:
  1. Admin created interview, status draft
  2. Admin set interview status to pending. If the questions timeframe is current, the interview appears on website and waits for questions. Existing questions can be listed on the website, so other reader can see what already was asked. Answers will not shown yet.
  3. The moderator accept or reject new questions. Spam etc. can be deleted instantly.
  4. Within the interview timeframe, the guest answers the questions. Answered questions automatically get status published.
  5. The admin set the interview status to published, so the questions and answers are shown on the website.

 

Frontend/Template Engine

In this article:

  • Interview
  • Interview Item
  • List of Interviews
  • List of Interview Items

As a template designer, you need to understand which variables can be displayed and how the relate to each other. An interview is composed of two type of objects:

  • Interview: this keeps data about the interview itself, such as title, description, image, moderator, guest, question and answer timeframes
  • Interview item: an item is a pair of one question and one answer. Each interview can contain multiple interview items

 

Interview

The interview object has the following properties:

  • name: interview name
  • title: alias for name
  • identifier: interview identifier in the Campsite database
  • description_short: short description
  • description: full description
  • questions_limit: max. amount of questions per reader
  • status: draft, pending, published, offline
  • last_modified: timestamp of last modification
  • moderator_user_id
  • guest_user_id
  • defined
  • image: the image object assigned to this interview
  • image_description
  • questions_begin: from this timestamp questions can be added by reader
  • questions_end: until this timestamp questions can be added by reader
  • interview_begin: from this timestamp questions can be answered by guest
  • interview_end:  until this timestamp questions can be answered by guest
  • in_questions_timeframe: is now within questions timeframe
  • in_interview_timeframe: is now within interview-timeframe
  • language: language object
  • moderator: user object of the interview moderator
  • guest: user object of the interview guest
  • is_user_admin: is the logged-in user interview-admin
  • is_user_moderator: is the logged-in user interview-moderator
  • is_user_guest: is the logged-in user interview-guest
  • invitation_sent: timestamp when invitation was sent

 

Interview Item

An Interview Item contains an pair of one question and it's answer. For each interview, a certain number of interview items are used.

The Interview Item object has the following properties:

  • identifier: interview item identifier in the Campsite database
  • interview_id: the identifier of the interview containing this item
  • question: the question text
  • status: draft, pending, published, offline
  • answer: text of the answer
  • item_order
  • last_modified: timestamp of last modification
  • defined
  • questioneer: the user object of the questioneer
  • interview: the interview object containing this item

 

List of Interviews

Purpose:

Select the list of interviews according to the given constraints and current environmental variables. The code between "{{ list_interviews }}" statement and "{{ /list_interviews }}" is repeated for every interview in the list.

Syntax:

{{ list_interviews [length="<integer_value>"] [columns="<integer_value>"]
		[constraints="<list_of_interview_constraints>"]
		[order="<order_condition>"]>
}}
<list_of_instructions>
{{ /list_interviews }}

where:

  • length="<integer_value>": <integer_value> specifies list_length and forces the list to have at most list_length items. If the list contains more items than list_length items the ones not fitting in can be listed using If NextItems/PreviousItems statements.
  • columns="<integer_value>": <integer_value> specifies columns_number and sets an environment variable. This is incremented as if the items would be placed in a table cell. The counting starts from one and the variable is incremented for every new element. When it reaches the maximum value it is reset to one. This is very useful in building tables of data. For details see If List.

<list_of_instructions> may contain any statement except: "set_interview".

<list_of_interview_constraints>= [<interview_constraint>] <list_of_interview_constraints>
| <iinterview_constraint>
<interview_constraint>= id <integer_operator> <integer_value>
| name
<string_operator> <string_value>
| language_id
<integer_operator> <integer_value>
| moderator_user_id
<integer_operator> <integer_value>
| guest_user_id
<integer_operator> <integer_value>
| status <string_operator> <string_value>
| <date_constraint>

 

<date_constraint>=

interview_begin <date_operator> <date_value>
| interview_begin_year
<integer_operator> <integer_value>
| interview_begin_month
<integer_operator> <integer_value>
| interview_begin_wday
<integer_operator> <integer_value>
|
interview_end <date_operator> <date_value>
| interview_end_year
<integer_operator> <integer_value>
| interview_end_month
<integer_operator> <integer_value>
| interview_end_wday
<integer_operator> <integer_value>

| questions_begin <date_operator> <date_value>
|
questions_begin_year <integer_operator> <integer_value>
|
questions_begin_month <integer_operator> <integer_value>
| questions_begin_wday <integer_operator> <integer_value>
|
questions_end <date_operator> <date_value>
|
questions_end_year <integer_operator> <integer_value>
|
questions_end_month <integer_operator> <integer_value>
|
questions_end_wday <integer_operator> <integer_value>



<order_condition>= byIdentifier desc|asc
| byName desc|asc
| byTitle desc|asc
| byQuestions_begin desc|asc
| byQuestions_end desc|asc
| byInterview_begin desc|asc
| byInterview_end desc|asc
| byModerator desc|asc
| byGuest desc|asc
| byStatus desc|asc
| byOrder desc|asc

 

 

 

 

 

 

 

 

 

List of Interview Items

Purpose:

Select the list of interview items according to the given constraints and current environmental variables. The code between "{{ list_interviews }}" statement and "{{ /list_interviews }}" is repeated for every interview item in the list.

Syntax:

{{ list_interviewitems [length="<integer_value>"] [columns="<integer_value>"]
		[constraints="<list_of_interview_constraints>"]
		[order="<order_condition>"]>
}}
<list_of_instructions>
{{ /list_interviewitems }}

where:

  • length="<integer_value>": <integer_value> specifies list_length and forces the list to have at most list_length items. If the list contains more items than list_length items the ones not fitting in can be listed using If NextItems/PreviousItems statements.
  • columns="<integer_value>": <integer_value> specifies columns_number and sets an environment variable. This is incremented as if the items would be placed in a table cell. The counting starts from one and the variable is incremented for every new element. When it reaches the maximum value it is reset to one. This is very useful in building tables of data. For details see If List.

<list_of_instructions> may contain any statement except: "set_interview", "set_interviewitem".

<list_of_interviewitem_constraints>= [<interviewitem_constraint>] <list_of_interviewitem_constraints>
| <iinterviewitem_constraint>
<interviewitem_constraint>= status <string_operator> <string_value>
| questioneer_user_id <integer_operator> <integer_value>
| answer 
<string_operator> <string_value>
| status <string_operator> <string_value>


<order_condition>= byIdentifier desc|asc
| byQuestioneer desc|asc
| byQuestion desc|asc
| byAnswer desc|asc
| byStatus desc|asc
| byOrder desc|asc

 

 

 

 

 

Admin Interface

In this article:
  • Admin Screen
  • Moderator Screen
  • Guest Screen

The administration of interviews is seperated into 3 roles:

  1. Admin: Admins can create new interviews, and have access to any action
  2. Moderator: Each interview is assigned to one moderator. His main task is to accept or reject incoming questions.
  3. Guest: Each Interview have one guest assigned, who is reponsible to answer the questions

 

Admin Screen

List of Interviews

The admin screen display an list of interview. There are language and status filters for it, and columns can be ordered by each kind of item.
Following actions can be processed:
  • Edit interview setting
  • Change ordering of interviews
  • Change interviews status (checkboxes to select multiple interviews)
  • Delete interview (checkboxes to select multiple interviews)

Edit Interview

By clicking on an interview's title, an popup form appear which let you edit all interview setting. Here you can adjust:

  • Language
  • Moderator: All users with proper role are listed. New moderator must be added in user management.
  • Guest: All users with proper role are listet. A new guest login can be created here.
  • Title: A title for that interview
  • Image: You can upload an image to an interview. Thumbnail will automatically generated.
  • Image description
  • Delete Image: Use this checkbox to remove an existing image.
  • Short Description: Up to 256 chars
  • Description
  • Questions Begin - Question End: within this timeframe readers can add their questions
  • Interview Begin - Interview End: within this timeframe guest can answer
  • Questions Limit: Per-reader limit
  • Status: See description
The Questions timeframe can overlap with interview timeframe.

List of Interview Items

On this screen all items for an selected interview are displayed, and following actions can be processed:

  • Edit an item
  • Change ordering of items
  • Change status of item (checkboxes to select multiple interviews)
  • Delete item (checkboxes to select multiple interviews)

Edit Interview Item

The admin is able to edit the question and answer (e.g. mistypes), and change the status here.

Invitations

Clicking the letter-symbol in the main admin page, will open an window to setup and send invitations to reders which have register themself for this service. An red symbol indicated thet an invitation for this interview was already sent.

The popup screen allows setup of the email parts:
  • Sender: Use the syntax "Clear Name <address@domain>"
  • Subject: Plain text email subject
  • Template: In this template the objects $campsite->interview and $campsite->user are available with all their properties. In preview mode, the logged in user will be used.

Clicking the "Preview" button will save the settings and displays an preview of the email. Carefully check it before send by clicking button "Invite now".

 

Moderator Screen

Guest Screen

This screen display an list of interviews, which are assigned to the logged-in moderator. There are language and status filters for it, and columns can be ordered by each kind of item.
The only available action is to list interview items.

List of Interview Items

On this screen all items for an selected interview are displayed, and following actions can be made:

  • Edit an item
  • Change status of item (checkboxes to select multiple interviews)
  • Delete item (checkboxes to select multiple interviews)

Accept/Reject items

To hand over new questions to the guest, they have to be set to status "pending".
If an question should not be answered, but stored in the system, status "rejected" is used.
Items can also be deleted here.

Use the checkboxes for multiple actions.

Edit Interview Item

The moderator is able to edit the question (e.g. mistypes), and change the status on this screen.

 

Guest Screen

List of Interviews

This screen display an list of interviews, which are assigned to the logged-in guest. There are language and status filters for it, and columns can be ordered by each kind of item.
The only available action is to list interview items.

List of Interview Items

On this screen all items for an selected interview are displayed, which are passed by from the moderator. The guest have to pick up those with status "pending" and answer them in the popup. After answering an item, it will automatically get status "published". This does not mean that it occours on the website, just is the interview is also published all published items will occour.

  


EDIT