Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v1.6.1 #63

Merged
merged 8 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# MumieTask - Changelog

All important changes to this plugin will be documented in this file.
## [v1.6.1] - 2023-10-31
### Added
- The language is sent with the worksheet during the note synchronization request.

## [v1.6.0] - 2023-10-23
### Added
- Teachers can incorporate worksheets with a deadline
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public static function requires_context(stdClass $mumie): bool {
private static function create_object_context(stdClass $mumie, array $users): object_context {
global $CFG;
require_once($CFG->dirroot . "/mod/mumie/classes/grades/synchronization/context/object_context.php");
$context = new object_context();
$context = new object_context($mumie->language);
foreach ($users as $user) {
$context->add_user_context($user->get_sync_id(), self::create_user_context($mumie, $user));
}
Expand Down
11 changes: 9 additions & 2 deletions classes/grades/synchronization/context/object_context.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,18 @@ class object_context implements \JsonSerializable {
*/
private array $usercontexts;

/**
* @var string
*/
private string $language;

/**
* Create a new instance.
* @param string $lang
*/
public function __construct() {
public function __construct($lang) {
$this->usercontexts = array();
$this->language = $lang;
}

/**
Expand All @@ -52,6 +59,6 @@ public function add_user_context(string $userid, user_context $usercontext): vo
* @return array
*/
public function jsonSerialize() {
return $this->usercontexts;
return ['language' => $this->language, 'userContexts' => $this->usercontexts];
}
}
6 changes: 3 additions & 3 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@

defined('MOODLE_INTERNAL') || die;

$plugin->version = 2023102500; // The current module version (Date: YYYYMMDDXX).
$plugin->version = 2023103100; // The current module version (Date: YYYYMMDDXX).
$plugin->component = 'mod_mumie'; // Full name of the plugin (used for diagnostics).
$plugin->requires = 2022041900;
$plugin->release = "v1.6.0";
$plugin->release = "v1.6.1";
$plugin->maturity = MATURITY_STABLE;
$plugin->dependencies = array(
'auth_mumie' => 2021031200,
'auth_mumie' => 2023103100,
);
Loading