Skip to content

Commit

Permalink
2024070900 release code
Browse files Browse the repository at this point in the history
  • Loading branch information
zeroAps committed Jul 9, 2024
1 parent 7b8c95c commit 4c84be7
Show file tree
Hide file tree
Showing 45 changed files with 2,091 additions and 3,844 deletions.
9 changes: 9 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## Description


## Testing
<!-- How and what have you tested? What needs later verification? -->


## Jira Link
<!-- E.g. PC-### (link to Jira will populate automatically). Optional and Jira# must still be added to the PR title. -->
14 changes: 7 additions & 7 deletions .github/workflows/moodle-plugin-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@ jobs:
fail-fast: false
matrix:
include:
- php: '8.0'
- php: '8.1'
moodle-branch: 'master'
database: 'pgsql'
- php: '8.0'
moodle-branch: 'MOODLE_400_STABLE'
- php: '8.2'
moodle-branch: 'MOODLE_403_STABLE'
database: 'mariadb'
- php: '7.4'
moodle-branch: 'MOODLE_311_STABLE'
- php: '8.1'
moodle-branch: 'MOODLE_402_STABLE'
database: 'pgsql'
- php: '7.4'
moodle-branch: 'MOODLE_39_STABLE'
- php: '8.1'
moodle-branch: 'MOODLE_401_STABLE'
database: 'mariadb'

steps:
Expand Down
179 changes: 34 additions & 145 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,152 +1,41 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/* jshint node: true, browser: false */
/* eslint-env node */

/**
* @copyright 2021 Panopto
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

/**
* Grunt configuration
*/

/* eslint-env node */
module.exports = function(grunt) {
var path = require('path'),
tasks = {},
cwd = process.env.PWD || process.cwd(),
async = require('async');

// Windows users can't run grunt in a subdirectory, so allow them to set
// the root by passing --root=path/to/dir.
if (grunt.option('root')) {
var root = grunt.option('root');
if (grunt.file.exists(__dirname, root)) {
cwd = path.join(__dirname, root);
grunt.log.ok('Setting root to ' + cwd);
} else {
grunt.fail.fatal('Setting root to ' + root + ' failed - path does not exist');
}
}

var files = null;
if (grunt.option('files')) {
// Accept a comma separated list of files to process.
files = grunt.option('files').split(',');
}

module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
shifter: {
options: {
recursive: true,
paths: files ? files : [cwd]
}
}
pkg: grunt.file.readJSON("package.json"),

// Configuration for uglify task to minify JS files.
uglify: {
build: {
files: [
{
expand: true,
cwd: "amd/src",
src: "*.js",
dest: "amd/build",
ext: ".min.js",
},
],
},
},

// Configuration for watch task to monitor changes in JS files.
watch: {
scripts: {
files: ["amd/src/**/*.js"],
tasks: ["uglify"],
options: {
spawn: false,
},
},
},
});

/**
* Shifter task. Is configured with a path to a specific file or a directory,
* in the case of a specific file it will work out the right module to be built.
*
* Note that this task runs the invidiaul shifter jobs async (becase it spawns
* so be careful to to call done().
*/
tasks.shifter = function() {
var done = this.async(),
options = grunt.config('shifter.options');

// Run the shifter processes one at a time to avoid confusing output.
async.eachSeries(options.paths, function(src, filedone) {
var args = [];
args.push(path.normalize(__dirname + '/node_modules/shifter/bin/shifter'));

// Always ignore the node_modules directory.
args.push('--excludes', 'node_modules');

// Determine the most appropriate options to run with based upon the current location.
if (grunt.file.isMatch('**/yui/**/*.js', src)) {
// When passed a JS file, build our containing module (this happen with
// watch).
grunt.log.debug('Shifter passed a specific JS file');
src = path.dirname(path.dirname(src));
options.recursive = false;
} else if (grunt.file.isMatch('**/yui/src', src)) {
// When in a src directory --walk all modules.
grunt.log.debug('In a src directory');
args.push('--walk');
options.recursive = false;
} else if (grunt.file.isMatch('**/yui/src/*', src)) {
// When in module, only build our module.
grunt.log.debug('In a module directory');
options.recursive = false;
} else if (grunt.file.isMatch('**/yui/src/*/js', src)) {
// When in module src, only build our module.
grunt.log.debug('In a source directory');
src = path.dirname(src);
options.recursive = false;
}

// Add the stderr option if appropriate
if (grunt.option('verbose')) {
args.push('--lint-stderr');
}

if (grunt.option('no-color')) {
args.push('--color=false');
}

var execShifter = function() {

grunt.log.ok("Running shifter on " + src);
grunt.util.spawn({
cmd: "node",
args: args,
opts: {cwd: src, stdio: 'inherit', env: process.env}
}, function(error, result, code) {
if (code) {
grunt.fail.fatal('Shifter failed with code: ' + code);
} else {
grunt.log.ok('Shifter build complete.');
filedone();
}
});
};

// Actually run shifter.
if (!options.recursive) {
execShifter();
} else {
// Check that there are yui modules otherwise shifter ends with exit code 1.
if (grunt.file.expand({cwd: src}, '**/yui/src/**/*.js').length > 0) {
args.push('--recursive');
execShifter();
} else {
grunt.log.ok('No YUI modules to build.');
filedone();
}
}
}, done);
};

