AnsweredAssumed Answered

Using JS to add content to Syllabus

Question asked by Matthew Jennings on Dec 15, 2015
Latest reply on Dec 28, 2015 by Kenneth Larsen

I was wondering if anyone could help me out with a .js  solution since that is not my strength and we have no programmers. All of our courses are required to uses the Syllabus as the course homepage. Currently we are embedding an iframe of a custom webpage (currently - UAB SON Slider)  on all of the courses homepages so that we can periodically update the page and it updates in all of our courses. This has worked of, but I have to make some compromises that I have never been happy with.

 

iframed_content.png

 

Today I was thinking that maybe this could be done with .js below the "Jump to Today" link similar to the way we are able to append the menu across the top of the old UI:

 

(function() {
  var menu = $('#menu');
  if (!menu.length) return;
  //Menu Item Support


  var stuResources = $('<li/>', {
  'class': 'menu-item',
  html: '<a class="menu-item-title" href="/">Student Resources<span class="menu-item-title-icon"></span><i class="icon-mini-arrow-down"></i></a><div class="menu-item-drop"><table cellspacing="0"><tbody><tr><td class="menu-item-drop-column">'+
  //'<h2 id="test" >Resources</h2>
  '<ul class="menu-item-drop-column-list">'+
  //List items
  '<li><a href="http://www.uab.edu/students/one-stop" target="_blank"><span class="name ellipsis">UAB One Stop</span></a></li>'+
  '<li><a href="http://www.uab.edu/libraries/" target="_blank"><span class="name ellipsis">UAB Libraries</span></a></li>'+
  '<li><a href="http://www.uab.edu/students/academics/exceptions-to-academic-policy" target="_blank"><span class="name ellipsis">UAB Academic Policies</span></a></li>'+
  '<li><a href="http://www.uab.edu/students/academics/academic-calendar" target="_blank"><span class="name ellipsis">UAB Academic Calendar</span></a></li>'+
  '<li><a href="http://www.uab.edu/handbook/" target="_blank"><span class="name ellipsis">UAB Student Handbook</span></a></li>'+
  '<li><a href="http://www.uab.edu/students/services" target="_blank"><span class="name ellipsis">UAB Services Directory</span></a></li>'+
  '<li><a href="http://www.uab.edu/students/services/disability-support-services" target="_blank"><span class="name ellipsis">UAB Disability Services</span></a></li>'+
  '<li><a href="http://www.uab.edu/writingcenter/" target="_blank"><span class="name ellipsis">UAB Writing Center</span></a></li>'+
  '<li><a href="http://www.uab.edu/elearning/students/canvas-tutorials" target="_blank"><span class="name ellipsis">Canvas Student Tutorials</span></a></li>'+
  '<li><a href="http://www.uab.edu/elearning/how-online-learning-works" target="_blank"><span class="name ellipsis">Online Student Success</span></a></li>'+
  '<li><a href="http://www.uab.edu/careerservices/" target="_blank"><span class="name ellipsis">UAB Career & Professional Development</span></a></li>'+
  '<li><a href="http://www.uab.edu/elearning/academic-technology/student" target="_blank"><span class="name ellipsis">UAB Academic Technologies</span></a></li>'+
  //Ending
  '</ul></td></tr></tbody></table></div>'
  });


  men
menu.append(stuResources);
})

 

 

So I guess my question is this - is there a way to append the syllabus so that it will write some standard content within all of our courses? The slide we are using is created entirely out of HTML & CSS, so I would think I could add the CSS to our global CSS and add the HTML similar to above. I just don't know how to write the call to put it in the correct place.

 

I hope I have given enough of an idea of what I am trying to do. I am totally open to feed back on ideas or reasons that this  is a completely insane idea.

Outcomes