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

Dev/10.0.1 #1521

Merged
merged 28 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
3d9059c
Add null checks
cayb0rg Oct 3, 2023
6c17714
Add console.errors for null values in previous changes
cayb0rg Oct 3, 2023
d52ecc4
Add current instance ID to new user in extra attempts dialog
cayb0rg Oct 3, 2023
43dcf58
merge and remove inst_id
cayb0rg Oct 5, 2023
65853c3
misc fixes to notifications and styling
cayb0rg Oct 5, 2023
e0b9bcb
Encode apostrophes in widget search
cayb0rg Oct 5, 2023
e679de8
Adds warning when trying to add a student collaborator to non-guest w…
cayb0rg Oct 5, 2023
1b8e057
PHP syntax error fix
cayb0rg Oct 5, 2023
df75e72
Slightly increased requested pixel sizes for gravatars & rounded prof…
clpetersonucf Oct 6, 2023
ebdc241
Explicitly adding path.js to MWD package.json
clpetersonucf Oct 9, 2023
7f1e1e9
Update condition check to account for undefined response
cayb0rg Oct 10, 2023
3fd8e4a
Continues instead of returning when attempting to add student
cayb0rg Oct 10, 2023
ba57bc1
Bump semver from 5.7.1 to 5.7.2
dependabot[bot] Oct 12, 2023
49762ed
Merge pull request #1515 from cayb0rg/issue/collaborator-support-fix
clpetersonucf Oct 12, 2023
bd3c713
Merge pull request #1520 from ucfopen/react/mwd-updates
clpetersonucf Oct 12, 2023
bb4273c
Expanded help section to include Students and Instructors sections. S…
clpetersonucf Oct 12, 2023
828c8de
Moved things around slightly on the help-home page
clpetersonucf Oct 12, 2023
7c913fc
Adds responsive layout to help page
clpetersonucf Oct 12, 2023
16c3c3c
Merge pull request #1486 from ucfopen/dependabot/npm_and_yarn/semver-…
clpetersonucf Oct 12, 2023
4029f12
Fixes score merging in playscoresget query when handling paginated sc…
clpetersonucf Oct 16, 2023
a2b7a4e
Merge in master
cayb0rg Oct 17, 2023
f473fe2
Merge branch 'dev/10.0.1' into issue/null-check
cayb0rg Oct 17, 2023
44152c3
Merge pull request #1501 from cayb0rg/issue/null-check
clpetersonucf Oct 17, 2023
33a8535
Adjusts font scaling of dts. Slight fix to text in homepage (unrelated).
clpetersonucf Oct 17, 2023
d26c8fb
Merge pull request #1522 from clpetersonucf/issue/1505-enhanced-help-…
clpetersonucf Oct 17, 2023
e6e55f4
Merge pull request #1524 from clpetersonucf/issue/1523-paginated-scor…
clpetersonucf Oct 18, 2023
b5c7bf2
Updates materia-theme-ucf to 2.0.2 in composer
clpetersonucf Oct 18, 2023
082ad93
Bumps base ruby image for fakes3 to 2.6 to address deprecation. Fix a…
clpetersonucf Oct 24, 2023
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
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"eher/oauth": "1.0.7",
"aws/aws-sdk-php": "3.67.17",
"symfony/dotenv": "^5.1",
"ucfopen/materia-theme-ucf": "2.0.1"
"ucfopen/materia-theme-ucf": "2.0.2"
},
"suggest": {
"ext-memcached": "*"
Expand Down Expand Up @@ -97,9 +97,9 @@
"package": {
"name": "ucfopen/materia-theme-ucf",
"type": "fuel-package",
"version": "2.0.1",
"version": "2.0.2",
"dist": {
"url": "https://github.com/ucfopen/Materia-Theme-UCF/archive/refs/tags/v2.0.1.zip",
"url": "https://github.com/ucfopen/Materia-Theme-UCF/archive/refs/tags/v2.0.2.zip",
"type": "zip"
},
"source": {
Expand Down
6 changes: 3 additions & 3 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions fuel/app/classes/controller/widgets.php
Original file line number Diff line number Diff line change
Expand Up @@ -508,12 +508,12 @@ protected function build_widget_login_messages($inst)
{
// $start_string = '<span class="available_date">'.date($format, (int) $inst->open_at).'</span>';
$start_string = date($format, (int) $inst->open_at);
$start_sec = date('h:i A', (int) $inst->open_at * 1000);
$start_sec = date('h:i A', (int) $inst->open_at);
}
if ($status['closes'])
{
$end_string = date($format, (int) $inst->close_at);
$end_sec = date('h:i A', (int) $inst->close_at * 1000);
$end_sec = date('h:i A', (int) $inst->close_at);
}

// finish the actual messages to the user
Expand Down
11 changes: 10 additions & 1 deletion fuel/app/classes/materia/api/v1.php
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,11 @@ static public function permissions_set($item_type, $item_id, $perms_array)
if ($is_enabled && Perm_Manager::is_student($new_perms->user_id))
{
// guest mode isn't enabled - don't give this student access
if ( ! $inst->allows_guest_players()) continue;
if ( ! $inst->allows_guest_players())
{
$refused[] = $new_perms->user_id;
continue;
}
Perm_Manager::set_user_game_asset_perms($item_id, $new_perms->user_id, [Perm::VISIBLE => $is_enabled], $new_perms->expiration);
}
}
Expand All @@ -1078,6 +1082,11 @@ static public function permissions_set($item_type, $item_id, $perms_array)
\Model_Notification::send_item_notification($cur_user_id, $new_perms->user_id, $item_type, $item_id, $notification_mode, $new_perm);
}

if (count($refused) > 0)
{
return Msg::student_collab();
}

return true;
}
/**
Expand Down
5 changes: 5 additions & 0 deletions fuel/app/classes/materia/msg.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ static public function no_perm()
return new Msg('You do not have permission to access the requested content', 'Permission Denied', Msg::WARN);
}

static public function student_collab()
{
return new Msg('Students cannot be added as collaborators to widgets that have guest access disabled.', 'Share Not Allowed', Msg::ERROR);
}

static public function student()
{
return new Msg('Students are unable to receive notifications via Materia', 'No Notifications', Msg::NOTICE);
Expand Down
2 changes: 1 addition & 1 deletion fuel/app/classes/materia/utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static function safeTrim($value)
return is_string($value) ? trim($value) : $value;
}

public static function get_avatar($size=35, $user=false)
public static function get_avatar($size=128, $user=false)
{
$default = \Config::get('materia.urls.static').'/img/default-avatar.jpg';
if ( ! $user) $user = \Model_User::find_current();
Expand Down
4 changes: 2 additions & 2 deletions fuel/app/classes/model/notification.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public static function send_item_notification(int $from_user_id, int $to_user_id
break;

case 'access_request':
$subject = "$user_link is requesting access to your widget \"$widget_name\".<br /> The widget is currently being used within a course in your LMS.";
$subject = "$user_link is requesting access to your widget \"$widget_link\".<br /> The widget is currently being used within a course in your LMS.";
$action = 'access_request';
break;

Expand All @@ -133,7 +133,7 @@ public static function send_item_notification(int $from_user_id, int $to_user_id
'is_email_sent' => ($send_email ? '0' : '1'),
'is_read' => '0',
'subject' => $subject,
'avatar' => \Materia\Utils::get_avatar(50),
'avatar' => \Materia\Utils::get_avatar(128),
'action' => $action,
'created_at' => time()
]);
Expand Down
2 changes: 1 addition & 1 deletion fuel/app/classes/model/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ static protected function forge_guest()

public function to_array($custom = false, $recurse = false, $eav = false)
{
$avatar = \Materia\Utils::get_avatar(50, $this);
$avatar = \Materia\Utils::get_avatar(256, $this);
$array = parent::to_array($custom, $recurse, $eav);
$array['avatar'] = $avatar;
$array['is_student'] = \Materia\Perm_Manager::is_student($this->id);
Expand Down
2 changes: 1 addition & 1 deletion materia-fake-s3.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:2.5-alpine
FROM ruby:2.6-alpine

RUN gem install fakes3 -v 2.0.0 --no-document

Expand Down
3 changes: 2 additions & 1 deletion public/dist/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"author": "University of Central Florida, Center for Distributed Learning",
"license": "AGPL-3.0",
"files": [
"path.js",
"js/materia.js",
"js/materia.enginecore.js",
"js/materia.creatorcore.js",
Expand All @@ -21,7 +22,7 @@
"js/scores.js",
"css/scores.css"
],
"version": "0.1.0",
"version": "0.2.0",
"repository": {
"type": "git",
"url": "https://github.com/ucfopen/Materia"
Expand Down
2 changes: 1 addition & 1 deletion src/components/extra-attempts-dialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const ExtraAttemptsDialog = ({onClose, inst}) => {
state.newIdCount,
{
id: parseInt(state.newIdCount),
context_id: '',
context_id: "",
extra_attempts: 1,
user_id: parseInt(match.id)
}
Expand Down
1 change: 1 addition & 0 deletions src/components/extra-attempts-dialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@
height: 40px;
width: 40px;
margin-right: 10px;
border-radius: 5px;
}

.user_name {
Expand Down
93 changes: 93 additions & 0 deletions src/components/help-for-instructors.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
import React from 'react';

const HelpForInstructors = () => {

return (
<>
<section className='full-width'>
<h2>For Instructors</h2>
<p>Check out the <a href="https://cdl.ucf.edu/support/materia/materia-quick-start-guide/" className="external">Materia Quickstart Guide</a> for a brief introduction to creating a new widget.</p>
</section>
<section className='full-width'>
<h2>Common Questions &amp; Issues</h2>
<h3>General</h3>
<dl>
<dt>Is Materia part of the LMS?</dt>
<dd>
<p>No. Materia is a platform that operates independently to the LMS, but integrates with it through a protocol called LTI.
You can authenticate to Materia through LTI, or directly by visiting the Login button.</p>
</dd>
<dt>Are there login credentials specific to Materia?</dt>
<dd>
<p>That depends on how your institution has configured Materia. If you visit Materia through your LMS, authentication is handled for you. If you login directly to Materia,
you may need credentials specifically set up for Materia. If logging in transitions you to a an external login, use the credentials associated with that external login instead.</p>
</dd>
<dt>I'm an instructor, why does Materia think I'm suddenly a student?</dt>
<dd>
<p>Materia defers to your LMS when receiving login information that may include your role in the course you last accessed Materia from. Depending on your course role,
your role in Materia may update to match. For example, if you are instructor in Course A but a student in Course B, Materia will flag you as a student if you visit
Materia content embedded in Course B. Visiting Materia content in Course A will once again grant you the author role.</p>
</dd>
<dt>Can my students author widgets?</dt>
<dd>
<p>Yes they can, but student-authored widgets have several limitations. Primarily, the widget is forced into Guest Mode, which removes the login requirement, but all scores
recorded by Guest Mode widgets are anonymous. Student-authored widgets cannot be embedded in your LMS, and if a student grants you access, you cannot disable Guest Mode.
Students can freely share their widgets with other users using the Play URL or Embed Code.</p>
</dd>
</dl>
<h3>Scores & Grades</h3>
<dl>
<dt>Does Materia save student grades?</dt>
<dd>
<p>Materia does not save grade information, but it does save student performance data. Student scores are stored and can be reviewed any time by
visiting the Student Activity section of a widget in My Widgets. When embedded in your LMS, Materia sends a score percentage to the LMS that's
then applied as a point value or grade by the LMS itself for an assignment.</p>
</dd>
<dt>How does scoring work?</dt>
<dd>
<p>By default, a student must authenticate to Materia - either automatically, when accessed through the LMS, or directly, by clicking the Login button -
so the system knows who they are and who to associate a score with. All score data for a widget is accessible under the Student Activity section in My Widgets.
Additionally, student performance data can be exported at any time by clicking the Export Options button in My Widgets.</p>
</dd>
<dt>My widget is embedded in the LMS but the gradebook did not update! What happened?</dt>
<dd>
<p>This can happen for multiple reasons. First, ensure the widget is properly embedded in your LMS by reviewing <a href='https://ucfopen.github.io/Materia-Docs/create/embedding-in-canvas.html' target='_blank'>our documentation for embedding widgets in Canvas. </a>
Next, verify the score the student recieved by reviewing the widget's Student Activity section in Materia under My Widgets. If a score is present in Materia but not synced with the gradebook, contact Support. Often the "handshake" between Materia and the LMS can
fail or be invalidated for several reasons that are not nefarious.</p>
</dd>
</dl>
<h3>Widget Ownership</h3>
<dl>
<dt>Can I give other instructors access to a widget?</dt>
<dd>
<p>Yes. Select <span className='bold'>Collaborate</span> in My Widgets to share widgets with other users. You can search for any other Materia user in the search field,
provided they've interacted with Materia at least once in the past. You can grant other users one of two access levels: <span className='bold'>Full</span>, which
effectively makes a user a co-owner, or <span className='bold'>View Scores</span>, which allows a user to share and read score information related to a widget but they cannot edit it.</p>
</dd>
<dt>Can I make students co-owners of a widget?</dt>
<dd>
<p>You cannot share widgets with students unless they have been set to <span className='bold'>Guest Mode</span>, under a widget's access settings. As a general rule, Materia will not
allow students ownership access to widgets unless the scores associated with the widgets are anonymized. Conversely, widgets authored by students are forced into Guest Mode, and changing a student widget
you co-own to Normal Access will remove the student as an owner.</p>
</dd>
<dt>I see a widget embedded in my course in the LMS, but I don't own it. What do I do?</dt>
<dd>
<p>Don't panic! Even if you don't own the widget, it will continue to function normally, and sync scores with the gradebook if configured to do so. If you're an author of the course,
you will be provided with a list of owners of the widget, and can select <span className='bold'>Request Access</span> from any owner. The owner will receive a notification in Materia
and be provided with an option to add you as a collaborator. Note that this does not guarantee you will receive access! In cases where the original owner is no longer associated with your institution, feel free to
contact Support.</p>
</dd>
</dl>
<h3>Miscellaneous</h3>
<dl>
<dt>How do I activate Beard Mode?</dt>
<dd>
<p>What? We don't know what you're talking about.</p>
</dd>
</dl>
</section>
</>
)
}

export default HelpForInstructors
65 changes: 65 additions & 0 deletions src/components/help-for-students.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import React from 'react';

const HelpForStudents = () => {

return (
<>
<section className='half-width'>
<h2>For Students</h2>
<p>
Materia is an open-source educational platform hosted alongside your LMS to enhance course content with interactive tools
called <span className='italic'>widgets. </span> If you run into a problem playing a widget or receiving a score, we're here to help.
</p>
</section>
<section className="half-width">
<h2 id="support">Get Support</h2>
<p>If you need help beyond what has been provided here, please contact support using one of the following:</p>
<dl>
<dt>Support</dt>
<dd><a href="http://website/support">http://website/support/</a></dd>
<dt>Email</dt>
<dd><a href="mailto:support@website">support@website</a></dd>
<dt>Phone</dt>
<dd>PHONE NUMBER HERE</dd>
</dl>
</section>
<section className='full-width'>
<h2>Common Questions &amp; Issues</h2>
<dl>
<dt>I'm not seeing a widget, only an error message. What do I do?</dt>
<dd>
<p>For one reason or a another Materia encountered a server issue or an issue authenticating you. Contact support using the info above.</p>
</dd>
<dt>I completed a widget, but my grade didn't update. What happened?</dt>
<dd>
<p>Widgets should automatically update the gradebook with your score when embedded correctly in an assignment. If a widget is embedded as a module item or directly in a regular course page,
the gradebook sync will <span className='italic'>not</span> occur. Additionally, ensure you have advanced the widget all the way to the score screen,
which is when the play session is formally concluded. Leaving the play session early will prevent the play from being marked as complete.</p>
<p>If all items above check out, contact support. Support can verify the score and ensure your grade is properly updated.</p>
</dd>
<dt>How many times can I play a widget?</dt>
<dd>
<p>By default, widgets can be played as many times as you want. When embedded as assignments, your highest score is the one synced with the gradebook. If your instructor has set an attempt limit,
the additional attempt count will be displayed on the score screen alongside the Play Again button.</p>
</dd>
<dt>Can I see scores from widgets I've previously played in Materia?</dt>
<dd>
<p>You can! Log in to Materia directly, if you're not already authenticated. Then, visit your profile by clicking your name at the top right, or the
My Profile link the header. Your profile page will list your complete play history for every widget you've previously interacted with.</p>
</dd>
<dt>Can I make my own widget?</dt>
<dd>
<p>Students can make widgets, but there's one important limitation: the widget will be set to Guest Mode, which means it won't know who is playing it, and consequently, score
data will be anonymous.</p>
</dd>
<dt>What's the answer to life, the universe, and everything?</dt>
<dd>
<p>That's a really big question, but we're pretty sure the answer is 42.</p>
</dd>
</dl>
</section>
</>
)
}

export default HelpForStudents
52 changes: 52 additions & 0 deletions src/components/help-home.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import React from 'react';

const HelpHome = () => {

return (
<>
<section className="full-width">
<h2 id="faq-link">Getting Started</h2>
<p>Having issues with Materia or don't know where to get started? We're here to help. For first-time users, get more information about Materia from the links below.</p>
<p><a href="https://ucfopen.github.io/Materia-Docs/play/getting-started.html">Player/Student Guide</a></p>
<p><a href="https://ucfopen.github.io/Materia-Docs/create/getting-started.html">Author/Instructor Guide</a></p>
</section>
<section className="full-width">
<h2 id="flash-required">Requirements</h2>
<p className="flash-version">Materia requires that you use an up-to-date browser with javascript and cookies enabled.</p>
</section>

<section className="half-width">
<h2 id="login-issues">Login Issues</h2>
<p>In many cases, problems logging in are a result of one of the following:</p>

<h3>Incorrect Password</h3>
<p>You may need to reset your password.</p>

<h3>Expired Password</h3>
<p>You may need to reset your password.</p>

<h3>User Account Doesn't exist</h3>
<p>Your user account may not have been created yet.</p>
</section>

<section className="half-width">
<h2 id="support">Support</h2>
<p>If you need help beyond what has been provided here, please contact support using one of the following:</p>
<dl>
<dt>Support</dt>
<dd><a href="http://website/support">http://website/support/</a></dd>
<dt>Email</dt>
<dd><a href="mailto:support@website">support@website</a></dd>
<dt>Phone</dt>
<dd>PHONE NUMBER HERE</dd>
</dl>
</section>
<section className='full-width'>
<h2 id="faq-link">Documentation</h2>
<p><a href="https://ucfopen.github.io/Materia-Docs/">Our docs site</a> has extensive documentation for students, authors, support users, and developers.</p>
</section>
</>
)
}

export default HelpHome
Loading
Loading