// Register JS tasks.
grunt.registerTask('shifter', 'Run Shifter against the current directory', tasks.shifter);
// Load the plugin that provides the "uglify" task.
grunt.loadNpmTasks("grunt-contrib-uglify");

// Load the plugin that provides the "watch" task.
grunt.loadNpmTasks("grunt-contrib-watch");

// Register the default task.
grunt.registerTask('default', ['shifter']);
// Default task(s).
grunt.registerTask("default", ["uglify", "watch"]);
};
48 changes: 30 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,39 @@ For the most up to date documentation for the Panopto Student Submission plugin


## Installation
1. Download the Moodle Panopto Student Submission zip file from the [github repository](https://github.com/Panopto/Moodle-Panopto-Student-Submission/releases). We will work with Moodle.org to add this into the app directory. Until then please use our github as the official release site.
1. Download the Moodle Panopto Student Submission zip file from the [github repository](https://github.com/Panopto/Moodle-Panopto-Student-Submission/releases). You can also download this plugin from the [official moodle.org page](https://moodle.org/plugins/mod_panoptosubmission).
2. Navigate to the target Moodle site and log in as an administrator
3. Navigate to Site Administration -> Plugins -> Install Plugins
3. Navigate to ```Site Administration -> Plugins -> Install Plugins```
4. Drag the zip file into the drag & drop box and go through the installation process.
5. An LTI Tool for the Panopto server must be configured on the Moodle site. If one does not already exist for your Panopto site please navigate to Site administration -> Plugins -> Activity modules -> External tool -> Manage preconfigured tools
6. Click Add Preconfigured tool.
5. An LTI Tool for the Panopto server must be configured on the Moodle site. If one does not already exist for your Panopto site please navigate to ```Site Administration -> Plugins -> Activity modules -> External tool -> Manage preconfigured tools```
6. Click ```Add Preconfigured tool```
7. Input the following information
- Tool Name: [panoptoServer] Student Submission Tool
- Tool Url: https://[panoptoServer]/Panopto/LTI/LTI.aspx
- Consumer Key:[Identity Provider instance name]
- Shared secret: [Identity Provided application key]
- Custom Parameters:
```
panopto_student_submission_tool=true
panopto_single_selection=true
panopto_assignment_submission_content_item=true
use_panopto_sandbox=true
- This custom parameter will give students personal folders regardless of IdP setting.
```

- For LTI 1.1:
- Tool Name: ```[panoptoServer] Course Embed Tool```
- Tool Url: ```https://[panoptoServer]/Panopto/LTI/LTI.aspx```
- Consumer Key: ```[Identity Provider > Instance Name]```
- Shared secret: ```[Identity Provided > Application Key]```
- Custom Parameters:
```
panopto_student_submission_tool=true
panopto_single_selection=true
panopto_assignment_submission_content_item=true
use_panopto_sandbox=true
- This custom parameter will give students personal folders regardless of IdP setting.
```
- For LTI 1.3:
- Tool Name: ```[panoptoServer] Course Embed Tool```
- Url: ```https://[panoptoServer]/Panopto/LTI/LTI.aspx```
- LTI version: ```LTI 1.3```
- Client ID: ```[Identity Provider > LTI 1.3 Client Identifier]```
- Public key type: ```Keyset URL```
- Public keyset: ```[Identity Provider > LTI 1.3 Tool JWKS URL]```
- Initiate login URL: ```[Identity Provider > LTI 1.3 Tool Login URL]```
- Redirection URI(s): ```[Identity Provider > LTI 1.3 Tool Redirection URL]```
8. Save the LTI Tool
## Pre-Requisites
- The [Panopto block for Moodle](https://github.com/Panopto/Moodle-2.0-plugin-for-Panopto) is installed on the Moodle site.
- The target course must be provisioned with Panopto.
- The [Panopto block for Moodle](https://github.com/Panopto/Moodle-2.0-plugin-for-Panopto) is installed on the Moodle site with at least version 2022122000.
- The target course must be provisioned with Panopto.
1 change: 1 addition & 0 deletions amd/build/submissionpanel.min.js

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

Loading

0 comments on commit 4c84be7

Please sign in to comment.