Code Monkey home page Code Monkey logo

tsugi's Introduction

TSUGI - A Framework for Building Interoperable Learning Tools

Apereo Incubating badge

Tsugi is a multi-tenant scalable LTI library and tool hosting environment. It is intended to make it more tractable to implement the Application Store that we will need for the Next Generation Digital Learning Environment.

This repository is the Tsugi Administration, Management, and Developer Console. This code also implements an IMS ContentItem App store.

While earlier versions of this repository included a set of modules, examples, and even exercises, as we move towards a 1.0 release of Tsugi, these elements are now moved to separate repositories (see below).

Pre-Requisites

  • Install GIT so that it works at the command prompt.

  • Install a PHP/MySQL Environment like XAMPP / MAMP following the instructions at:

http://www.wa4e.com/install.php

Tsugi Versions

Tsugi is intended as a continuously upgrading cloud deployment. Most of the Dr. Chuck servers have a cron job that does a git pull and runs upgrade.php every 30 minutes. You can see this infrastructure at:

https://github.com/tsugiproject/tsugi-build/tree/master/common

As a result, there are no traditional "releases" of Tsugi - the common use case is to be pretty close to the tip of the main branch.

But sometimes, folks want to "hold back" from upgrading for a while. Perhaps they have an old version of PHP and can't run the latest. It is risky to hold back too long. But to help those running Tsugi that want to hold back, a series of versions / tags are maintained as "safe plateaus". These tags are often snapped right before a significant upgrade or data model change and announced on the dev list.

Long Term Support Versions

Mostly because PHP is evolving from version 7.0 to version 9.0 in ways that break code and break dependencies, we are maintaining several long term branches for those stuck on older versions of PHP - we maintain these as branches.

  • Branch: master - Requires PHP 8.2 or greater - probably wqould work on 8.1 but not 8.0

  • Branch: php-80-x - If you are running PHP 8.0 or a late version of PHP 7.x this is a good branch

  • Branch: php-74-x - This branch a little earlier than php-80-x and should run on late versions of PHP 7.x and PHP 8.0

  • Branch: php-72-x - If you have a system that is lower than PHP 7.4, this is a safe branch

Installation

  • Check the code out from GitHub and put it in a directory where your web server can read it

      git clone https://github.com/tsugiproject/tsugi.git
    

Method 1: Docker install

  • If you have Docker installed (OSX/Linux currently) you should just be able to run docker compose build and docker compose up and Tsugi will start up and initialize.
  • config-dist.php will be copied, you need to edit a few things in this like CFG->adminpw. Just edit these in place and they'll be updated.
  • Go to http://localhost:8888/tsugi and you should be all set.

Method 2: Manual install

  • Create a database and get authentication info for the database (MySQL 8.0 will need different commands):

      CREATE DATABASE tsugi DEFAULT CHARACTER SET utf8;
      CREATE USER 'ltiuser'@'localhost' IDENTIFIED BY 'ltipassword';
      GRANT ALL ON tsugi.* TO 'ltiuser'@'localhost';
      CREATE USER 'ltiuser'@'127.0.0.1' IDENTIFIED BY 'ltipassword';
      GRANT ALL ON tsugi.* TO 'ltiuser'@'127.0.0.1';
    
      Or
    
      CREATE DATABASE tsugi DEFAULT CHARACTER SET utf8;
      GRANT ALL ON tsugi.* TO ltiuser@'localhost';
      GRANT ALL ON tsugi.* TO ltiuser@'127.0.0.1';
      SET PASSWORD FOR 'ltiuser'@'localhost' = PASSWORD('ltipassword');
      SET PASSWORD FOR 'ltiuser'@'127.0.0.1' = PASSWORD('ltipassword');
    
  • Copy the file config-dist.php to config.php and edit the file to put in the appropriate values. Make sure to change all the secrets. If you are just getting started turn on DEVELOPER mode so you can launch the tools easily. Each of the fields is documented in the config-dist.php file - here is some additional documentation on the configuration values:

    http://do1.dr-chuck.com/tsugi/phpdoc/classes/Tsugi.Config.ConfigInfo.html

  • Go to the main page, and click on "Admin" to make all the database tables - you will need the Admin password you just put into config.php. If all goes well, lots of tables should be created. You can run upgrade.php more than once - it will automatically detect that it has been run.

