Commit af815abe by Piotr Mitros

Beginning refactoring grades out of profile view for use in gradebook

parent 2461669e
......@@ -4,6 +4,7 @@ import logging
import os
import re
import sys
import urllib
from datetime import timedelta
from lxml import etree
......@@ -31,6 +32,9 @@ log = logging.getLogger("mitx.courseware")
timedelta_regex = re.compile(r'^((?P<days>\d+?) day(?:s?))?(\s)?((?P<hours>\d+?) hour(?:s?))?(\s)?((?P<minutes>\d+?) minute(?:s)?)?(\s)?((?P<seconds>\d+?) second(?:s)?)?$')
def format_url_params(params):
return [ urllib.quote(string.replace(' ','_')) for string in params ]
def parse_timedelta(time_str):
parts = timedelta_regex.match(time_str)
if not parts:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment