Closed KhaledLela closed 2 years ago
hello khalid , u had an example using this bundle please if u can a doc to use this package thank u
Le lun. 7 févr. 2022, 10:49, Khaled Mohamed @.***> a écrit :
- refactor(manager): fix manager duplicated storage code, make it depend on ScormDist helper
- add scorm dist to manage scorm storage disk operation
- code format and same UUID but under laravel support helper
- add extra doc on scorm config file including example for explanation
- update README with step 3 of update config cache, and add optional step to describe scorm disk handler with example.
- fix scorm update archive with updateOrCreated, drop old scorm package when already exists.
You can view, comment on, or merge this pull request online at:
https://github.com/devianl2/laravel-scorm/pull/7 Commit Summary
- 8db5f39 https://github.com/devianl2/laravel-scorm/pull/7/commits/8db5f39aec45a25817dce885ecf0ffbe09c31cca fix scorm update archive with updateOrCreated, drop old scorm package when already exists.
- 4de0d39 https://github.com/devianl2/laravel-scorm/pull/7/commits/4de0d3953834e367a91255088861ae264f7d561a fix typo remove extra bracket
- 1e50016 https://github.com/devianl2/laravel-scorm/pull/7/commits/1e50016f2d8eeea1e8ce72c3f098f30237d207cd update README with step 3 of update config cache, and add optional step to describe scorm disk handler with example.
- ea1e10b https://github.com/devianl2/laravel-scorm/pull/7/commits/ea1e10b8754c229a6133da8c807affe58676cf67 add extra doc on scorm config file including example for explanation
- aa3613d https://github.com/devianl2/laravel-scorm/pull/7/commits/aa3613dd25217bfd40025aad57f31ab8e479b395 code format and same UUID but under laravel support helper
- 2e8cf88 https://github.com/devianl2/laravel-scorm/pull/7/commits/2e8cf8822305aaea60d12a47d124122ed5e4c145 add scorm dist to manage scorm storage disk operation
- 9e6f0a9 https://github.com/devianl2/laravel-scorm/pull/7/commits/9e6f0a90b6b99d7a08fbe07ecd9c304b825f3a16 refactor(manager): fix manager duplicated storage code, make it depend on ScormDist helper
File Changes
(5 files https://github.com/devianl2/laravel-scorm/pull/7/files)
- M README.md https://github.com/devianl2/laravel-scorm/pull/7/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5 (34)
- M config/scorm.php https://github.com/devianl2/laravel-scorm/pull/7/files#diff-1fb8f3745b927bf7df90186b63c03b9ee8871340e83b463d870e9e9cdd75874b (18)
- M src/Library/ScormLib.php https://github.com/devianl2/laravel-scorm/pull/7/files#diff-764c2dc1844b6cdbee23d09a8f8365c04f89bead2e0754903dc13a116910471e (30)
- A src/Manager/ScormDisk.php https://github.com/devianl2/laravel-scorm/pull/7/files#diff-cf589ff5be2fe83b6069d0b4535b354cd5494b7ac830f84cfa585c9243817b5d (74)
- M src/Manager/ScormManager.php https://github.com/devianl2/laravel-scorm/pull/7/files#diff-d1bee73376269984dc8c1f56bffd55fd167c70ebf1d81a089cb128efffbf7a51 (232)
Patch Links:
- https://github.com/devianl2/laravel-scorm/pull/7.patch
- https://github.com/devianl2/laravel-scorm/pull/7.diff
— Reply to this email directly, view it on GitHub https://github.com/devianl2/laravel-scorm/pull/7, or unsubscribe https://github.com/notifications/unsubscribe-auth/AULC2YAU4HM6DXPGBYRQX4TUZ6IRVANCNFSM5NW5ZJDQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
FYI:
This library for unzip and parse scorm package manifest file and store into database tables.
NOT for running SCORM => you will need to handle runtime scripts other ways, Like scorm-again
NOT for Creating SCORM package, you can check Starting-from-SCORM-A-Developers-Guide to know more about structure
Check README file for installation instructions.
to use my fork
"require": {
"php": ">=7.4",
"ext-json": "*",
// ... other dependency
"devianl2/laravel-scorm": "dev-main"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/KhaledLela/laravel-scorm"
}
],
Usage:
class ScormController extends BaseController
{
/** @var ScormManager $scormManager */
private $scormManager;
/**
* ResourceController constructor.
* @param ScormManager $scormManager
*/
public function __construct(ScormManager $scormManager)
{
$this->scormManager = $scormManager;
}
public function store(ScormRequest $request)
{
$scorm = $this->scormManager->uploadScormArchive($request->file('file'));
return $this->respond($scorm);
}
}
Config
// config/scorm.php
<?php
return [
'table_names' => [
'user_table' => 'users',
'scorm_table' => 'scorm',
'scorm_sco_table' => 'scorm_sco',
'scorm_sco_tracking_table' => 'scorm_sco_tracking',
],
/**
* Scorm directory. You may create a custom path in file system
* Define Scorm disk under @see config/filesystems.php
*/
'disk' => 's3-scorm',
];
// config/filesystems
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
],
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'visibility' => 'public',
],
's3' => [
'driver' => 's3',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'),
],
's3-scorm' => [
'driver' => 's3',
'root' => env('SCORM_ROOT_DIR'),
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_SCORM_BUCKET'),
],
],
Hopefully this will help you,
thank u so much it so helpful for any update i will ask u thank u so much for my educationnal project i need to create simple lms with scorm integration and tracking students sco if u have any informations u can share it with me thank you sir
ScormModel::whereOriginFile()
From Laravel doc despite old version still supported. Dynamic Where Clauses You may even use "dynamic" where statements to fluently build where statements using magic methods:
$admin = DB::table('users')->whereId(1)->first();
$john = DB::table('users')
->whereIdAndEmail(2, 'john@doe.com')
->first();
$jane = DB::table('users')
->whereNameOrAge('Jane', 22)
->first();
Update
/**
* Handle dynamic method calls into the method.
*
* @param string $method
* @param array $parameters
* @return mixed
*
* @throws \BadMethodCallException
*/
public function __call($method, $parameters)
{
if (static::hasMacro($method)) {
return $this->macroCall($method, $parameters);
}
if (str_starts_with($method, 'where')) {
return $this->dynamicWhere($method, $parameters);
}
static::throwBadMethodCallException($method);
}
hi @devianl2/laravel-scorm @.***> , there are no examples for saving progress ? if you can make an example to see how do it thanks
Le mar. 29 mars 2022 à 08:21, devianl2 @.***> a écrit :
3.0.7 https://github.com/devianl2/laravel-scorm/releases/tag/3.0.7
Repository: devianl2/laravel-scorm https://github.com/devianl2/laravel-scorm · Tag: 3.0.7 https://github.com/devianl2/laravel-scorm/tree/3.0.7 · Commit: 7a5bad1 https://github.com/devianl2/laravel-scorm/commit/7a5bad1198e4ffd4509b22fa255ba2e768a8fe6e · Released by: devianl2 https://github.com/devianl2
Updated scorm 1.2 to read score.raw as progression Refer to: https://stackoverflow.com/a/52789082
Full Changelog: 3.0.6...3.0.7 https://github.com/devianl2/laravel-scorm/compare/3.0.6...3.0.7 —
This release has 2 assets:
- Source code (zip)
- Source code (tar.gz)
Visit the release page https://github.com/devianl2/laravel-scorm/releases/tag/3.0.7 to download them.
— You are receiving this because you are watching this repository. View it on GitHub https://github.com/devianl2/laravel-scorm/releases/tag/3.0.7 or unsubscribe https://github.com/devianl2/laravel-scorm/unsubscribe_via_email/AULC2YEBPMQRNSY5BY663JLVCK4PZANCNFSM4FL4FIUA from all notifications for this repository.