Production instances

There is an entire repository that contains various build / deploy documentation showing how to install on EC2, Docker, Digital Ocean and Ubuntu.

https://github.com/tsugiproject/tsugi-build

These scripts make sure you have all the necessary pre-requisites installed and configured.

Adding Some Tools

If you are just exploring Tsugi, or doing a developer bootcamp, you can add some tools from some of the other repositories:

  • If you set the $CFG->install_path and go into the Admin interface, you can use "Manage Installed Modules" to install tools from Tsugi Tools

  • Tsugi Module Sample Code - These are relatively short bits of code that you can look at as you write your own Tsugi Module.

  • Tsugi Developer Exercises - This is a set of exercises of increasing difficulty suitable for a class or workshop. Working solutions are provided online. Source code for working solutions is only available to instructors that contact Dr. Chuck.

  • Sample Tsugi Module - Copy this if you want to start a fresh Tsugi Module from scratch. If you are building a new tool from scratch, you should build it as a "Tsugi Module" following all of the Tsugi style guidance, using the Tsugi browser environment, and making full use of the Tsugi framework. This repository contains a basic "Tsugi Module" you can use as a starting point.

  • Sample Tsugi-Enabled Application - You can also use Tsugi as a library and add it to a few places in an existing application. This repository contains sample code showing how to use Tsugi as a library in an existing application.

Each of these repositories contain instructions on how to install, configure, and hook each of these applications into your Tsugi instance. Once you install a new module or modules, you will need to re-run the Admin / Database Upgrade process to create the new tables required by the new applications.

We have a short document on how to check out all of the above tools and set up the configuration for them.

Developer Documentation

You can view some of the developer documentation for the PHP version of Tsugi at:

Other Repositories

The Tsugi Administration Console and Tsugi Modules / Applications depend on two other repositories:

  • Tsugi PHP Library - This is the code for the Tsugi run-time used by the Tsugi administration console and Tsugi PHP Modules and Applications.

  • Tsugi Static Content - This repository contains JavaScript, images, and CSS files shared across the various Tsugi implementations (PHP, Java, and NodeJS). The static content is available at https://static.tsugi.org/ - if you like you can check out your own copy of this repo locally or for your production environment and point your Tsugi config.php at your own copy of the library.

Other Languages

There were some emergent efforts to port the core Tsugi code to Java and Node. Partial implementations were built with the hopes that those interested in these languages would pick the code up, use it, and invest in those implementations. This has not happened so those projects are deprecated until some resources show up.

Going forward, there is an effort to increasingly move away from PHP and towards Python in a series of careful steps that won't break existing tools or servers.

The first step is to build a way to develop and host Python-based tools and then being to build a parallel version of the Tsugi core code and administration in Python.

You can play with an early version of a Tsugi Python Tool.

While the PHP Implementation of Tsugi is the most well developed, there are additional Tsugi implementations being developed:

  • Tsugi Java This is a reasonably complete implementation of the Tsugi run-time in Java. It shares low level IMS libraries with Sakai and is ready for production use.

  • Tsugi NodeJS - This is early pre-emergent code and not under active development.

Tsugi Developer List

Please join the Tsugi Developer List so you can stay up to date with the progress regarding Tsugi.

tsugi's People

Contributors

amodell avatar andrewniekamp avatar apetro avatar aqeel-tkxel avatar azeckoski avatar btopro avatar buckett avatar cfilkins avatar cleblond avatar corne-oosthuizen avatar csev avatar davidpbauer avatar eduquenoy avatar favour-olumese avatar granludo avatar i-do-dev avatar jonespm avatar jonhartm avatar maurercw avatar mkuehn10 avatar mlhess avatar nguyen26052004 avatar ottenhoff avatar peppersc avatar profmikegreene avatar robtom avatar sallakarppinen avatar turril avatar zhuoy121 avatar ziaulrehman40 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tsugi's Issues

