Skip to content

Commit

Permalink
Added search for Copy Item
Browse files Browse the repository at this point in the history
  • Loading branch information
Niddrym committed Jan 21, 2022
1 parent f359a03 commit 90cf8df
Show file tree
Hide file tree
Showing 11 changed files with 74 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Blackboard Instructor Enhancements
55 changes: 55 additions & 0 deletions CopyItem.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
let defaults={
gcMaxTweak:true,
gcFilterTweak:true,
gcScrollBarTweak:true,
dbAddDownloadAll:true,
dlAssignmentsShowAll:true,
userShowAll:true,
needsGradingShowAll:true,
poolQuestionsShowAll:true,
gradeQuestionsShowAll:true,
fixPaste:true,
addDisableUsers:true,
hideRemoveUsers:true,
gcEnableDisableUsers:true,
gcEnableScrollOnTable:true,
gradingAddStudentIDs:true,
gradeDetailsShowJumpTo:true,
gcHoverAddedDate:true,
gcCopyUsernames:true,
gcDeleteUsers:true,
copyItemSearchCourses:true,
gcCopyUsernamesDel:'; ',
gcHScrollSensitivity:100,
gcVScrollSensitivity:100
};


browser.storage.sync.get(defaults).then(function(options){
/*
*/

var script = document.createElement("script");
if(options.gradingAddStudentIDs){
script.innerHTML = `
jQuery(document).ready(()=>{
let select2Script = document.createElement("script");
let select2Css = document.createElement("link");
select2Script.type="text/javascript";
select2Script.src="https://cdnjs.cloudflare.com/ajax/libs/chosen/1.8.7/chosen.jquery.min.js";
select2Css.href="https://cdnjs.cloudflare.com/ajax/libs/chosen/1.8.7/chosen.min.css";
select2Css.rel="stylesheet";
document.head.appendChild(select2Script);
document.head.appendChild(select2Css);
select2Script.onload = ()=>{
jQuery("#destCourse").chosen();
}
});
`;
}
document.body.appendChild(script);
});
1 change: 1 addition & 0 deletions DiscussionBoardTweak.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ let defaults={
gcHoverAddedDate:true,
gcCopyUsernames:true,
gcDeleteUsers:true,
copyItemSearchCourses:true,
gcCopyUsernamesDel:'; ',
gcHScrollSensitivity:100,
gcVScrollSensitivity:100
Expand Down
1 change: 1 addition & 0 deletions GradeAttempt.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ let defaults={
gcHoverAddedDate:true,
gcCopyUsernames:true,
gcDeleteUsers:true,
copyItemSearchCourses:true,
gcCopyUsernamesDel:'; ',
gcHScrollSensitivity:100,
gcVScrollSensitivity:100
Expand Down
1 change: 1 addition & 0 deletions GradeCenterTweak.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ let defaults={
gcHoverAddedDate:true,
gcCopyUsernames:true,
gcDeleteUsers:true,
copyItemSearchCourses:true,
gcCopyUsernamesDel:'; ',
gcHScrollSensitivity:100,
gcVScrollSensitivity:100
Expand Down
1 change: 1 addition & 0 deletions GradeDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ let defaults={
gcHoverAddedDate:true,
gcCopyUsernames:true,
gcDeleteUsers:true,
copyItemSearchCourses:true,
gcCopyUsernamesDel:'; ',
gcHScrollSensitivity:100,
gcVScrollSensitivity:100
Expand Down
2 changes: 2 additions & 0 deletions background.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ let defaults={
gradeDetailsShowJumpTo:true,
gcHoverAddedDate:true,
gcCopyUsernames:true,
gcDeleteUsers:true,
copyItemSearchCourses:true,
gcCopyUsernamesDel:'; ',
gcHScrollSensitivity:100,
gcVScrollSensitivity:100
Expand Down
1 change: 1 addition & 0 deletions disableSelectedUsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ let defaults={
gcHoverAddedDate:true,
gcCopyUsernames:true,
gcDeleteUsers:true,
copyItemSearchCourses:true,
gcCopyUsernamesDel:'; ',
gcHScrollSensitivity:100,
gcVScrollSensitivity:100
Expand Down
8 changes: 7 additions & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@
"matches": ["*://*/webapps/gradebook/do/instructor/viewGradeDetails*"],
"all_frames": true,
"js": ["browser-polyfill.js","GradeDetails.js"]
},
{
"run_at": "document_end",
"matches": ["*://*/webapps/blackboard/content/copyItem.jsp*"],
"all_frames": true,
"js": ["browser-polyfill.js","CopyItem.js"]
}
],
"permissions": [
Expand Down Expand Up @@ -63,5 +69,5 @@
"default_title": "Blackboard Instructor Enhancements",
"default_popup": "options.html"
},
"web_accessible_resources": ["settings.json"]
"web_accessible_resources": ["settings.json","browser-polyfill.js.map"]
}
3 changes: 3 additions & 0 deletions options.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ <h2>Blackboard Instructor Enchancements</h2>
<div class="grid_checkbox"><input type="checkbox" id="fixPaste"></div>
<div class="grid_description"><label for="fixPaste">Fix pasting images into Text Areas</label></div>

<div class="grid_checkbox"><input type="checkbox" id="copyItemSearchCourses"></div>
<div class="grid_description"><label for="copyItemSearchCourses">Change the select box to a searchable select box for courses when copying an item</label></div>

<div class="grid_checkbox"><input type="checkbox" id="hideRemoveUsers"></div>
<div class="grid_description"><label for="hideRemoveUsers">Hide Remove Users in User Management</label></div>

Expand Down
1 change: 1 addition & 0 deletions options.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ let defaults={
gcHoverAddedDate:true,
gcCopyUsernames:true,
gcDeleteUsers:true,
copyItemSearchCourses:true,
gcCopyUsernamesDel:'; ',
gcHScrollSensitivity:100,
gcVScrollSensitivity:100
Expand Down

0 comments on commit 90cf8df

Please sign in to comment.