Stud.IP
6.0
|
Public Member Functions | |
before_filter (&$action, &$args) | |
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 | |
__construct (\Trails\Dispatcher $dispatcher) | |
before_filter (&$action, &$args) | |
injectResponse (Psr\Http\Message\ResponseInterface $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 (string $file, ?string $filename=null, ?string $content_type=null, string $content_disposition='attachment', ?Closure $callback=null) | |
render_temporary_file (string $file, ?string $filename=null, ?string $content_type=null, string $content_disposition='attachment', ?Closure $callback=null) | |
render_form (\Studip\Forms\Form $form) | |
render_vue_app (\Studip\VueApp $app) | |
relay ($to_uri) | |
relayWithRedirect (... $args) | |
perform_relayed ($unconsumed) | |
render_template ($template_name, $layout=null) | |
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') | |
render_spreadsheet (array $header, array $data, string $format, string $filename, ?string $filepath=null) | |
Public Member Functions inherited from Controller | |
__construct (Dispatcher $dispatcher) | |
erase_response () | |
get_response () | |
perform ($unconsumed) | |
extract_action_and_args ($string) | |
default_action_and_args () | |
map_action ($action) | |
before_filter (&$action, &$args) | |
after_filter ($action, $args) | |
does_not_understand ($action, $args) | |
redirect ($to) | |
render_text ($text=' ') | |
render_nothing () | |
render_action ($action) | |
get_default_template ($action) | |
render_template ($template_name, $layout=null) | |
get_template_factory () | |
get_assigned_variables () | |
set_layout ($layout) | |
url_for ($to) | |
set_status ($status, $reason_phrase=null) | |
set_content_type ($type) | |
rescue ($exception) | |
respond_to ($ext) | |
Protected Member Functions | |
refreshHost ($url) | |
Protected Member Functions inherited from StudipController | |
render_pdf (TCPDF $pdf, $filename, $inline=false) | |
controller_path () | |
getBodyElementIdForControllerAndAction ($unconsumed_path) | |
Protected Attributes | |
$with_session = true | |
Protected Attributes inherited from StudipController | |
$with_session = false | |
$allow_nobody = true | |
$_autobind = false | |
Protected Attributes inherited from Controller | |
Dispatcher | $dispatcher |
Response | $response |
bool | $performed = false |
Template string null | $layout = null |
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.
$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.
$material_id | : ID of the item on this server. |
before_filter | ( | & | $action, |
& | $args | ||
) |
download_action | ( | $material_id, | |
$disposition = "inline" |
|||
) |
Download an item from this server. The ##material_id## of the item must be given.
$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.
$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.
$item_id | : ID of the item on this server. |
index_action | ( | ) |
push_data_action | ( | ) |
Update data of an item via POST-request.
|
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!
|
protected |