LCM program

plz help me in this code it goes in infinite loop.

p = int(input("Enter how many numbers you want to enter:"))
def bubbleSort(l):
for passnum in range(len(l)-1,0,-1):
for i in range(passnum):
if l[i]>l[i+1]:
temp = l[i]
l[i] = l[i+1]
l[i+1] = temp

l = [int(input("Enter the numbers :")) for _ in range(p)]
bubbleSort(l)
l.reverse()
max = l[0]
while(1):
for h in range(len(l)):
if(max%l[h] == 0):
print "LCM is:",max
break
max = max + 1
print "Thank you"

Write a collaborative editing tool

This will meet two different use cases that are not exactly a wiki - but add wiki like functionality to LMS systems:

  • A large single document editable by the whole class where change tracking is important
  • A collaborative editing document for small groups within a course where tracking is important

lib/lms_lib.php cannot be parsed correctly under certain PHP version

Right after cloning the repository and correctly setting up config.php, PHP gives an error:

unexpected end of file in /tsugi/lib/lms_lib.php
PHP Stack trace:, referer: http://localhost/tsugi/dev.php
PHP 1. {main}() /tsugi/dev.php:0, referer: http://localhost/tsugi/dev.php
PHP 2. require_once() /tsugi/dev.php:4, referer: http://localhost/tsugi/dev.php
PHP 3. require_once() /tsugi/config.php:99, referer: http://localhost/tsugi/dev.php

After removing lines 1025-1031 of lms_lib.php, the error is resolved.

@csev

Many links no longer work

I just upgraded to the latest version and now many of the links in the UI no longer work. This seems to be due to the fact that ".php" is missing from the URL's. For example, the upgrade link on the main page is "/admin/upgrade", and when I click it, gives a "not found" error.
Was there a change that required me to reconfigure something so that ".php" was inferred?

Abstract deploy specific changes to a user / config directory

Something from ELMS:LN / Grav land. Grav abstracts all changes made after deploy into the user directory. This makes it super easy to know what to upgrade, what to version control, and where all credential data is vs what's safe to give out. ELMS:LN also does something similar using symlinks where all of our deploy specific changes actually live in a config directory. In practice what happens:
https://github.com/elmsln/elmsln-config-example is git cloned and replaces config folder in elmsln high level structure
https://github.com/elmsln/elmsln/blob/master/.gitignore#L5 ensures it's ignored from VC

Deploy UX that will never cause a data loss as a result:

cd /var/www/elmsln
git fetch --all
git reset --hard origin/master

Or when new version of our codebase release
cd /var/www/elmsln && git pull origin 0.10.x will safely work on any deploy that's ever made which doesn't modify this core convention. This allows us to start automating deployment and maintenance scripts.

This will never blow away anything made after the initial stamp down of the data. It's not to say my structure is right, just that I know it helped our developer UX immensely / simplified process after the fact. Grav's user folder offers similar workflow advantages when it comes to upgrading "core" at a later date in the same regard.

Having some kind of error issue

I am learning files in python. Actually in this I am reading a file in which extracting the lines which starts with From and then splitting the line into individual words. Then I am storing the line_split[1] into a list and then printing the list.
In output while printing the list I am getting each output twice. why?

name = input("Enter file:")
if len(name) < 1 : name = "mbox-short.txt"
handle = open(name)
count=0
d=list()
for line in handle:
if not line.startswith('From'):
continue
else:
line_split=line.split()
d.append(line_split[1])
#count+=1
print(d)
dct=dict()
for value in d:
dct[value]=dct.get(value,0)+1
maximum=max(dct.values())
final=[key for key,value in dct.items() if value==maximum]
print(key,maximum)
#print(count)'''

