ILIAS  release_8 Revision v8.23
AssignmentGrade.php
Go to the documentation of this file.
1 <?php
2 
20 
28 class AssignmentGrade extends Service
29 {
36  public function __construct(\ILIAS\LTI\ToolProvider\Platform $platform, string $endpoint, string $path = '')
37  {
38  $endpoint = self::addPath($endpoint, $path);
39  parent::__construct($platform, $endpoint);
40  }
41 
48  private static function addPath(string $endpoint, string $path): string
49  {
50  if (strpos($endpoint, '?') === false) {
51  if (substr($endpoint, -strlen($path)) !== $path) {
52  $endpoint .= $path;
53  }
54  } elseif (strpos($endpoint, "{$path}?") === false) {
55  $endpoint = str_replace('?', "{$path}?", $endpoint);
56  }
57 
58  return $endpoint;
59  }
60 }
Class to implement the Assignment and Grade services.
Class to represent a platform.
Definition: Platform.php:35
__construct(\ILIAS\LTI\ToolProvider\Platform $platform, string $endpoint, string $path='')
Class constructor.
Class to implement a service.
Definition: Service.php:33
Class ChatMainBarProvider .
string $endpoint
Service endpoint.
Definition: Service.php:47
$path
Definition: ltiservices.php:32
static addPath(string $endpoint, string $path)
Add path to a URL.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Platform $platform
Platform for this service request.
Definition: Service.php:68