Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: merge 'develop' into 'main' #1130

Merged
merged 34 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
c05e253
chore: Spanish translations
pateljannat Nov 6, 2024
3ea52a4
Merge pull request #1101 from frappe/l10n_develop2
pateljannat Nov 7, 2024
2e0abad
feat: add required and make tab sticky in batches
iamejaaz Nov 7, 2024
2d5c76e
fix: show only courses with evaluator for batch evaluation
pateljannat Nov 8, 2024
4e61d56
fix: ignore user type for instructor field in course and batch form
pateljannat Nov 8, 2024
c5f091f
Merge pull request #1105 from pateljannat/issues-48
pateljannat Nov 8, 2024
71db3ae
chore: update POT file
frappe-pr-bot Nov 8, 2024
e933012
Merge branch 'develop' into make-tab-sticky
iamejaaz Nov 8, 2024
0dcfd7e
feat: add a required indicator to subject field
iamejaaz Nov 8, 2024
000d9db
fix: 500 error on get_branding api call
iamejaaz Nov 10, 2024
c51e7b0
feat: rich text editor in bio
iamejaaz Nov 10, 2024
3a1a843
Merge pull request #1110 from iamejaaz/error-on-branding-api
pateljannat Nov 11, 2024
c45da43
Merge pull request #1106 from frappe/pot_develop_2024-11-08
pateljannat Nov 11, 2024
fc8ef21
chore: French translations
pateljannat Nov 11, 2024
c0aecf3
chore: Spanish translations
pateljannat Nov 11, 2024
89a181c
chore: Arabic translations
pateljannat Nov 11, 2024
89222b2
chore: German translations
pateljannat Nov 11, 2024
4d16602
chore: Hungarian translations
pateljannat Nov 11, 2024
493b829
chore: Polish translations
pateljannat Nov 11, 2024
87c1c92
chore: Russian translations
pateljannat Nov 11, 2024
9a58f46
chore: Swedish translations
pateljannat Nov 11, 2024
234a24b
chore: Turkish translations
pateljannat Nov 11, 2024
17031f1
chore: Chinese Simplified translations
pateljannat Nov 11, 2024
67d265e
chore: Persian translations
pateljannat Nov 11, 2024
d644195
chore: Bosnian translations
pateljannat Nov 11, 2024
a7f8835
chore: Esperanto translations
pateljannat Nov 11, 2024
3473bdb
fix: misc issues
pateljannat Nov 12, 2024
78d289b
Merge pull request #1117 from frappe/l10n_develop2
pateljannat Nov 12, 2024
08ac394
Merge pull request #1112 from iamejaaz/bio-rich-text
pateljannat Nov 12, 2024
a643e9a
Merge pull request #1102 from iamejaaz/make-tab-sticky
pateljannat Nov 12, 2024
0c6029c
Merge pull request #1118 from pateljannat/issues-49
pateljannat Nov 12, 2024
24ffed1
chore: Turkish translations
pateljannat Nov 12, 2024
fb3d8e4
chore(release): Bumped to Version 2.11.0
frappe-bot Nov 13, 2024
f504841
Merge pull request #1119 from frappe/l10n_develop2
pateljannat Nov 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions frontend/src/components/Controls/Link.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<div class="space-y-1.5">
<label class="block" :class="labelClasses" v-if="attrs.label">
{{ attrs.label }}
<span class="text-red-500" v-if="attrs.required">*</span>
</label>
<Autocomplete
ref="autocomplete"
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/LiveClass.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
{{ __('Start') }}
</a>
<a
v-if="cls.date <= dayjs().format('YYYY-MM-DD')"
:href="cls.join_url"
target="_blank"
class="w-full cursor-pointer inline-flex items-center justify-center gap-2 transition-colors focus:outline-none text-gray-800 bg-gray-100 hover:bg-gray-200 active:bg-gray-300 focus-visible:ring focus-visible:ring-gray-400 h-7 text-base px-2 rounded"
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/Modals/AnnouncementModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<div class="">
<div class="mb-1.5 text-sm text-gray-600">
{{ __('Subject') }}
<span class="text-red-500">*</span>
</div>
<Input type="text" v-model="announcement.subject" />
</div>
Expand Down
7 changes: 6 additions & 1 deletion frontend/src/components/Modals/BatchCourseModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@
}"
>
<template #body-content>
<Link doctype="LMS Course" v-model="course" :label="__('Course')" />
<Link
doctype="LMS Course"
v-model="course"
:label="__('Course')"
:required="true"
/>
<Link
doctype="Course Evaluator"
v-model="evaluator"
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/Modals/ChapterModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
label="Title"
v-model="chapter.title"
class="mb-4"
:required="true"
/>
</template>
</Dialog>
Expand Down
14 changes: 13 additions & 1 deletion frontend/src/components/Modals/EditProfile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,18 @@
:label="__('Headline')"
class="mb-4"
/>
<FormControl type="textarea" v-model="profile.bio" :label="__('Bio')" />