CANVAS: Handle same issuer for different(almost all) sites(deployments)

NOTE: This issue is more like an issue with canvas's implementation of LTI, but canvas being such a big player in the space, we need to work out to see what we can do to support their implementation in this regard.

Problem in canvas (iss, issuer):

Issue is, as described in the docs:

This requests contains an issuer identifier (iss) to recognize Canvas is launching the tool. As the issuer, Instructure-hosted Canvas intances all use the following, regardless of the specific account domain(s) that the tool was launched from:

https://canvas.instructure.com (Production environment launches)
https://canvas.beta.instructure.com (Beta environment launches)
https://canvas.test.instructure.com (Test environment launches)

And as a matter of fact, i recently did a canvas deployment, and on our xyz.com domain where canvas in hosted, we are getting https://canvas.instructure.com as issuer instead of xyz.com.
I know we can change the issuer to anything doing some config, but thats only us, we can't force everyone to set proper and unique issuer ids in their canvas systems. And also, instructor's hosted canvas instances would still have this same issuer despite whatever the domain/subdomain is.

Related links:
1- https://community.canvaslms.com/thread/36682-lti13-how-to-identify-clientid-and-deploymentid-on-launch#comment-153280
2- https://community.canvaslms.com/message/202373-issuer-identifieriss-issues-finding-iss-and-uniqueness-of-iss

Problem in TSUGI because of above:

Because of the uniqueness validation on issuer Id in TSUGI(first field at /admin/key/issuer-add form), we can really just add 1 canvas site as issuer, we can't really support multiple sites because no matter what the domain of the site is, with default configs, it will give iss(issuer id) as https://canvas.instructure.com.

I hope i have explained the problem correctly, if not let me know and i can re-phrase.

We want to work this out in tsugi codebase and share the solution with community. We are just looking for some hints as to what can be a good approach to fix this issue(in timely manner).

Python's sorted() does not work

I was working on one assignment of PR4E. I had a dictionary which contains a string as its key and the number of times it occurs in a document is its value.

For example, myDict = {'My String':1, 'Another String': 2, 'Third String':7}.

I wanted to sort the dictionary on its values so I can get the key with max value. I used sorted function to do the job.

sorted(myDict.items(), key = lambda myDict: myDict[1], reverse=True)

When I run the script on my laptop it runs perfectly giving me the sorted (descending order) dictionary as list of tuples. But, on autograder, it somehow fails to sort the dictionary on values.

Expected Output after sorted(): [('Third String', 7), ('Another String', 2), ('My String', 1)]
Autograder Output after sorted(): [('Another String', 2), ('My String', 1), ('Third String', 7)]

What can be wrong here?

Make the minimum PHP Version from 5.5 to 7.2 for Tsugi

Currently the minimum version for Tsugi is 5.5 - mostly because the first few versions of 7 were wonky. Because of a bug that was not fixed until 7.1.9, Tsugi has some wonky JavaScript in Output.php to compensate for the bugs in cookiless session support in PHP 7.

https://www.php.net/ChangeLog-7.php#7.1.9
https://bugs.php.net/bug.php?id=74892

While Tsugi does not currently have lots of 7-special syntax in the code base (perhaps none), it would be nice to remove this wonky workaround 7.0 / 7.1 code from three years ago. But we need folks to get to 7.2 or later before we remove the code.

7.2 Write a program that prompts for a file name, then opens that file and reads through the file, looking for lines of the form: X-DSPAM-Confidence: 0.8475 Count these lines and extract the floating point values from each of the lines and compute the average of those values and produce an output as shown below. Do not use the sum() function or a variable named sum in your solution. You can download the sample data at http://www.py4e.com/code3/mbox-short.txt when you are testing below enter mbox-short.txt as the file name.

I need help in this program.

Badge assertion ID should be unique, not same as unbaked image URI

After signing up for py4e I was pleasantly surprised to have been awarded an Open Badge. However, my Badgr Backpack doesn't accept it and unfortunately, the only message given is Badge import failed. The given badge failed validation: [object Object], [object Object].

My educated guess at this validation failure is that, after extracting the assertion data from the PNG using the hosted obi-sample and inspecting it, one issue may be that the URI for the assertion is not for the assertion, but for the unbaked image. The line that adds that URI is

"id": "<?= $image ?>",

Of course there may be other issues. Badgr may not support older Open Badge specifications – I don't know.

I understand that awarding badges may not be core to TSUGI (looking at earlier issues csev/obi-sample#2 and csev/obi-sample#3 as well), but I couldn't find an issue in this repository and did want to mention the incompatibility. If awarding Open Badges is indeed not part of TSUGI anymore, maybe documentation could point at LMS-asserted badges, awarded by the LMS itself (like Brightspace appears to do) or through external issuers like Credly or Badgr (like Canvas and Moodle do AFAIK).

New install erroring out on initial db upgrade for blog_file table

INDEX `{$CFG->dbprefix}blob_indx_2` (`path(256)`),

Is this a bug? Should it be path(2048)?

My admin/upgrade output below

Checking plugins table...
Checking for any needed upgrades...
Checking admin/lti/database.php ...
-- Checking table lti_key
-- Checking table lti_user
-- Checking table lti_context
-- Checking table lti_link
-- Checking table lti_link_activity
-- Checking table lti_membership
-- Checking table lti_event
-- Checking table lti_link_user_activity
-- Checking table lti_service
-- Checking table lti_result
-- Checking table lti_nonce
-- Checking table lti_domain
-- Checking table tsugi_string
-- Checking table profile
-- Checking table cal_event
-- Checking table cal_key
-- Checking table cal_context
-- Checking upgrade admin/lti/database.php 
-- Current data model version 201801271430 
Checking admin/key/database.php ...
-- Checking table key_request
-- Checking upgrade admin/key/database.php 
-- Current data model version 2014042200 
Checking admin/blob/database.php ...
-- Checking table blob_file
-- Creating table blob_file
Unable to create create table blob_file ( file_id INTEGER NOT NULL KEY AUTO_INCREMENT, file_sha256 CHAR(64) NOT NULL, context_id INTEGER NULL, link_id INTEGER NULL, file_name VARCHAR(2048), deleted TINYINT(1), contenttype VARCHAR(256) NULL, path VARCHAR(2048) NULL, content LONGBLOB NULL, blob_id INTEGER, json TEXT NULL, created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, accessed_at TIMESTAMP NOT NULL DEFAULT '1970-01-02 00:00:00', INDEX `blob_indx_1` USING HASH (`file_sha256`), INDEX `blob_indx_2` (`path(256)`), CONSTRAINT `blob_ibfk_1` FOREIGN KEY (`context_id`) REFERENCES `lti_context` (`context_id`) ON DELETE SET NULL ON UPDATE CASCADE ) ENGINE = InnoDB DEFAULT CHARSET=utf8 42000:42000:SQLSTATE[42000]: Syntax error or access violation: 1072 Key column 'path(256)' doesn't exist in table
create table blob_file ( file_id INTEGER NOT NULL KEY AUTO_INCREMENT, file_sha256 CHAR(64) NOT NULL, context_id INTEGER NULL, link_id INTEGER NULL, file_name VARCHAR(2048), deleted TINYINT(1), contenttype VARCHAR(256) NULL, path VARCHAR(2048) NULL, content LONGBLOB NULL, blob_id INTEGER, json TEXT NULL, created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, accessed_at TIMESTAMP NOT NULL DEFAULT '1970-01-02 00:00:00', INDEX `blob_indx_1` USING HASH (`file_sha256`), INDEX `blob_indx_2` (`path(256)`), CONSTRAINT `blob_ibfk_1` FOREIGN KEY (`context_id`) REFERENCES `lti_context` (`context_id`) ON DELETE SET NULL ON UPDATE CASCADE ) ENGINE = InnoDB DEFAULT CHARSET=utf8

Why is Google required to run this?

"You need to set $CFG->google_client_id in order to use Google's Login" -- Beyond the "we don't feel like supporting login systems" message it gives, is there a real reason? Otherwise this would be very difficult to get into certain environments unless this is only the requirement for the admin user to get logged in (tho also odd since I had to put in a password into a file manually in order to use this)

Refactor where the issuer and client_id/aud is stored

In order to better service multi-tenant SASS installations and to better handle LTI 1.1 -> LTI Advantage transition, the lti13_ fields need to move from the lti_key table and into a new lti_issuer table with a many-to-one relationship between keys and issuers.

Write a program to prompt the user for hours and rate per hour using input to compute gross pay. Pay should be the normal rate for hours up to 40 and time-and-a-half for the hourly rate for all hours worked above 40 hours. Put the logic to do the computation of pay in a function called computepay() and use the function to do the computation. The function should return a value. Use 45 hours and a rate of 10.50 per hour to test the program (the pay should be 498.75). You should use input to read a string and float() to convert the string to a number. Do not worry about error checking the user input unless you want to - you can assume the user types numbers properly. Do not name your variable sum or use the sum() function.

Help I need help with this.

largest = 0
smallest = 0

while True:
num = input("Enter a number: ")
if num == "done" :
break
try:
num == float (num)
except:
print ("Invalid input")

#############

if num > largest:
num is largest
print("Maximum is num")

if num < smallest:
num is smallest
print("Minimum is smallest")

*Im not sure but I have been working on this for awhile. I need the result to read:
Invalid input
Maximum is 10
Minimum is 2

python assignment chapter 4 exercise 4.6

def computepay(hours,rate):
if h > 40:
reg = hours * rate
otp = (hours - 40) * (rate * 0.5)
pay = reg + otp
else:
pay = hours * rate
return pay

hrs = input("Enter Hours:")
rte = input("Enter Rate:")
h = float(hrs)
r = float(rte)
xp = computepay(h, r)
print("Pay",xp)
#what is the wrong with may program. everything is correct put the autograder does not give approve it!!!!?

Convert $CFG options to be YAML or JSON driven

It seems like configuration settings are more or less thrown in as people think of them into config-dist.php. Would it possibly be easier to read as well as modify and put into version control if this was abstracted to a yaml or json file that config then loads in? This would also make it easier to write a CLI / YO that could write the config options automatically for people increasing devUX down stream

Check if it is OK to use client_id as subject instead of key_key

In Context::getGradeToken - we sent the subject as key_key on token requests - key_key was a Tsugi-made up string that was never part of the security contract prior to the issuer refactor. This passed the cert suite and interacted with all the LMSs successfully this way. Post the issuer refactor - this looks like it really means to be the client_id. Make sure after this change is tested to go into Context.php and cleanup all the TODOs.

canvas lti 1.3 JSON does not work, gives 422 un-processable entity

Exploring my canvas installation logs, it was complaining about missing keys in public_jwk, missing keys were alg and use to be specific.
What works though is if i add these keys as per given from https://tsugi.xyz.org/lti/keyset?issuer=https%3A%2F%2Fcanvas.instructure.com end point.

So i think these missing keys should be added in the "Canvas Configuration URL (json)" generated at this endpoint https://tsugi.xyz.org/lti/store/canvas-config.json?issuer=https%3A%2F%2Fcanvas.instructure.com

Fix the duplicate profile issue

Prior to January 2017, Tsugi's login.php made an incorrect assumption about the "GUID" returned for a user from Google upon successful login. The assumption was that this was a persistent identifier - which turns out not to be the case. So every month or so, a user might get an additional profile but not an extra user record. In January 2017, code was added to use the email as the logical key in the profile instead of the user "ID" from Google and to use only the most recently created profile and ignore the earlier profiles.

Enough time has passed, that there is a need to teach "Upgrade Database" to clear out the old entries.

Remove support for LTI 2.0

Since LMS vendors are walking away from LTI 2.0 in the next 12 months, I will get a head start and remove LTI 2.0 support from Tsugi. If this is a problem for anyone - please let me know. I am assuming that no one every used Tsugi LTI 2.0 except to test Sakai, Canvas and Blackboard.

I will snap a release and branch before I drop all that code - but it won't be long unless I hear from folks really soon.

Upgrade to Bootstrap v4.5

I'd like to upgrade Tsugi to use Bootstrap version 4.5.0. This version is a major rewrite from v3, so many aspects of Tsugi will need to be updated. https://getbootstrap.com/docs/4.5/migration/

I'm not sure the best way to avoid breaking Tsugi tools as they may rely on or assume that Bootstrap 3 is included and piggy-back off of the styling. Any suggestions are welcome.

Deal with Servers that Filter the Authorization: Header - Usually in a Proxy Layer

Lots of servers are configured with some kind of a proxy layer that does not pass the "Authorization" header. This might be automatic checking of basicauth or perhaps just overly conservative default configurations. The (quite non-standard) approach I have taken is to replicate the "Authorization:" header in the "X-Oauth1-Authorization:" header. Nothing different - just send both headers with identical information. Incoming OAuth 1.0a protected web services can look for "X-Oauth1-Authorization" when "Authorization" is not present.

Some may criticise this but I see no alternative. Hosting providers like 1and1 simply will never listen to someone who begs to configure "Authorization" to be passed into Apache. Ah well.

This has no effect on POST data - just header data in web service requests.

Comments welcome.

Database upgrade not working if $CFG->dbprefix is set

If $CFG-dbprefix is set and columns need to be added, the table name is wrong in th eupgrade SQL, because the $CFG->dbprefix is prepended twice (at least in two locations)

admin/lti/database.php cf lines 690-704: $CFG->dbprefix is added on line 696 and on 700. As a test removed it on line 700.

Similar issue in admin/blob/database.php lines 95 - 109

Security issue: terrible xss attack vector in "output.php" file

Dear dev,
If you are echoing into JS inside a HTML document (as you are in your example), you risk opening up a huge XSS vulnerability.

echo('            context_title: '.json_encode($CONTEXT->title).",\n");
...

you must use "JSON_HEX_TAG" in the json_encode function.
instead of above code you must use below:

echo('            context_title: '.json_encode($CONTEXT->title).",\n",JSON_HEX_TAG);
...

https://security.stackexchange.com/questions/175630/passing-php-code-directly-into-javascript-in-html5
https://stackoverflow.com/questions/20942452/why-does-script-cause-a-dom-tree-break-on-the-browser
https://security.stackexchange.com/questions/110101/proper-way-to-protect-against-xss-when-output-is-directly-into-js-not-html

Re-Implement the LTI 1.1 to LTI Advantage transition strategy to align with latest specs

In the past few months, the LTI Working Group has added a lot of detail to the LTI 1.1 to LTI Advantage migration strategy. The approach used in Sakai-19 reflected the strategy of about 3 months ago which has been changed and improved through the WG.

https://jira.sakaiproject.org/browse/SAK-41781

This JIRA will be the modifications to align with the transition guide:

https://www.imsglobal.org/spec/lti/v1p3/migr

New to python

Hello everyone
am new to python and coding and programming in general but want to learn more but i dont reall know the rith part to follow.
i need some guidance

Removing sample keys

Issue

On/admin/key/keys there are some keys that come installed by default. I wanted to remove them so I did.

However, after removing all the keys, it blocks the creation of a new key

?php if ( count($newrows) < 1 ) { ?>
<p>
You have no Tenant keys for this system.
</p>
<?php } else {
    $extra_buttons = array(
        "Insert New Key" => "key-add"
    );
    Table::pagedTable($newrows, $searchfields, false, "key-detail", false, $extra_buttons);
}
if ( isAdmin() ) { ?>
<?php } ?>


excepted result

You should always be able to add keys even if you have no keys in your database.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.