Assignment Feedback

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

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==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);
        });
    });
});