<div class="mb-4">
<div class="mb-1.5 text-sm text-gray-600">
{{ __('Bio') }}
</div>
<TextEditor
:fixedMenu="true"
@change="(val) => (profile.bio = val)"
:content="profile.bio"
editorClass="prose-sm py-2 px-2 min-h-[200px] border-gray-300 hover:border-gray-400 rounded-md bg-gray-200"
/>
</div>
</div>
</template>
</Dialog>
Expand All @@ -81,6 +92,7 @@ import {
FileUploader,
Button,
createResource,
TextEditor,
} from 'frappe-ui'
import { reactive, watch, defineModel } from 'vue'
import { FileText, X } from 'lucide-vue-next'
Expand Down
10 changes: 6 additions & 4 deletions frontend/src/components/Modals/EvaluationModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,12 @@ function submitEvaluation(close) {
const getCourses = () => {
let courses = []
for (const course of props.courses) {
courses.push({
label: course.title,
value: course.course,
})
if (course.evaluator) {
courses.push({
label: course.title,
value: course.course,
})
}
}
return courses
}
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/components/Modals/LiveClassModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
v-model="liveClass.title"
:label="__('Title')"
class="mb-4"
:required="true"
/>
<Tooltip
:text="
Expand All @@ -35,13 +36,15 @@
type="time"
:label="__('Time')"
class="mb-4"
:required="true"
/>
</Tooltip>
<FormControl
v-model="liveClass.timezone"
type="select"
:options="getTimezoneOptions()"
:label="__('Timezone')"
:required="true"
/>
</div>
<div>
Expand All @@ -50,13 +53,15 @@
type="date"
class="mb-4"
:label="__('Date')"
:required="true"
/>
<Tooltip :text="__('Duration of the live class in minutes')">
<FormControl
type="number"
v-model="liveClass.duration"
:label="__('Duration')"
class="mb-4"
:required="true"
/>
</Tooltip>
<FormControl
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/VideoBlock.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
@timeupdate="updateTime"
@ended="videoEnded"
@click="togglePlay"
oncontextmenu="return false"
class="rounded-lg border border-gray-100 group cursor-pointer"
ref="videoRef"
>
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/pages/Batch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@
</header>
<div v-if="batch.data" class="grid grid-cols-[70%,30%] h-screen">
<div class="border-r-2">
<Tabs v-model="tabIndex" :tabs="tabs" tablistClass="overflow-y-hidden">
<Tabs
v-model="tabIndex"
:tabs="tabs"
tablistClass="overflow-y-hidden sticky top-11 bg-white z-10"
>
<template #tab="{ tab, selected }" class="overflow-x-hidden">
<div>
<button
Expand Down
15 changes: 14 additions & 1 deletion frontend/src/pages/BatchForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@
</div>
<div class="grid grid-cols-2 gap-10 mb-4 space-y-2">
<div>
<FormControl v-model="batch.title" :label="__('Title')" />
<FormControl
v-model="batch.title"
:label="__('Title')"
:required="true"
/>
</div>
<div class="flex flex-col space-y-2">
<FormControl
Expand Down Expand Up @@ -83,6 +87,8 @@
v-model="instructors"
doctype="User"
:label="__('Instructors')"
:required="true"
:filters="{ ignore_user_type: 1 }"
/>
<div class="mb-4">
<FormControl
Expand All @@ -91,10 +97,12 @@
type="textarea"
class="my-4"
:placeholder="__('Short description of the batch')"
:required="true"
/>
<div>
<label class="block text-sm text-gray-600 mb-1">
{{ __('Batch Details') }}
<span class="text-red-500">*</span>
</label>
<TextEditor
:content="batch.batch_details"
Expand All @@ -116,12 +124,14 @@
:label="__('Start Date')"
type="date"
class="mb-4"
:required="true"
/>
<FormControl
v-model="batch.end_date"
:label="__('End Date')"
type="date"
class="mb-4"
:required="true"
/>
</div>
<div>
Expand All @@ -130,19 +140,22 @@
:label="__('Start Time')"
type="time"
class="mb-4"
:required="true"
/>
<FormControl
v-model="batch.end_time"
:label="__('End Time')"
type="time"
class="mb-4"
:required="true"
/>
<FormControl
v-model="batch.timezone"
:label="__('Timezone')"
type="text"
:placeholder="__('Example: IST (+5:30)')"
class="mb-4"
:required="true"
/>
</div>
</div>
Expand Down
22 changes: 1 addition & 21 deletions frontend/src/pages/CourseDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<CourseCardOverlay :course="course" class="md:hidden mb-4" />
<div
v-html="course.data.description"
class="course-description"
class="ProseMirror prose prose-table:table-fixed prose-td:p-2 prose-th:p-2 prose-td:border prose-th:border prose-td:border-gray-300 prose-th:border-gray-300 prose-td:relative prose-th:relative prose-th:bg-gray-100 prose-sm max-w-none !whitespace-normal"
></div>
<div class="mt-10">
<CourseOutline :courseName="course.data.name" :showOutline="true" />
Expand Down Expand Up @@ -131,26 +131,6 @@ const pageMeta = computed(() => {
updateDocumentTitle(pageMeta)
</script>
<style>
.course-description p {
margin-bottom: 1rem;
line-height: 1.7;
}
.course-description li {
line-height: 1.7;
}

.course-description ol {
list-style: auto;
margin: revert;
padding: revert;
}

.course-description ul {
list-style: disc;
margin: revert;
padding: revert;
}

.avatar-group {
display: inline-flex;
align-items: center;
Expand Down
1 change: 1 addition & 0 deletions frontend/src/pages/CourseForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@
v-model="instructors"
doctype="User"
:label="__('Instructors')"
:filters="{ ignore_user_type: 1 }"
:required="true"
/>
</div>
Expand Down
7 changes: 6 additions & 1 deletion frontend/src/pages/LessonForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@
</header>
<div class="py-5">
<div class="w-5/6 mx-auto">
<FormControl v-model="lesson.title" label="Title" class="mb-4" />
<FormControl
v-model="lesson.title"
label="Title"
class="mb-4"
:required="true"
/>
<FormControl
v-model="lesson.include_in_preview"
type="checkbox"
Expand Down
2 changes: 1 addition & 1 deletion lms/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.10.0"
__version__ = "2.11.0"
4 changes: 3 additions & 1 deletion lms/lms/api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""API methods for the LMS.
"""

import json
import frappe
from frappe.translate import get_all_translations
from frappe import _
Expand Down Expand Up @@ -295,7 +296,8 @@ def get_branding():

for field in image_fields:
if website_settings.get(field):
website_settings.update({field: get_file_info(website_settings.get(field))})
file_info = get_file_info(website_settings.get(field))
website_settings.update({field: json.loads(json.dumps(file_info))})
else:
website_settings.update({field: None})

Expand Down
3 changes: 2 additions & 1 deletion lms/lms/doctype/lms_live_class/lms_live_class.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,10 @@
"read_only": 1
}
],
"in_create": 1,
"index_web_pages_for_search": 1,
"links": [],
"modified": "2024-10-31 15:41:35.540856",
"modified": "2024-11-11 18:59:26.396111",
"modified_by": "Administrator",
"module": "LMS",
"name": "LMS Live Class",
Expand Down
4 changes: 2 additions & 2 deletions lms/lms/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1103,7 +1103,7 @@ def get_categorized_courses(courses):

categories = [live, enrolled, created]
for category in categories:
category.sort(key=lambda x: x.enrollments, reverse=True)
category.sort(key=lambda x: cint(x.enrollments), reverse=True)

live.sort(key=lambda x: x.featured, reverse=True)

Expand Down Expand Up @@ -1265,7 +1265,7 @@ def get_batch_details(batch):
batch_details.instructors = get_instructors(batch)

batch_details.courses = frappe.get_all(
"Batch Course", filters={"parent": batch}, fields=["course", "title"]
"Batch Course", filters={"parent": batch}, fields=["course", "title", "evaluator"]
)
batch_details.students = frappe.get_all(
"Batch Student", {"parent": batch}, pluck="student"
Expand Down
Empty file.
49 changes: 0 additions & 49 deletions lms/lms/web_form/add_a_new_batch/add_a_new_batch.js

This file was deleted.

Loading
Loading