Skip to content

pushyamig/canvas_course_manager

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Canvas Course Manager

Project Description

The Canvas Course Manager (CCM) is an application that will be able to be used by instructors and the service center alike. The current functionality searches all courses for which a given user has the 'teacher' role within a given semester and allows the combination of sections via drag-and-drop interface for Service Center or point-and-click interface for LTI users. The user can also determine if the course is used before the sections are moved. In addition, the functionality for adding friend accounts is available. Not only can a 'teacher' create friend accounts for non-umich accounts, but it will also be possible to add a created friend account to a course. The service center alone will have the ability to rename a course.

Build Directions

Dependencies:

git clone https://github.com/tl-its-umich-edu/esbUtils.git

cd esbUtils

$mvn clean install

git clone https://github.com/tl-its-umich-edu/canvas_course_manager

cd canvas_course_manager

Build, deploy run:

  1. sectionsTool $mvn clean install

  2. Copy to tomcat/webapp

  3. Add the property files on linux box ccm.properties and ccm-secure.properties, then in JAVA_OPTS add the
    -DccmPropsPathSecure=file:/file-path/ccm-secure.properties
    -DccmPropsPath=file:/file-path/ccm.properties

  4. Add the following properties to ccm.properties:

    In addition to the properties below, there will also be several regular expression properties that will be used for validating Canvas or ESB API calls.

    • umich.friend.url= friend URL to be used
    • umich.friend.contactemail= Contact email used in friend template for users experiencing issues
    • umich.friend.referrer= URL to direct to Canvas
    • umich.friend.friendemail= File path to friend email template
    • umich.friend.requesteremail=File path to requester email
    • umich.friend.mailhost= always localhost
    • umich.friend.subjectline= Subject line for friend email
    • lti.url= URL to launch LTI tool
    • call.type= Either 'canvas' or 'esb'
    • stub.test= 'true' or 'false'
      • sis.report.ccm.support.address=group email for sending emaild
      • sis.polling.attempts=number of attempts to poll canvas default =10
      • sis.polling.sleeptime=often times(in seconds) to poll canvas default=60000
      • umich.sis.slowprocessemail=File path to requester email slowprocess-email.template
      • mail.debug.enabled='true' or 'false'
  5. Add the following 9 properties to ccm-secure.properties:

    • canvas.admin.token= Canvas Token
    • canvas.url= Canvas URL
    • use.test.url= Test user authentication
    • ldap.server.url= ldap URL
    • mcomm.group= MCommunity Group
    • umich.friend.ksfilename= file path to the keystore file ending in pkcs12
    • umich.friend.kspassword= password to above keystore file
    • lti.key= Numeric key to launch LTI tool
    • lti.secret=alpha numeric secret to launch LTI tool ######ESB bus Properties
    • esb.token.server=token server url
    • esb.prefix=instructors api call prefix
    • esb.key=key
    • esb.ibm.client.id=key
    • esb.secret=secret
    • esb.scope.instructors=
    • esb.grant.type=
  6. Invoke the following URL in your browser:
    http://localhost:PORT/canvasCourseManager/index-sc.vm?testUser=UNIQUENAME
    a. testUser parameter is not allowed in Prod and this is controlled by above property with value called use.test.url=false
    b. We will enable the cosign for authentication the user so we will get remote user info through that.

  7. Enable application level logging using the log4j.properties files. Put this file in tomcat/lib directory and add the content between the

    log4j.rootLogger=INFO, A1
    log4j.appender.A1=org.apache.log4j.ConsoleAppender
    log4j.appender.A1.layout=org.apache.log4j.PatternLayout
    # Print the date in ISO 8601 format
    log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
    # umich
    #log4j.logger.edu.umich=INFO
    log4j.logger.edu.umich=DEBUG 
    
  8. For Adding Build information to the Project Release candidate populate src/main/webapps/build.txt with information about the current build (GIT commit, build time, etc.). If using Jenkins to build the application, the following script placed in the "Execute Shell" part of the "Pre Steps" section would do the job:

    cd src/main/webapp
    if [ -f "build.txt" ]; then
       echo "build.txt found."
       rm build.txt
       echo "Existing build.txt file removed."
    else
       echo "No existing build.txt file found."
    fi
      touch build.txt
    
      echo "$JOB_NAME | Build: $BUILD_NUMBER | $GIT_URL | $GIT_COMMIT | $GIT_BRANCH | $BUILD_ID" >> build.txt
    
  9. In order to remote debug ccm application from Openshift, do oc port-forward' <pod-name> 5009. 5009 is the debug port opened for doing this. More Info https://docs.openshift.com/container-platform/3.4/dev_guide/port_forwarding.html

Notes

If use.test.url is true, users will be able to execute the tool as if authenticated as the user specified in the URL parameter ?testUser=uniqname. In Production this variable is false. Based on this property property testUser is not allowed in Production.

ldap is used for authorizing the user and he needs to be part of particular Mcommunity group to be authorized to use the tool.

During development we received the following error:

Failed to create input stream: Received fatal alert: handshake_failure

This error occurs when attempting to create a friend account with an unrecognized .pkc12 file which is required for the application. If this occurs, try getting a fresh copy of the .pkcs12 file.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 39.2%
  • HTML 31.6%
  • JavaScript 25.6%
  • CSS 2.3%
  • Other 1.3%