Stud.IP  4.0
 All Data Structures Namespaces Files Functions Variables Groups
Oer_EndpointsController Class Reference
Inheritance diagram for Oer_EndpointsController:
StudipController

Public Member Functions

 index_action ()
 
 fetch_public_host_key_action ()
 
 update_server_info_action ()
 
 fetch_known_hosts_action ()
 
 search_items_action ()
 
 get_item_data_action ($item_id)
 
 push_data_action ()
 
 download_action ($material_id, $disposition="inline")
 
 download_front_image_action ($material_id)
 
 add_review_action ($material_id)
 
 add_comment_action ($review_id, $host_hash=null)
 
- Public Member Functions inherited from StudipController
 before_filter (&$action, &$args)
 
 erase_response ()
 
 perform ($unconsumed_path)
 
 after_filter ($action, $args)
 
 validate_args (&$args, $types=null)
 
 url_for ($to= '')
 
 link_for ($to= '')
 
 redirect ($to)
 
 relocate ($to)
 
 rescue ($exception)
 
 render_json ($data)
 
 render_csv ($data, $filename=null, $delimiter= ';', $enclosure= '"')
 
 render_file ($file, $filename=null, $content_type=null, $content_disposition= 'attachment', Closure $callback=null, $chunk_size=262144)
 
 render_temporary_file ($file, $filename=null, $content_type=null, $content_disposition= 'attachment', Closure $callback=null, $chunk_size=262144)
 
 relay ($to_uri)
 
 relayWithRedirect (...$args)
 
 perform_relayed ($unconsumed)
 
 render_template_as_string ($template, $layout=null)
 
 __call ($method, $arguments)
 
 has_action ($action)
 
 action_url ($action)
 
 action_link ($action)
 
 validate_datetime ($datetime, $format= 'H:i')
 

Protected Member Functions

 refreshHost ($url)
 
- Protected Member Functions inherited from StudipController
 render_pdf (TCPDF $pdf, $filename, $inline=false)
 
 controller_path ()
 
 getBodyElementIdForControllerAndAction ($unconsumed_path)
 

Additional Inherited Members

- Protected Attributes inherited from StudipController
 $with_session = false
 
 $allow_nobody = true
 
 $_autobind = false
 

Member Function Documentation

add_comment_action (   $review_id,
  $host_hash = null 
)

Adds or edits a comment to the material on this server from a client of another server. Use this request only as a POST request, the body must be a JSON-object that carries all the necessary variables. The review_id is the foreign_review_id if the host_hash is not empty or the review_id if the host_hash is empty.

Parameters
$material_id: ID of the item on this server.
add_review_action (   $material_id)

Adds or edits a review to the material on this server from a client of another server. Use this request only as a POST request, the body must be a JSON-object that carries all the necessary variables.

Parameters
$material_id: ID of the item on this server.
download_action (   $material_id,
  $disposition = "inline" 
)

Download an item from this server. The ##material_id## of the item must be given.

Parameters
$material_id: material_id from this server or foreign_material_id from another server.
download_front_image_action (   $material_id)

Download image of this item from this server. The ##material_id## of the item must be given.

Parameters
$material_id: material_id from this server or foreign_material_id from another server.
fetch_known_hosts_action ( )

Returns a json with all known hosts. If there is a "from" GET-parameter, this host will fetch the public key of the from-host and saves it to its database.

fetch_public_host_key_action ( )

Returns the public key and some other information of this host. The returned text is a json-object like [code] { "name": "name of this host", "public_key": "the armored public key", "url": "the preferred URL of this host. May be configured in config_local.inc.php as the variable $GLOBALS['OER_PREFERRED_URI'] ", "index_server": 0 // or 1, 1 if this host is ready to be asked as an index-server, else 0. } [/code]

get_item_data_action (   $item_id)

Returns data of a given item including where to download it and the structure, decription, etc. If item is not hosted on this server, just relocate the request to the real server.

This endpoint should be called by a remote whenever a client wants to view the details of an item.

Parameters
$item_id: ID of the item on this server.
index_action ( )
push_data_action ( )

Update data of an item via POST-request.

refreshHost (   $url)
protected
search_items_action ( )
update_server_info_action ( )

Called by a remote-server to update its server-information via post-request. Even the public key could be updated this way!


The documentation for this class was generated from the following file: