[~[tlist_sql;
	SELECT 
		sections.id,
		courses.course_name, 
		sections.section_number,
		sections.expression,
		terms.abbreviation,
		CASE 
			WHEN sysdate BETWEEN terms.firstday AND terms.lastday THEN 'true'
			ELSE 'false'
		END currentSection
	FROM sections
	JOIN courses ON courses.course_number = sections.course_number
	JOIN terms ON terms.id = sections.termid
		AND terms.schoolid = sections.schoolid
		AND terms.yearid = ~(curyearid)
	JOIN sectionteacher ON sectionteacher.sectionid = sections.id
	WHERE sectionteacher.teacherid = ~[x:userid]
;]
	{
		"id":"~(id)",
		"course":"~(course;JSON)",
		"section_number":"~(secNum;JSON)",
		"expression":"~(exp;JSON)",
		"term":"~(term;JSON)",
		"current":~(current),
		"sectionEnrollments":[]
	},
[/tlist_sql]{}]