Assignment Feedback

The Assignment Feedback userscript is used to display the student's feedback for graded assignments on the assignments page.

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

You will need to install an extension such as Tampermonkey to install this script.

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name           Assignment Feedback
// @version        2.0
// @include        https://ggc.view.usg.edu/d2l/lms/dropboclassID/user/folders_list.d2l?ou=*
// @description    The Assignment Feedback userscript is used to display the student's feedback for graded assignments on the assignments page.
// @namespace https://greasyfork.org/users/411524
// ==/UserScript==

//regEx filter for d2l assignments
let regEx = /\b(\bhttps?:\/\/\ggc\.view\.usg\.edu\/d2l\/lms\/dropbox\/user\/folder_user_view_feedback\.d2l\?db=\S+)/g;

//Selects links in the evaluation status column
var links = document.getElementsByClassName("d2l-link d2l-link-inline");

$(function(){
    $.get(links[1], function(result){
        var obj = $(result).find('body');
        var PageText = $(result).find('.fct_w').text();
        console.log(PageText);
        // create div
        var newDiv = document.createElement("div");
        //add id to div
        newDiv.setAttribute("id", "test");
        var currentDiv = document.getElementById("div1");
        $(document.getElementsByClassName(".d_gc.d_gt)")).append(newDiv)
        var newContent = document.createTextNode(PageText);
        $('.d_gc.d_gt:nth-child(4n)').each(function(eachCounter){
            $(this).attr("id", "id-"+parseInt(eachCounter+1));
        });
        $(".d_gc.d_gt:nth-child(4n)").append('<br/>',newContent,newDiv)
        // $("id-2").load( "https://ggc.view.usg.edu/d2l/lms/dropbox/user/folder_user_view_feedback.d2l?db=1619880&grpid=0&isprv=0&bp=0&ou=1802552 ('.fct_w').text()" );

        function makeTable(container, data) {
            var table = $("<table/>").addClass('CSSTableGenerator');
            $.each(data, function(rowIndex, r) {
                var row = $("<tr/>");
                $.each(r, function(colIndex, c) {
                    row.append($("<t"+(rowIndex == 0 ?  "h" : "d")+"/>").text(c));
                });
                table.append(row);
            });
            return container.append(table);
        }

        $(document).ready(function() {
            var data = [["Assignment Feedback"], //headers
                ["Assignment 1", PageText],
                ["Assignment 1", PageText],
                ["Assignment 1", PageText]]
            var cityTable = makeTable($(document.body), data);
        });
    });
});